details: https://code.openbravo.com/erp/devel/pi/rev/1f040a883f1c
changeset: 14274:1f040a883f1c
user: David Baz Fayos <david.baz <at> openbravo.com>
date: Wed Nov 16 22:04:56 2011 +0100
summary: Fixed issue 19091: Now 'Scan for updates' works ok in IE
diffstat:
src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html | 4 +-
src/org/openbravo/erpCommon/security/Login.html | 2 +-
src/org/openbravo/erpCommon/security/Login_F1.html | 2 +-
web/js/utils.js | 38
+++++++++-
4 files changed, 41 insertions(+), 5 deletions(-)
diffs (97 lines):
diff -r 7a476dc0a21d -r 1f040a883f1c
src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html
Wed Nov 16 20:29:57 2011 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagementInstalled.html
Wed Nov 16 22:04:56 2011 +0100
@@ -97,12 +97,12 @@
jsonResponse = eval("(" + XMLHttpRequestObj.responseText + ")");
// revert all tree item icons to default state
- var treeItems = document.getElementsByClassName('Tree_Row');
+ var treeItems = getElementsByClassName('Tree_Row');
for (i=1;i<treeItems.length;i++) {
treeItemChildren = treeItems[i].childNodes;
for (j=1;j<treeItemChildren.length;j++) {
- if(treeItemChildren[j].id == "icon"){
+ if (treeItemChildren[j].id === 'icon' &&
treeItemChildren[j].childNodes[1]) {
treeItemChildren[j].childNodes[1].setAttribute("class","");
}
}
diff -r 7a476dc0a21d -r 1f040a883f1c
src/org/openbravo/erpCommon/security/Login.html
--- a/src/org/openbravo/erpCommon/security/Login.html Wed Nov 16 20:29:57
2011 +0100
+++ b/src/org/openbravo/erpCommon/security/Login.html Wed Nov 16 22:04:56
2011 +0100
@@ -390,7 +390,7 @@
}
catch (e) { }
- if ((!revisionControl('14212')) || (isOpsInstance() !=
isOpsInstanceCached())) {
+ if ((!revisionControl('14274')) || (isOpsInstance() !=
isOpsInstanceCached())) {
maskLoginWindow(cacheMsg);
setLoginMessage('Warning', '', cacheMsg);
}
diff -r 7a476dc0a21d -r 1f040a883f1c
src/org/openbravo/erpCommon/security/Login_F1.html
--- a/src/org/openbravo/erpCommon/security/Login_F1.html Wed Nov 16
20:29:57 2011 +0100
+++ b/src/org/openbravo/erpCommon/security/Login_F1.html Wed Nov 16
22:04:56 2011 +0100
@@ -126,7 +126,7 @@
clearForm();
} catch (e) {}
setWindowElementFocus('firstElement');
- if ((!revisionControl('14212')) || (isOpsInstance() !=
isOpsInstanceCached())) {
+ if ((!revisionControl('14274')) || (isOpsInstance() !=
isOpsInstanceCached())) {
alert(cacheMsg);
}
diff -r 7a476dc0a21d -r 1f040a883f1c web/js/utils.js
--- a/web/js/utils.js Wed Nov 16 20:29:57 2011 +0100
+++ b/web/js/utils.js Wed Nov 16 22:04:56 2011 +0100
@@ -95,7 +95,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 = '14212';
+ var number = '14274';
return number;
}
@@ -260,6 +260,42 @@
/**
+* Get the array of elements with a given name and tag. Its purpose is to
supply the lack of document.getElementsByClassName support in IE
+* @param {className} string Required - The desired className to search
+* @param {tag} string Required - The tag of the desired className array
+*/
+function getElementsByClassName(className, tag) {
+ var resultArray = [], classAttributeName;
+ if (navigator.userAgent.toUpperCase().indexOf('MSIE') !== -1) {
+ classAttributeName = 'className';
+ } else {
+ classAttributeName = 'class';
+ }
+ if (!tag) {
+ if (navigator.userAgent.toUpperCase().indexOf('MSIE') !== -1) {
+ var inputs = document.all;
+ for (var i=0; i<inputs.length; i++) {
+ if (inputs.item(i).getAttribute(classAttributeName) === className){
+ resultArray.push(inputs.item(i));
+ }
+ }
+ } else {
+ resultArray = document.getElementsByClassName(className);
+ }
+ } else {
+ tag = tag.toLowerCase()
+ var inputs = document.getElementsByTagName(tag);
+ for (var i=0; i<inputs.length; i++) {
+ if (inputs.item(i).getAttribute(classAttributeName) === className){
+ resultArray.push(inputs.item(i));
+ }
+ }
+ }
+ return resultArray;
+}
+
+
+/**
* Set the focus on the first visible control in the form
* @param {Form} form Optional- Defines the form containing the field, where we
want to set the focus. If is not present, the first form of the page will be
used.
* @param {String} field Optional - Name of the control where we want to set
the focus. If is not present the first field will be used.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure
contains a definitive record of customers, application performance,
security threats, fraudulent activity, and more. Splunk takes this
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits