misc fixes

This commit is contained in:
rlx 2011-01-15 14:22:05 +00:00
parent f71af0a205
commit 3f05b547d8

View file

@ -1483,20 +1483,17 @@ requires
if (self.leftOrTop) {
self.options.elements[0]
.css(self.dimensions[1], self.options.size + 'px')
.triggerEvent('resize', self.options.size);
self.options.elements[1]
.css(self.edges[2], (self.options.size + 1) + 'px')
.triggerEvent('resize', self.options.elements[1][self.dimensions[1]]());
self.options.parent.updateSize(0, self.options.size);
} else {
self.options.elements[0]
.css(self.edges[3], (self.options.size + 1) + 'px')
.triggerEvent('resize', self.options.elements[0][self.dimensions[1]]());
self.options.elements[1]
.css(self.dimensions[1], self.options.size + 'px')
.triggerEvent('resize', self.options.size);
self.options.parent.updateSize(1, self.options.size); // fixme: listen to event instead?
}
triggerEvents('resize');
self.options.parent.updateSize(self.leftOrTop ? 0 : 1, self.options.size); // fixme: listen to event instead?
}
}
@ -1511,6 +1508,7 @@ requires
}
function dragStop() {
self.options.size != self.startSize && triggerEvents('resizeend');
$window.unbind('mousemove');
}
@ -1540,6 +1538,19 @@ requires
*/
}
function triggerEvents(event) {
self.options.elements[0].triggerEvent(event,
self.leftOrTop ?
self.options.size :
self.options.elements[0][self.dimensions[1]]()
);
self.options.elements[1].triggerEvent(event,
self.leftOrTop ?
self.options.elements[1][self.dimensions[1]]() :
self.options.size
);
}
return that;
};
@ -2734,6 +2745,8 @@ requires
function autocomplete(oldValue, oldCursor) {
Ox.print('autocomplete', oldValue, oldCursor)
if (self.options.value || self.options.autocompleteReplaceCorrect) {
Ox.isFunction(self.options.autocomplete) ?
(self.options.key ? self.options.autocomplete(
@ -6692,7 +6705,6 @@ requires
$emptyPage.remove();
self.$pages[page].appendTo(that.$content);
!Ox.isUndefined(callback) && callback(); // fixme: callback necessary? why not bind to event?
that.triggerEvent('load');
}));
} else {
//Ox.print('loading a page from cache, this should probably not happen -----------')
@ -6705,7 +6717,10 @@ requires
var counter = 0,
fn = function() {
//Ox.print('---- self.$pages', self.$pages)
++counter == 3 && !Ox.isUndefined(callback) && callback();
if (++counter == 3) {
!Ox.isUndefined(callback) && callback();
that.triggerEvent('load');
}
};
// fixme: find out which option is better
/*
@ -7795,7 +7810,6 @@ requires
}
function resizeColumn(id, width) {
Ox.print('resizeColumn', id, width)
var i = getColumnIndexById(id),
pos = getColumnPositionById(id);
self.options.columns[i].width = width;