Fixes issue 18030: When using a modal popup a new tab with the loading bar is shown
authorMartin Taal <martin.taal@openbravo.com>
Thu, 21 Jul 2011 16:44:52 +0200
changeset 13236 573d6f683a8f
parent 13235 9f71839151a7
child 13237 dfe885fd7ad8
Fixes issue 18030: When using a modal popup a new tab with the loading bar is shown
button popup now passes popup parameter, now correctly removes loading tab if one is there, added extra parameter to prevent loadingtab
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Wed Jul 20 17:29:45 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Thu Jul 21 16:44:52 2011 +0200
@@ -85,6 +85,7 @@
             obManualURL: this.obManualURL, 
             processId: this.id,
             id: this.id,
+            popup: true,
             command: this.command,
             tabTitle: this.title,
             postParams: allProperties,
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js	Wed Jul 20 17:29:45 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-view-manager.js	Thu Jul 21 16:44:52 2011 +0200
@@ -271,7 +271,7 @@
           
           if (loadingTab) {
             viewTabId = loadingTab.pane.viewTabId;
-          } else if (!params.popup) {           
+          } else if (!params.popup && viewName !== 'OBPopupClassicWindow' && !params.showsItself) {           
             viewTabId = vmgr.views.getViewTabID(viewName, params);
             if (viewTabId) {
               // tab exists, replace its contents
@@ -320,7 +320,7 @@
           if (viewInstance && viewInstance.show && viewInstance.showsItself) {
             if (loadingTab) {
               delete params.loadingTabId;
-              OB.MainView.TabSet.removeTab(loadingTab.viewTabId);
+              OB.MainView.TabSet.removeTab(loadingTab.ID);
             }
             viewInstance.show();
             return;