aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes/default/template/batch_manager_unit.tpl
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-05-25 09:00:46 +0000
committerpatdenice <patdenice@piwigo.org>2011-05-25 09:00:46 +0000
commitc9b7beb12f38890631ab12c8086b1bff28eed4a4 (patch)
tree7c90d91c8c4d5949abd9d6d378dc9c84680d3163 /admin/themes/default/template/batch_manager_unit.tpl
parent4c13229cd9c7ce6a8b2e93b922b1e2dbc9b9799c (diff)
Load tags for tokeninput directly in html page. Ajax is too slow.
git-svn-id: http://piwigo.org/svn/trunk@11039 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes/default/template/batch_manager_unit.tpl')
-rw-r--r--admin/themes/default/template/batch_manager_unit.tpl38
1 files changed, 17 insertions, 21 deletions
diff --git a/admin/themes/default/template/batch_manager_unit.tpl b/admin/themes/default/template/batch_manager_unit.tpl
index dec11a998..66b8b6b17 100644
--- a/admin/themes/default/template/batch_manager_unit.tpl
+++ b/admin/themes/default/template/batch_manager_unit.tpl
@@ -13,28 +13,24 @@ prefix = ", ";
{/if}
tag_boxes_selector = tag_boxes_selector + prefix + "#tags-" + {$element.ID};
{/foreach}
-{literal}
-jQuery(document).ready(function() {
- jQuery.getJSON('admin.php?fckb_tags=1', function(data) {
- jQuery(tag_boxes_selector).tokenInput(
- data,
- {
- {/literal}
- hintText: '{'Type in a search term'|@translate}',
- noResultsText: '{'No results'|@translate}',
- searchingText: '{'Searching...'|@translate}',
- newText: ' ({'new'|@translate})',
- animateDropdown: false,
- preventDuplicates: true,
- allowCreation: true
- {literal}
- }
- );
- });
-
- $("a.preview-box").colorbox();
+
+jQuery(document).ready(function() {ldelim}
+ jQuery(tag_boxes_selector).tokenInput(
+ [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}],
+ {ldelim}
+ hintText: '{'Type in a search term'|@translate}',
+ noResultsText: '{'No results'|@translate}',
+ searchingText: '{'Searching...'|@translate}',
+ newText: ' ({'new'|@translate})',
+ animateDropdown: false,
+ preventDuplicates: true,
+ allowCreation: true
+ }
+ );
+
+ jQuery("a.preview-box").colorbox();
});
-{/literal}{/footer_script}
+{/footer_script}
<h2>{'Batch Manager'|@translate}</h2>