From 0dc96ec9b8064e182a239a483e963ff821af33f2 Mon Sep 17 00:00:00 2001 From: Matthias Mees Date: Sat, 17 Jan 2015 18:05:20 +0100 Subject: [PATCH] Fix showing cats/tags list overlay on clicking cats/tags list This was broken due to my recent markup changes. Also added lang constants for the tags list, but since we could label it better, introduced new lang constants for it. References #239 --- lang/addlang.txt | 4 ++-- templates/2k11/admin/entries.tpl | 2 +- templates/2k11/admin/serendipity_editor.js.tpl | 12 ++++++++---- templates/2k11/admin/style.css | 5 +++++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lang/addlang.txt b/lang/addlang.txt index 3cf2ef2f..3490bb29 100644 --- a/lang/addlang.txt +++ b/lang/addlang.txt @@ -1,2 +1,2 @@ - -@define('PUBLISH_NOW', 'Publish this entry now (sets current time and date)'); \ No newline at end of file +@define('EDITOR_TAGS', 'Tags'); +@define('EDITOR_NO_TAGS', 'No tags'); diff --git a/templates/2k11/admin/entries.tpl b/templates/2k11/admin/entries.tpl index d4b79f26..f730981c 100644 --- a/templates/2k11/admin/entries.tpl +++ b/templates/2k11/admin/entries.tpl @@ -22,7 +22,7 @@
-

Tags

+

{$CONST.PLUGIN_EVENT_FREETAG_MANAGETAGS}

diff --git a/templates/2k11/admin/serendipity_editor.js.tpl b/templates/2k11/admin/serendipity_editor.js.tpl index 7d0c9c92..df5527c0 100644 --- a/templates/2k11/admin/serendipity_editor.js.tpl +++ b/templates/2k11/admin/serendipity_editor.js.tpl @@ -650,12 +650,12 @@ $target.empty(); - if (tagged.length > 0) { + if (tagged == '') { + $('
  • {$CONST.PLUGIN_EVENT_FREETAG_NO_RELATED}
  • ').appendTo($target); + } else { $.each(tagged, function(key, tag) { $('
  • '+ tag +'
  • ').appendTo($target); }); - } else { - $('
  • {$CONST.NO_CATEGORIES}
  • ').appendTo($target); } } @@ -1003,7 +1003,7 @@ $(function() { } }); - $('#category_list').on('click', 'h3, li', function() { + $('#cats_list').on('click', 'h3, li', function() { $('#select_category').trigger('click'); }); } @@ -1056,6 +1056,10 @@ $(function() { $('#backend_freetag_list > a').click(function(e) { e.preventDefault(); }); + + $('#tags_list').on('click', 'h3, li', function() { + $('#select_tags').trigger('click'); + }); } {/if} diff --git a/templates/2k11/admin/style.css b/templates/2k11/admin/style.css index 2d897f23..0e7352e4 100644 --- a/templates/2k11/admin/style.css +++ b/templates/2k11/admin/style.css @@ -1783,6 +1783,11 @@ form > .button_link:first-of-type, padding-bottom: .583335em; } +.taxonomy h3, +.taxonomy li { + cursor: pointer; +} + .taxonomy h3 { float: left; line-height: 1.5em;