projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed PayPal link url on sales invoice.
[fa-stable.git]
/
js
/
utils.js
diff --git
a/js/utils.js
b/js/utils.js
index cd416339e143dccfb65b69f4bdcbebb425e90e02..761378e4c4ddcf22df2f371d7414ae50559616be 100644
(file)
--- a/
js/utils.js
+++ b/
js/utils.js
@@
-119,7
+119,7
@@
JsHttpRequest._request = function(trigger, form, tout, retry) {
} else if(cmd=='fc') { // set focus
_focus = data;
} else if(cmd=='js') { // evaluate js code
} else if(cmd=='fc') { // set focus
_focus = data;
} else if(cmd=='js') { // evaluate js code
-
setTimeout(function(){eval(data)}, 200); // timeout required by IE7/8
+
__isGecko ? eval(data) :
setTimeout(function(){eval(data)}, 200); // timeout required by IE7/8
} else if(cmd=='rd') { // client-side redirection
window.location = data;
} else if(cmd=='pu') { // pop-up
} else if(cmd=='rd') { // client-side redirection
window.location = data;
} else if(cmd=='pu') { // pop-up
@@
-317,7
+317,7
@@
function move_focus(dir, e0, neighbours)
return t;
}
return t;
}
-var __is
FireFox = navigator.userAgent.match(/gecko/i);
+var __is
Gecko = navigator.userAgent.match(/gecko/i); // i.e. Gecko or KHTML, like Gecko ;)
//returns the absolute position of some element within document
function element_pos(e) {
var res = new Object();
//returns the absolute position of some element within document
function element_pos(e) {
var res = new Object();
@@
-337,7
+337,7
@@
function element_pos(e) {
res.y -= offsetParent.scrollTop;
}
//next lines are necessary to support FireFox problem with offsetParent
res.y -= offsetParent.scrollTop;
}
//next lines are necessary to support FireFox problem with offsetParent
- if (__is
FireFox
) {
+ if (__is
Gecko
) {
while (offsetParent != parentNode && parentNode !== null) {
res.x -= parentNode.scrollLeft;
res.y -= parentNode.scrollTop;
while (offsetParent != parentNode && parentNode !== null) {
res.x -= parentNode.scrollLeft;
res.y -= parentNode.scrollTop;