{include file='include/autosize.inc.tpl'} {include file='include/datepicker.inc.tpl'} {include file='include/colorbox.inc.tpl'} {combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'} {footer_script require='jquery.tokeninput'} var tag_boxes_selector = ""; {foreach from=$elements item=element name=element} {if $smarty.foreach.element.first} var prefix = ""; {else} prefix = ", "; {/if} tag_boxes_selector = tag_boxes_selector + prefix + "#tags-" + {$element.ID}; {/foreach} 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(); }); {/footer_script}