From: Janusz Dobrowolski Date: Mon, 3 Aug 2009 21:20:46 +0000 (+0000) Subject: Fixed top placement of popup window on FF2 X-Git-Tag: v2.4.2~19^2~1315 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=72f59dad7992d77e36dc2f5ada090102666b847a;p=fa-stable.git Fixed top placement of popup window on FF2 --- diff --git a/js/inserts.js b/js/inserts.js index 745aa2c7..4cfee260 100644 --- a/js/inserts.js +++ b/js/inserts.js @@ -140,14 +140,17 @@ function _set_combo_select(e) { } } +var _w; + function callEditor(key) { var el = document.getElementsByName(editors[key][1])[0]; - w = open(editors[key][0]+el.value+'&popup=1', + if(_w) _w.close(); // this is really necessary to have window on top in FF2 :/ + _w = open(editors[key][0]+el.value+'&popup=1', "edit","Scrollbars=0,resizable=0,width=800,height=600"); - if (w.opener == null) - w.opener = self; + if (_w.opener == null) + _w.opener = self; editors._call = key; // store call point for passBack - w.focus(); + _w.focus(); } function passBack(value) { @@ -271,17 +274,6 @@ var inserts = { _set_combo_select(e); } }, - 'textarea,a': function(e) { - if(e.onfocus==undefined) { - e.onfocus = function() { - save_focus(this); - }; - e.onmouseover = function(e) { - setFocus(this); - return false; - } - } - }, 'a.printlink': function(l) { l.onclick = function() { save_focus(this);