1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-18 20:41:29 +00:00

upgrade Dojo to 1.6.1

This commit is contained in:
Andrew Dolgov
2011-11-08 20:40:44 +04:00
parent 870a70e109
commit 81bea17aef
680 changed files with 51915 additions and 74107 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
@@ -9,11 +9,13 @@ if(!dojo._hasResource["dojo.data.util.sorter"]){ //_hasResource checks added by
dojo._hasResource["dojo.data.util.sorter"] = true;
dojo.provide("dojo.data.util.sorter");
dojo.data.util.sorter.basicComparator = function( /*anything*/ a,
dojo.getObject("data.util.sorter", true, dojo);
dojo.data.util.sorter.basicComparator = function( /*anything*/ a,
/*anything*/ b){
// summary:
// summary:
// Basic comparision function that compares if an item is greater or less than another item
// description:
// description:
// returns 1 if a > b, -1 if a < b, 0 if equal.
// 'null' values (null, undefined) are treated as larger values so that they're pushed to the end of the list.
// And compared to each other, null is equivalent to undefined.
@@ -30,18 +32,18 @@ dojo.data.util.sorter.basicComparator = function( /*anything*/ a,
b = undefined;
}
if(a == b){
r = 0;
r = 0;
}else if(a > b || a == null){
r = 1;
r = 1;
}
return r; //int {-1,0,1}
};
dojo.data.util.sorter.createSortFunction = function( /* attributes array */sortSpec,
/*dojo.data.core.Read*/ store){
// summary:
// summary:
// Helper function to generate the sorting function based off the list of sort attributes.
// description:
// description:
// The sort function creation will look for a property on the store called 'comparatorMap'. If it exists
// it will look in the mapping for comparisons function for the attributes. If one is found, it will
// use it instead of the basic comparator, which is typically used for strings, ints, booleans, and dates.
@@ -83,7 +85,7 @@ dojo.data.util.sorter.createSortFunction = function( /* attributes array */sortS
}
comp = map[attr] || bc;
}
sortFunctions.push(createSortFunction(attr,
sortFunctions.push(createSortFunction(attr,
dir, comp, store));
}
}
@@ -95,7 +97,7 @@ dojo.data.util.sorter.createSortFunction = function( /* attributes array */sortS
return ret;//int
}
}
return 0; //int
return 0; //int
}; // Function
};