projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed error log warning (missing installed_extensions.inc) during upgrade to 2.2.
[fa-stable.git]
/
js
/
inserts.js
diff --git
a/js/inserts.js
b/js/inserts.js
index 6100d2ddeca2ef1c9a6dd7f8830366d8108118c8..4d665e843fbe8b6a73353a745a4cbe16ec7ed96b 100644
(file)
--- 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];
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");
"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
editors._call = key; // store call point for passBack
- w.focus();
+
_
w.focus();
}
function passBack(value) {
}
function passBack(value) {
@@
-160,9
+163,9
@@
function passBack(value) {
to[0].value = value; // ugly hack to set selector to any value
to.value = value;
// update page after item selection
to[0].value = value; // ugly hack to set selector to any value
to.value = value;
// update page after item selection
- o.JsHttpRequest.request('_'+to.name+'_update');
+ o.JsHttpRequest.request('_'+to.name+'_update', to.form);
+ o.setFocus(to.name);
}
}
- o.setFocus(back[2]);
}
close();
}
}
close();
}
@@
-217,12
+220,12
@@
var inserts = {
return false;
}
},
return false;
}
},
-
/*
'button': function(e) {
+
'button': function(e) {
if (e.name) {
var func = _validate[e.name];
var old = e.onclick;
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() {
e.onclick = func;
} else {
e.onclick = function() {
@@
-235,7
+238,7
@@
var inserts = {
}
}
},
}
}
},
-
*/
'.amount': function(e) {
+ '.amount': function(e) {
if(e.onblur==undefined) {
e.onblur = function() {
var dec = this.getAttribute("dec");
if(e.onblur==undefined) {
e.onblur = function() {
var dec = this.getAttribute("dec");
@@
-271,17
+274,6
@@
var inserts = {
_set_combo_select(e);
}
},
_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);
'a.printlink': function(l) {
l.onclick = function() {
save_focus(this);
@@
-393,7
+385,7
@@
function setHotKeys() {
for (var i=0; i<form.elements.length; i++){
var el = form.elements[i];
var asp = el.getAttribute('aspect');
for (var i=0; i<form.elements.length; i++){
var el = form.elements[i];
var asp = el.getAttribute('aspect');
- if (
(asp=='selector')
&& (key==13 || key==27)) {
+ if (
el.className!='editbutton' && asp=='selector'
&& (key==13 || key==27)) {
passBack(key==13 ? el.getAttribute('rel') : false);
ev.returnValue = false;
return false;
passBack(key==13 ? el.getAttribute('rel') : false);
ev.returnValue = false;
return false;