a:18:{s:9:"#provides";s:22:"dojox.dtl.filter.lists";s:9:"#resource";s:19:"dtl/filter/lists.js";s:9:"#requires";a:1:{i:0;a:2:{i:0;s:6:"common";i:1;s:15:"dojox.dtl._base";}}s:32:"dojox.dtl.filter.lists._dictsort";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:1:"a";a:1:{s:4:"type";s:0:"";}s:1:"b";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:69:" if(a[0] == b[0]){ return 0; } return (a[0] < b[0]) ? -1 : 1;";s:7:"private";b:1;s:7:"summary";s:0:"";}s:31:"dojox.dtl.filter.lists.dictsort";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:1:{s:4:"type";s:0:"";}s:3:"arg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:487:" if(!arg){ return value; } var i, item, items = []; if(!dojo.isArray(value)){ var obj = value, value = []; for(var key in obj){ value.push(obj[key]); } } for(i = 0; i < value.length; i++){ items.push([new dojox.dtl._Filter('var.' + arg).resolve(new dojox.dtl._Context({ 'var' : value[i]})), value[i]]); } items.sort(dojox.dtl.filter.lists._dictsort); var output = []; for(i = 0; item = items[i]; i++){ output.push(item[1]); } return output;";s:7:"summary";s:86:"Takes a list of dicts, returns that list sorted by the property given in the argument.";}s:39:"dojox.dtl.filter.lists.dictsortreversed";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:1:{s:4:"type";s:0:"";}s:3:"arg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:117:" if(!arg) return value; var dictsort = dojox.dtl.filter.lists.dictsort(value, arg); return dictsort.reverse();";s:7:"summary";s:103:"Takes a list of dicts, returns that list sorted in reverse order by the property given in the argument.";}s:28:"dojox.dtl.filter.lists.first";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"value";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:40:" return (value.length) ? value[0] : "";";s:7:"summary";s:32:"Returns the first item in a list";}s:27:"dojox.dtl.filter.lists.join";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:1:{s:4:"type";s:0:"";}s:3:"arg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:32:" return value.join(arg || ",");";s:7:"summary";s:60:"Joins a list with a string, like Python's ``str.join(list)``";s:11:"description";s:158:"Django throws a compile error, but JS can't do arg checks so we're left with run time errors, which aren't wise for something as trivial here as an empty arg.";}s:29:"dojox.dtl.filter.lists.length";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"value";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:68:" return (isNaN(value.length)) ? (value + "").length : value.length;";s:7:"summary";s:50:"Returns the length of the value - useful for lists";}s:32:"dojox.dtl.filter.lists.length_is";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:1:{s:4:"type";s:0:"";}s:3:"arg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:39:" return value.length == parseInt(arg);";s:7:"summary";s:63:"Returns a boolean of whether the value's length is the argument";}s:29:"dojox.dtl.filter.lists.random";a:4:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:5:"value";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:57:" return value[Math.floor(Math.random() * value.length)];";s:7:"summary";s:35:"Returns a random item from the list";}s:28:"dojox.dtl.filter.lists.slice";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:1:{s:4:"type";s:0:"";}s:3:"arg";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:490:" arg = arg || ""; var parts = arg.split(":"); var bits = []; for(var i = 0; i < parts.length; i++){ if(!parts[i].length){ bits.push(null); }else{ bits.push(parseInt(parts[i])); } } if(bits[0] === null){ bits[0] = 0; } if(bits[0] < 0){ bits[0] = value.length + bits[0]; } if(bits.length < 2 || bits[1] === null){ bits[1] = value.length; } if(bits[1] < 0){ bits[1] = value.length + bits[1]; } return value.slice(bits[0], bits[1]);";s:7:"summary";s:28:"Returns a slice of the list.";s:11:"description";s:207:"Uses the same syntax as Python's list slicing; see http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice for an introduction. Also uses the optional third value to denote every X item.";}s:38:"dojox.dtl.filter.lists._unordered_list";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:2:{s:5:"value";a:1:{s:4:"type";s:0:"";}s:4:"tabs";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:466:" var ddl = dojox.dtl.filter.lists; var i, indent = ""; for(i = 0; i < tabs; i++){ indent += "\t"; } if(value[1] && value[1].length){ var recurse = []; for(i = 0; i < value[1].length; i++){ recurse.push(ddl._unordered_list(value[1][i], tabs + 1)) } return indent + "