X-Git-Url: https://dev.renevier.net/gitweb.cgi?a=blobdiff_plain;f=public%2Fjs%2Futils.js;h=7126e335410139767a80e7f4890b58461a5270ca;hb=2517cb9932ed82a50722750f4bbb619f75a697a5;hp=f5817d491a2087f3198089e5dad1d0d77bc87a18;hpb=ce001229accb2aff799560eec402344f0dbb1762;p=syj.git diff --git a/public/js/utils.js b/public/js/utils.js index f5817d4..7126e33 100644 --- a/public/js/utils.js +++ b/public/js/utils.js @@ -21,6 +21,10 @@ var CloseBtn = Class.create({ btn = new Element("input", { type: "image", src: imgsrc, alt: "X"}).setStyle(style); elt.insert({top: btn}); btn.observe("click", function(evt) { + evt.stop(); + if (typeof options.callback === "function") { + options.callback.call(elt); + } elt.hide(); }); } @@ -186,7 +190,7 @@ Element.addMethods('form', { }); }, - focus: function(form) { + setfocus: function(form) { var tofocus, error; tofocus = null;