{include file='include/tag_selection.inc.tpl'} {footer_script}{literal} jQuery(document).ready(function(){ function displayDeletionWarnings() { jQuery(".warningDeletion").show(); jQuery("input[name=destination_tag]:checked").parent("label").children(".warningDeletion").hide(); } displayDeletionWarnings(); jQuery("#mergeTags label").click(function() { displayDeletionWarnings(); }); jQuery("input[name=merge]").click(function() { if (jQuery("ul.tagSelection input[type=checkbox]:checked").length < 2) { alert("{/literal}{'Select at least two tags for merging'|@translate}{literal}"); return false; } }); }); {/literal}{/footer_script}

{'Manage tags'|@translate}

{if isset($EDIT_TAGS_LIST)}
{'Edit tags'|@translate} {foreach from=$tags item=tag} {/foreach}
{'Current name'|@translate} {'New name'|@translate}
{$tag.NAME}

{/if} {if isset($DUPLIC_TAGS_LIST)}
{'Edit tags'|@translate} {foreach from=$tags item=tag} {/foreach}
{'Source tag'|@translate} {'Name of the duplicate'|@translate}
{$tag.NAME}

{/if} {if isset($MERGE_TAGS_LIST)}
{'Merge tags'|@translate} {'Select the destination tag'|@translate}

{foreach from=$tags item=tag name=tagloop}
{/foreach}
{/if}
{'Add a tag'|@translate}

{'Tag selection'|@translate} {html_style} .showInfo{ldelim}text-indent:5px} {/html_style} {footer_script}{literal} jQuery('.showInfo').tipTip({ 'delay' : 0, 'fadeIn' : 200, 'fadeOut' : 200, 'maxWidth':'300px', 'keepAlive':true, 'activation':'click' }); {/literal}{/footer_script} {if count($all_tags)}
{footer_script}{literal} $("#searchInput").on( "keydown", function() { var $this = $(this), timer = $this.data("timer"); if (timer) clearTimeout(timer); $this.data("timer", setTimeout( function() { var val = $this.val(); if (!val) { $(".tagSelection>li").show(); $("#filterIcon").css("visibility","hidden"); } else { $("#filterIcon").css("visibility","visible"); var regex = new RegExp( val.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"), "i" ); $(".tagSelection>li").each( function(i, li) { var $li = $(li), text = $.trim( $("label", $li).text() ); if (regex.test( text )) $li.show(); else $li.hide(); }); } }, 300) ); }); {/literal}{/footer_script} {/if}