}
}
+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) {
return false;
}
},
-/* 'button': function(e) {
+ 'button': function(e) {
if (e.name) {
var func = _validate[e.name];
var old = e.onclick;
- if(func) {
- if (typeof old != 'function') {
+ if(func) {
+ if (typeof old != 'function' || old == func) { // prevent multiply binding on ajax update
e.onclick = func;
} else {
e.onclick = function() {
}
}
},
-*/ '.amount': function(e) {
+ '.amount': function(e) {
if(e.onblur==undefined) {
e.onblur = function() {
var dec = this.getAttribute("dec");
_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);