X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=public%2Fjs%2Fsyj.js;h=78d7606afe2276634e0db2b6227bb40cf591f22e;hp=a72dbb71ff6a99d114bf93c1985f1da665cc59f3;hb=6633e95b89c1d1eba9b7b0e612becaf11b085d69;hpb=36fd88b7c9509509dc20070dae48883abe01a3fa diff --git a/public/js/syj.js b/public/js/syj.js index a72dbb7..78d7606 100644 --- a/public/js/syj.js +++ b/public/js/syj.js @@ -100,7 +100,12 @@ var SYJDataUi = (function() { if (!infotoggler) { infotoggler = new Toggler('path-infos-content'); $("path-infos-toggler").insert({bottom: infotoggler.element}); - $("path-infos-anchor").observe('click', function(evt) { + var anchor = $("path-infos-anchor"); + var parent = anchor.up('.menu-item'); + if (parent) { + anchor = parent; + } + anchor.observe('click', function(evt) { evt.stop(); infotoggler.toggle(evt); }); @@ -658,7 +663,12 @@ var SYJModalClass = Class.create({ closeMethods: ["onescapekey", "onouterclick", "onbutton"] }); - $(this.type + "_control_anchor").observe("click", function(evt) { + var anchor = $(this.type + '_control_anchor'); + var parent = anchor.up('.menu-item'); + if (parent) { + anchor = parent; + } + anchor.observe("click", function(evt) { this.modalbox.show(); evt.stop(); }.bindAsEventListener(this));