aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default
diff options
context:
space:
mode:
Diffstat (limited to 'admin/themes/default')
-rw-r--r--admin/themes/default/js/LocalStorageCache.js29
-rw-r--r--admin/themes/default/template/batch_manager_global.tpl4
-rw-r--r--admin/themes/default/template/batch_manager_unit.tpl4
-rw-r--r--admin/themes/default/template/picture_modify.tpl4
4 files changed, 34 insertions, 7 deletions
diff --git a/admin/themes/default/js/LocalStorageCache.js b/admin/themes/default/js/LocalStorageCache.js
index 67e804062..214a4ffcd 100644
--- a/admin/themes/default/js/LocalStorageCache.js
+++ b/admin/themes/default/js/LocalStorageCache.js
@@ -170,6 +170,23 @@
});
});
};
+
+ // redefine Selectize templates without escape
+ AbstractSelectizer.getRender = function(field_label, lang) {
+ lang = lang || { 'Add': 'Add' };
+
+ return {
+ 'option': function(data, escape) {
+ return '<div class="option">' + data[field_label] + '</div>';
+ },
+ 'item': function(data, escape) {
+ return '<div class="item">' + data[field_label] + '</div>';
+ },
+ 'option_create': function(data, escape) {
+ return '<div class="create">' + lang['Add'] + ' <strong>' + data.input + '</strong>&hellip;</div>';
+ }
+ };
+ };
/**
@@ -206,7 +223,8 @@
labelField: 'fullname',
sortField: 'global_rank',
searchField: ['fullname'],
- plugins: ['remove_button']
+ plugins: ['remove_button'],
+ render: AbstractSelectizer.getRender('fullname', options.lang)
});
this._selectize($target, options);
@@ -253,7 +271,8 @@
labelField: 'name',
sortField: 'name',
searchField: ['name'],
- plugins: ['remove_button']
+ plugins: ['remove_button'],
+ render: AbstractSelectizer.getRender('name', options.lang)
});
this._selectize($target, options);
@@ -294,7 +313,8 @@
labelField: 'name',
sortField: 'name',
searchField: ['name'],
- plugins: ['remove_button']
+ plugins: ['remove_button'],
+ render: AbstractSelectizer.getRender('name', options.lang)
});
this._selectize($target, options);
@@ -347,7 +367,8 @@
labelField: 'username',
sortField: 'username',
searchField: ['username'],
- plugins: ['remove_button']
+ plugins: ['remove_button'],
+ render: AbstractSelectizer.getRender('username', options.lang)
});
this._selectize($target, options);
diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl
index 971fb90fb..1d1a40943 100644
--- a/admin/themes/default/template/batch_manager_global.tpl
+++ b/admin/themes/default/template/batch_manager_global.tpl
@@ -74,7 +74,9 @@ jQuery(document).ready(function() {ldelim}
rootUrl: '{$ROOT_URL}'
});
- tagsCache.selectize(jQuery('[data-selectize=tags]'));
+ tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
+ 'Add': '{'Create'|translate}'
+ }});
{* <!-- CATEGORIES --> *}
var categoriesCache = new CategoriesCache({
diff --git a/admin/themes/default/template/batch_manager_unit.tpl b/admin/themes/default/template/batch_manager_unit.tpl
index 376879b49..edea405d3 100644
--- a/admin/themes/default/template/batch_manager_unit.tpl
+++ b/admin/themes/default/template/batch_manager_unit.tpl
@@ -16,7 +16,9 @@ var tagsCache = new TagsCache({
rootUrl: '{$ROOT_URL}'
});
-tagsCache.selectize(jQuery('[data-selectize=tags]'));
+tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
+ 'Add': '{'Create'|translate}'
+}});
{* <!-- DATEPICKER --> *}
jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}
diff --git a/admin/themes/default/template/picture_modify.tpl b/admin/themes/default/template/picture_modify.tpl
index 21033be92..45aeb7fd0 100644
--- a/admin/themes/default/template/picture_modify.tpl
+++ b/admin/themes/default/template/picture_modify.tpl
@@ -25,7 +25,9 @@ var tagsCache = new TagsCache({
rootUrl: '{$ROOT_URL}'
});
-tagsCache.selectize(jQuery('[data-selectize=tags]'));
+tagsCache.selectize(jQuery('[data-selectize=tags]'), { lang: {
+ 'Add': '{'Create'|translate}'
+}});
{* <!-- DATEPICKER --> *}
jQuery(function(){ {* <!-- onLoad needed to wait localization loads --> *}