From 85c900fdd5d070e93363768b346acbadc8f132d7 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 15 Sep 2010 12:57:34 +0200 Subject: sorting fix --- module/web/templates/default/package_ui.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'module/web/templates') diff --git a/module/web/templates/default/package_ui.js b/module/web/templates/default/package_ui.js index 759412621..1c9505bc9 100644 --- a/module/web/templates/default/package_ui.js +++ b/module/web/templates/default/package_ui.js @@ -65,12 +65,10 @@ var PackageUI = new Class({ saveSort: function(ele, copy) { var order = []; - this.sorts.serialize(function(ele,pos){ - if (ele.retrieve("order") != pos){ - order.push(ele.retrieve("pid")+"|"+pos); - ele.store("order", pos); + this.sorts.serialize(function(li,pos){ + if (li == ele && ele.retrieve("order") != pos){ + order.push(ele.retrieve("pid")+"|"+pos) } - }); if (order.length > 0){ indicateLoad(); @@ -315,12 +313,10 @@ var Package = new Class({ saveSort: function(ele, copy) { var order = []; - this.sorts.serialize(function(ele,pos){ - if (ele.retrieve("order") != pos){ - order.push(ele.retrieve("lid")+"|"+pos); - ele.store("order", pos); + this.sorts.serialize(function(li,pos){ + if (li == ele && ele.retrieve("order") != pos){ + order.push(ele.retrieve("lid")+"|"+pos) } - }); if (order.length > 0){ indicateLoad(); -- cgit v1.2.3