details: /erp/devel/int/rev/6a9cac2e2b48
changeset: 6461:6a9cac2e2b48
user: David Baz Fayos <david.baz <at> openbravo.com>
date: Fri Feb 19 00:46:41 2010 +0100
summary: Mini-refactor of keyControl utils.js function
diffstat:
src/org/openbravo/erpCommon/security/Login_F1.html | 2 +-
web/js/utils.js | 119 ++++----------------
2 files changed, 25 insertions(+), 96 deletions(-)
diffs (174 lines):
diff -r d75125e81ced -r 6a9cac2e2b48
src/org/openbravo/erpCommon/security/Login_F1.html
--- a/src/org/openbravo/erpCommon/security/Login_F1.html Thu Feb 18
18:22:01 2010 +0100
+++ b/src/org/openbravo/erpCommon/security/Login_F1.html Fri Feb 19
00:46:41 2010 +0100
@@ -78,7 +78,7 @@
clearForm();
} catch (e) {}
setWindowElementFocus('firstElement');
- if ((!revisionControl('6446')) || (isOpsInstance() !=
isOpsInstanceCached())) {
+ if ((!revisionControl('6461')) || (isOpsInstance() !=
isOpsInstanceCached())) {
alert("Your browser's cache has outdated files. Please clean it and
reload the page.");
}
diff -r d75125e81ced -r 6a9cac2e2b48 web/js/utils.js
--- a/web/js/utils.js Thu Feb 18 18:22:01 2010 +0100
+++ b/web/js/utils.js Fri Feb 19 00:46:41 2010 +0100
@@ -72,7 +72,7 @@
* Return a number that would be checked at the Login screen to know if the
file is cached with the correct version
*/
function getCurrentRevision() {
- var number = '6446';
+ var number = '6461';
return number;
}
@@ -1447,59 +1447,23 @@
}
} else if (keyArray[i].field == null || (keyTarget!=null &&
keyTarget.name!=null && isIdenticalField(keyArray[i].field, keyTarget.name))) {
var evalfuncTrl = replaceEventString(keyArray[i].evalfunc,
keyTarget.name, keyArray[i].field);
- //if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false)) { stopKeyPressEvent();
}
- if (keyArray[i].auxKey == "ctrlKey" && pushedKey.ctrlKey &&
!pushedKey.altKey && !pushedKey.shiftKey) {
+ if ((keyArray[i].auxKey == "ctrlKey" && pushedKey.ctrlKey &&
!pushedKey.altKey && !pushedKey.shiftKey) ||
+ (keyArray[i].auxKey == "altKey" && !pushedKey.ctrlKey &&
pushedKey.altKey && !pushedKey.shiftKey)) {
if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false)) { stopKeyPressEvent();
}
+ }
+ if ((keyArray[i].auxKey == "ctrlKey" && pushedKey.ctrlKey &&
!pushedKey.altKey && !pushedKey.shiftKey) ||
+ (keyArray[i].auxKey == "altKey" && !pushedKey.ctrlKey &&
pushedKey.altKey && !pushedKey.shiftKey) ||
+ (keyArray[i].auxKey == "shiftKey" && !pushedKey.ctrlKey &&
!pushedKey.altKey && pushedKey.shiftKey) ||
+ (keyArray[i].auxKey == "ctrlKey+shiftKey" && pushedKey.ctrlKey
&& !pushedKey.altKey && pushedKey.shiftKey)) {
try {
eval(evalfuncTrl);
thereIsShortcut = true;
startKeyPressEvent();
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
+ if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false)) {
+ return false;
+ } else {
return true;
- } catch (e) {
- startKeyPressEvent();
- return true;
- }
- startKeyPressEvent();
- return true;
- } else if (keyArray[i].auxKey == "altKey" && !pushedKey.ctrlKey &&
pushedKey.altKey && !pushedKey.shiftKey) {
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false)) { stopKeyPressEvent();
}
- try {
- eval(evalfuncTrl);
- thereIsShortcut = true;
- startKeyPressEvent();
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
- return true;
- } catch (e) {
- startKeyPressEvent();
- return true;
- }
- startKeyPressEvent();
- return true;
- } else if (keyArray[i].auxKey == "shiftKey" && !pushedKey.ctrlKey
&& !pushedKey.altKey && pushedKey.shiftKey) {
- try {
- eval(evalfuncTrl);
- thereIsShortcut = true;
- startKeyPressEvent();
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
- return true;
- } catch (e) {
- startKeyPressEvent();
- return true;
- }
- startKeyPressEvent();
- return true;
- } else if (keyArray[i].auxKey == "ctrlKey+shiftKey" &&
pushedKey.ctrlKey && !pushedKey.altKey && pushedKey.shiftKey) {
- try {
- eval(evalfuncTrl);
- thereIsShortcut = true;
- startKeyPressEvent();
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
- return true;
+ }
} catch (e) {
startKeyPressEvent();
return true;
@@ -1534,9 +1498,11 @@
try {
eval(evalfuncTrl);
thereIsShortcut = true;
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
+ if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false)) {
+ return false;
+ } else {
return true;
+ }
} catch (e) {
startKeyPressEvent();
return true;
@@ -1548,56 +1514,19 @@
} else if (keyArray[i].field == null || (keyTarget!=null &&
keyTarget.name!=null && isIdenticalField(keyArray[i].field, keyTarget.name))) {
var evalfuncTrl = replaceEventString(keyArray[i].evalfunc,
keyTarget.name, keyArray[i].field);
//if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false)) stopKeyPressEvent();
- if (keyArray[i].auxKey == "ctrlKey" && pushedKey.ctrlKey &&
!pushedKey.altKey && !pushedKey.shiftKey) {
+ if ((keyArray[i].auxKey == "ctrlKey" && pushedKey.ctrlKey &&
!pushedKey.altKey && !pushedKey.shiftKey) ||
+ (keyArray[i].auxKey == "altKey" && !pushedKey.ctrlKey &&
pushedKey.altKey && !pushedKey.shiftKey) ||
+ (keyArray[i].auxKey == "shiftKey" && !pushedKey.ctrlKey &&
!pushedKey.altKey && pushedKey.shiftKey) ||
+ (keyArray[i].auxKey == "ctrlKey+shiftKey" && pushedKey.ctrlKey
&& !pushedKey.altKey && pushedKey.shiftKey)) {
try {
eval(evalfuncTrl);
thereIsShortcut = true;
startKeyPressEvent();
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
+ if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false)) {
+ return false;
+ } else {
return true;
- } catch (e) {
- startKeyPressEvent();
- return true;
- }
- startKeyPressEvent();
- return true;
- } else if (keyArray[i].auxKey == "altKey" && !pushedKey.ctrlKey &&
pushedKey.altKey && !pushedKey.shiftKey) {
- try {
- eval(evalfuncTrl);
- thereIsShortcut = true;
- startKeyPressEvent();
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
- return true;
- } catch (e) {
- startKeyPressEvent();
- return true;
- }
- startKeyPressEvent();
- return true;
- } else if (keyArray[i].auxKey == "shiftKey" && !pushedKey.ctrlKey
&& !pushedKey.altKey && pushedKey.shiftKey) {
- try {
- eval(evalfuncTrl);
- thereIsShortcut = true;
- startKeyPressEvent();
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
- return true;
- } catch (e) {
- startKeyPressEvent();
- return true;
- }
- startKeyPressEvent();
- return true;
- } else if (keyArray[i].auxKey == "ctrlKey+shiftKey" &&
pushedKey.ctrlKey && !pushedKey.altKey && pushedKey.shiftKey) {
- try {
- eval(evalfuncTrl);
- thereIsShortcut = true;
- startKeyPressEvent();
- if ((!keyArray[i].propagateKey || isGridFocused) &&
!(keyArray[i].key == 'TAB' && isOBTabBehavior == false))
- return false; else
- return true;
+ }
} catch (e) {
startKeyPressEvent();
return true;
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits