From 439647e2fd6751ae3195cefd2c8dcb91eb927b71 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 7 Jul 2010 09:41:04 +0200 Subject: [PATCH] public resize functions for Panel and TextList --- build/js/ox.ui.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index 32284c9..c079b0b 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -1295,8 +1295,9 @@ requires animate = {}; animate[self.options.edge] = size; self.options.parent.animate(animate, 200, function() { + var i = (self.options.edge == "left" || self.options.edge == "top") ? 1 : 0; + Ox.Event.trigger("resize_" + self.ids[i], self.options.elements[i].width()); self.options.collapsed = !self.options.collapsed; - Ox.print("callback"); }); } @@ -3569,6 +3570,11 @@ requires } }; + that.resizeColumn = function(id, width) { + resizeColumn(id, width); + return that; + } + that.sort = function(key, operator) { var isSelected = key == self.options.sort[0].key; self.options.sort = [ @@ -3585,6 +3591,7 @@ requires toggleSelected(self.options.columns[self.selectedColumn].id); } that.$body.sort(self.options.sort[0].key, self.options.sort[0].operator); + return that; }; return that; @@ -4639,9 +4646,10 @@ requires that.resize = function(id, size) { // one can pass pos instead of id var pos = Ox.isNumber(id) ? id : getPositionById(id); - Ox.print("pos", pos, self.options.elements, $.map(self.options.elements, function(v, i) { return v.element.options("id"); })) + // Ox.print("pos", pos, self.options.elements, $.map(self.options.elements, function(v, i) { return v.element.options("id"); })) self.options.elements[pos].size = size; setSizes(); + return that; }; return that;