From 7c3c6701d8f147b1206da30920ef77f96b9a03dc Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 29 Nov 2016 13:26:17 +0100 Subject: [PATCH] fixes #558, tag manager selection mode By default, we're in "view mode", with the showInfo icon on each tag. We can switch to the "selection mode" and the showInfo icon is replaced by a font-checkbox. --- admin/themes/default/template/tags.tpl | 33 ++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/admin/themes/default/template/tags.tpl b/admin/themes/default/template/tags.tpl index 9efbc95f7..72229c1b8 100644 --- a/admin/themes/default/template/tags.tpl +++ b/admin/themes/default/template/tags.tpl @@ -1,3 +1,4 @@ +{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} {include file='include/tag_selection.inc.tpl'} {html_style} @@ -20,6 +21,25 @@ jQuery("#addTagClose").click(function() { return false; }); +jQuery("#selectionMode").click(function() { + if (jQuery(this).hasClass("icon-check-empty")) { + jQuery("#selectionMode").removeClass("icon-check-empty").addClass("icon-check"); + jQuery('label.font-checkbox span').show(); + jQuery('ul.tagSelection a.showInfo').hide(); + jQuery('fieldset#action').show(); + jQuery('fieldset#selectTags legend').html("{'Tag selection'|translate|escape:javascript}"); + } + else { + jQuery("#selectionMode").removeClass("icon-check").addClass("icon-check-empty"); + jQuery('label.font-checkbox span').hide(); + jQuery('ul.tagSelection a.showInfo').show(); + jQuery('fieldset#action').hide(); + jQuery('fieldset#selectTags legend').html("{'Tags'|translate|escape:javascript}"); + } + return false; +}); + + jQuery('.showInfo').tipTip({ 'delay' : 0, 'fadeIn' : 200, @@ -137,6 +157,7 @@ jQuery("input[name=confirm_deletion]").change(function() {

{'Add a tag'|translate} + {'Select tags'|translate}