From d82ed41f654ed3a691470bc8a87ede9736c67883 Mon Sep 17 00:00:00 2001 From: Matthias Mees Date: Sat, 5 Oct 2013 08:26:26 +0200 Subject: [PATCH] Fixes 'second click' issue with further links toggler. Apparently, magnificPopup does not like the click handler if the toggler is an a element, which we probably never noticed since all the other togglers used in the backend are buttons. --- .../2k11/admin/serendipity_editor.js.tpl | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/templates/2k11/admin/serendipity_editor.js.tpl b/templates/2k11/admin/serendipity_editor.js.tpl index c6d645a2..fa0ea07c 100644 --- a/templates/2k11/admin/serendipity_editor.js.tpl +++ b/templates/2k11/admin/serendipity_editor.js.tpl @@ -997,19 +997,14 @@ var AccessifyHTML5 = function (defaults, more_fixes) { }); // Show further links - $('.toggle_links').click(function(e) { - e.preventDefault(); - {if $use_popups} + {if $use_popups} + $('.toggle_links').click(function(e) { + e.preventDefault(); $('#s9y_links').toggleClass('mfp-hide'); - {else} - $(this).magnificPopup({ - items: [{ - src: '#s9y_links', - type: 'inline' - }] - }); - {/if} - }); + }); + {else} + $('.toggle_links').magnificPopup({ type: "inline" }); + {/if} // Media file actions {if $use_popups}