Related to issue 25343: JSlint fixed on messageInterval
authorGuillermo Gil <guillermo.gil@openbravo.com>
Wed, 09 Apr 2014 08:27:03 +0200
changeset 22890 8552c3633a70
parent 22889 4a57750631e2
child 22891 c0638f312efc
child 23547 549ac1107afe
Related to issue 25343: JSlint fixed on messageInterval
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-action-def.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-action-def.js	Tue Apr 08 19:19:23 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-action-def.js	Wed Apr 09 08:27:03 2014 +0200
@@ -47,16 +47,17 @@
     view.messageBar.setMessage(paramObj.msgType, paramObj.msgTitle, paramObj.msgText);
   } else { // If the window is not loaded, wait and try again
     var i = 0,
-        messageInterval = setInterval(function () {
-        view = OB.MainView.TabSet.getSelectedTab().pane.activeView;
-        if (view && view.messageBar) {
-          clearInterval(messageInterval);
-          view.messageBar.setMessage(paramObj.msgType, paramObj.msgTitle, paramObj.msgText);
-        } else if (i === 5) {
-          clearInterval(messageInterval);
-        }
-        i++;
-      }, 500); //Call this action again with a 500ms delay
+        messageInterval;
+    messageInterval = setInterval(function () {
+      view = OB.MainView.TabSet.getSelectedTab().pane.activeView;
+      if (view && view.messageBar) {
+        clearInterval(messageInterval);
+        view.messageBar.setMessage(paramObj.msgType, paramObj.msgTitle, paramObj.msgText);
+      } else if (i === 5) {
+        clearInterval(messageInterval);
+      }
+      i++;
+    }, 500); //Call this action again with a 500ms delay
   }
 });