aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/js
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-05-26 16:56:39 +0000
committermistic100 <mistic@piwigo.org>2014-05-26 16:56:39 +0000
commit1b60bafb587b68b2aaab4d634a62687d12a0f8c8 (patch)
tree05e5e98831a7b54cdda54babdb6243d091d6e28b /admin/themes/default/js
parent2f62865ac11a98c6c817d7bf244815ef49b007ee (diff)
feature 3077 : always sort categories by global rank
git-svn-id: http://piwigo.org/svn/trunk@28540 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default/js')
-rw-r--r--admin/themes/default/js/LocalStorageCache.js2
-rw-r--r--admin/themes/default/js/addAlbum.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/admin/themes/default/js/LocalStorageCache.js b/admin/themes/default/js/LocalStorageCache.js
index c18171efc..b720851be 100644
--- a/admin/themes/default/js/LocalStorageCache.js
+++ b/admin/themes/default/js/LocalStorageCache.js
@@ -1,5 +1,5 @@
var LocalStorageCache = function(options) {
- this.key = options.key + '-' + options.serverId;
+ this.key = options.key + '_' + options.serverId;
this.serverKey = options.serverKey;
this.lifetime = options.lifetime ? options.lifetime*1000 : 3600*1000;
this.loader = options.loader;
diff --git a/admin/themes/default/js/addAlbum.js b/admin/themes/default/js/addAlbum.js
index 60942d8a7..dec06532e 100644
--- a/admin/themes/default/js/addAlbum.js
+++ b/admin/themes/default/js/addAlbum.js
@@ -8,7 +8,7 @@ jQuery.fn.pwgAddAlbum = function(options) {
$popup.find('[name="category_parent"]').selectize({
valueField: 'id',
labelField: 'fullname',
- sortField: 'fullname',
+ sortField: 'global_rank',
searchField: ['fullname'],
plugins: ['remove_button'],
onInitialize: function() {
@@ -107,7 +107,8 @@ jQuery.fn.pwgAddAlbum = function(options) {
options.cache.get(function(categories) {
categories.push({
id: 0,
- fullname: '------------'
+ fullname: '------------',
+ global_rank: 0
});
albumParent.selectize.load(function(callback) {