From e4b935e5eda0a77487af92c352c0777e612c29a0 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 4 Jun 2013 11:57:50 +0000 Subject: [PATCH] self.optoins.items returns request id, dont overwrite with additional info, if callback needs query, self.options.items should pass that info to callback. --- source/Ox.UI/js/List/List.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index f58f0c00..1a6788f6 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -1403,9 +1403,8 @@ Ox.List = function(options, self) { } function updateQuery(callback) { // fixme: shouldn't this be setQuery? - var data; clear(); // fixme: bad function name ... clear what? - self.requests.push(data = self.options.items({ + self.requests.push(self.options.items({ query: self.options.query }, function(result) { var keys = {}; @@ -1415,10 +1414,7 @@ Ox.List = function(options, self) { setTimeout(function() { that.triggerEvent( 'init', - Ox.extend( - result.data, - data && data.query ? {query: data.query} : {} - ) + result.data ); self.rowLength = getRowLength(); self.pageLength = self.options.orientation == 'both'