pass query with list init event

This commit is contained in:
rolux 2013-02-12 07:01:45 +05:30
parent bf09fb2d90
commit abb6d2a8be

View file

@ -1397,12 +1397,13 @@ Ox.List = function(options, self) {
query: self.options.query query: self.options.query
}, function(result) { }, function(result) {
var keys = {}; var keys = {};
//Ox.Log('List', 'INIT!!!', result.data)
// timeout needed since a synchronous items function // timeout needed since a synchronous items function
// will reach here before one can bind to the init event, // will reach here before one can bind to the init event,
// and before any sizes can be determined via the DOM // and before any sizes can be determined via the DOM
setTimeout(function() { setTimeout(function() {
that.triggerEvent('init', result.data); that.triggerEvent(
'init', Ox.extend(result.data, {query: self.options.query})
);
self.rowLength = getRowLength(); self.rowLength = getRowLength();
self.pageLength = self.options.orientation == 'both' self.pageLength = self.options.orientation == 'both'
? self.pageLengthByRowLength[self.rowLength] ? self.pageLengthByRowLength[self.rowLength]