From bd7f8c0ba2e5686c25152de220f645dc39a72ccd Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 2 Sep 2011 08:37:21 +0000 Subject: feature 1078 added: ability to merge tags git-svn-id: http://piwigo.org/svn/trunk@12032 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/tags.tpl | 37 ++++++++++++++++++++++++++++++++++ admin/themes/default/theme.css | 2 ++ 2 files changed, 39 insertions(+) (limited to 'admin/themes') diff --git a/admin/themes/default/template/tags.tpl b/admin/themes/default/template/tags.tpl index 10a4f8b84..51b8c3614 100644 --- a/admin/themes/default/template/tags.tpl +++ b/admin/themes/default/template/tags.tpl @@ -1,5 +1,28 @@ {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}

@@ -30,6 +53,19 @@ {/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} @@ -49,6 +85,7 @@

+

diff --git a/admin/themes/default/theme.css b/admin/themes/default/theme.css index f8bf70be1..433d62ffb 100644 --- a/admin/themes/default/theme.css +++ b/admin/themes/default/theme.css @@ -1078,3 +1078,5 @@ p#uploadModeInfos {text-align:left;margin-top:1em;font-size:90%;color:#999;} #progressbar {border:1px solid #ccc; background-color:#eee;} .ui-progressbar-value { background-image: url(images/pbar-ani.gif); height:10px;margin:-1px;border:1px solid #E78F08;} +/* Tag Manager */ +.warningDeletion {display:none;font-style:italic;} \ No newline at end of file -- cgit v1.2.3