From 753b6a58630e31bef51f6931e445be33f5dec592 Mon Sep 17 00:00:00 2001 From: Matthias Mees Date: Sun, 8 Feb 2015 17:37:10 +0100 Subject: [PATCH] Only expand non-overlayed cats/tags if necessary References #290 --- templates/2k11/admin/serendipity_editor.js.tpl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/templates/2k11/admin/serendipity_editor.js.tpl b/templates/2k11/admin/serendipity_editor.js.tpl index f198d123..a8fa3161 100644 --- a/templates/2k11/admin/serendipity_editor.js.tpl +++ b/templates/2k11/admin/serendipity_editor.js.tpl @@ -984,9 +984,12 @@ $(function() { {if $use_backendpopups} if($('#serendipityEntry').length > 0) { $('#select_category').click(function(e) { - $('#toggle_metadata').click(); - e.preventDefault(); + + if ($('#meta_data').hasClass('additional_info')) { + $('#toggle_metadata').click(); + } + serendipity.skipScroll($(this).attr('href')); }); } @@ -1044,9 +1047,12 @@ $(function() { {if $use_backendpopups} if($('#serendipityEntry').length > 0) { $('#select_tags').click(function(e) { - $('#toggle_advanced').click(); - e.preventDefault(); + + if ($('#adv_opts').hasClass('additional_info')) { + $('#toggle_advanced').click(); + } + serendipity.skipScroll($(this).attr('href')); }); }