misc fixes

This commit is contained in:
rlx 2011-01-03 23:38:43 +00:00
parent b96ce6bf98
commit 6397377272

View file

@ -1068,9 +1068,8 @@ requires
};
that.remove = function() { // fixme: clashes with jquery, should be removeElement
//self.options && Ox.Event.unbind(self.options.id); // there are optionless elements, like the dialog layer
//that.loseFocus();
//delete self.$eventHandler;
that.loseFocus();
delete self.$eventHandler;
that.$element.remove();
delete $elements[that.ox];
return that;
@ -3153,7 +3152,7 @@ requires
};
that.value = function() {
return self.$input.val();
return self.$input.hasClass('OxPlaceholder') ? '' : self.$input.val();
};
return that;
@ -6408,8 +6407,8 @@ requires
function getSelectedIds() {
// fixme: is carring self.ids around the best way?
return $.map(self.selected, function(v, i) {
return self.ids[v];
return $.map(self.selected, function(pos) {
return self.ids[pos];
});
}
@ -6730,7 +6729,7 @@ requires
}
function triggerSelectEvent() {
var ids = getSelectedIds();
var ids = self.options.selected = getSelectedIds();
setTimeout(function() {
var ids_ = getSelectedIds();
Ox.print('ids', ids, 'ids after 100 msec', ids_)
@ -7046,6 +7045,11 @@ requires
that.$head.scrollLeft(scrollLeft);
}
})
.bindEvent({
select: function(event, data) {
self.options.selected = data.ids;
}
})
.appendTo(that);
that.$body.$content.css({
width: getItemWidth() + 'px'
@ -7410,6 +7414,9 @@ requires
self.onChange = function(key, value) {
if (key == 'request') {
//alert('request set!!')
that.$body.options(key, value);
} else if (key == 'selected') {
that.$body.options(key, value);
}
};