aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template/batch_manager_global.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'admin/themes/default/template/batch_manager_global.tpl')
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl35
1 files changed, 17 insertions, 18 deletions
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index 3e22edb02..087f9916a 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -68,16 +68,22 @@ jQuery(document).ready(function() {ldelim}
jQuery("a.preview-box").colorbox();
{* <!-- TAGS --> *}
- var tagsCache = new LocalStorageCache('tagsAdminList', 5*60, function(callback) {
- jQuery.getJSON('{$ROOT_URL}ws.php?format=json&method=pwg.tags.getAdminList', function(data) {
- var tags = data.result.tags;
-
- for (var i=0, l=tags.length; i<l; i++) {
- tags[i].id = '~~' + tags[i].id + '~~';
- }
-
- callback(tags);
- });
+ var tagsCache = new LocalStorageCache({
+ key: 'tagsAdminList',
+ serverKey: '{$CACHE_KEYS.tags}',
+ serverId: '{$CACHE_KEYS._hash}',
+
+ loader: function(callback) {
+ jQuery.getJSON('{$ROOT_URL}ws.php?format=json&method=pwg.tags.getAdminList', function(data) {
+ var tags = data.result.tags;
+
+ for (var i=0, l=tags.length; i<l; i++) {
+ tags[i].id = '~~' + tags[i].id + '~~';
+ }
+
+ callback(tags);
+ });
+ }
});
jQuery('[data-selectize=tags]').selectize({
@@ -92,14 +98,7 @@ jQuery(document).ready(function() {ldelim}
labelField: 'name',
searchField: ['name'],
plugins: ['remove_button'],
- create: function(input, callback) {
- tagsCache.clear();
-
- callback({
- id: input,
- name: input
- });
- }
+ create: true
});
tagsCache.get(function(tags) {