Fixed issue 17440: Recent list doesn't show * when window is RO or SR.
authorGuillermo Álvarez de Eulate <guillermo.alvarez@openbravo.com>
Thu, 15 Mar 2012 16:21:46 +0100
changeset 16164 751bf1fee19a
parent 15717 952c381e3ada
child 16165 567bce8f1b68
Fixed issue 17440: Recent list doesn't show * when window is RO or SR.

Some parameters defined in menuItems are passed to openView function which generates the recent list
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-application-menu.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-application-menu.js	Thu Mar 29 16:27:56 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-application-menu.js	Thu Mar 15 16:21:46 2012 +0100
@@ -119,7 +119,7 @@
     var isClassicEnvironment = OB.Utilities.useClassicMode(item.windowId);
     var selectedView = isc.addProperties({}, item);
     if (item.tabId) {
-      selectedView = OB.Utilities.openView(item.windowId, item.tabId, item.title, null, null, item.icon);
+      selectedView = OB.Utilities.openView(item.windowId, item.tabId, item.title, null, null, item.icon, item.readOnly, item.singleRecord);
       selectedView.type = item.type;
       selectedView.icon = item.icon;
       if (selectedView) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js	Thu Mar 29 16:27:56 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js	Thu Mar 15 16:21:46 2012 +0100
@@ -241,7 +241,7 @@
             isc.OBQuickRun.currentQuickRun.doHide();
             var openObject = isc.addProperties({}, record);
             if (record.optionType && record.optionType === 'tab') {
-              openObject = OB.Utilities.openView(record.windowId, viewValue, record[OB.Constants.IDENTIFIER], null, this.command, record.icon);
+              openObject = OB.Utilities.openView(record.windowId, viewValue, record[OB.Constants.IDENTIFIER], null, this.command, record.icon, record.readOnly, record.singleRecord);
               if (openObject) {
                 OB.RecentUtilities.addRecent(this.recentPropertyName, openObject);
               }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Thu Mar 29 16:27:56 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Thu Mar 15 16:21:46 2012 +0100
@@ -367,7 +367,7 @@
 // ** {{{OB.Utilities.openView}}} **
 // Open a view taking into account if a specific window should be opened in classic mode or not.
 // Returns the object used to open the window.
-OB.Utilities.openView = function (windowId, tabId, tabTitle, recordId, command, icon) {
+OB.Utilities.openView = function (windowId, tabId, tabTitle, recordId, command, icon, readOnly, singleRecord) {
   var isClassicEnvironment = OB.Utilities.useClassicMode(windowId);
 
   var openObject;
@@ -392,7 +392,9 @@
       targetRecordId: recordId,
       targetTabId: tabId,
       tabTitle: tabTitle,
-      windowId: windowId
+      windowId: windowId,
+      readOnly: readOnly,
+      singleRecord: singleRecord
     };
   } else {
     openObject = {
@@ -401,7 +403,9 @@
       tabId: tabId,
       tabTitle: tabTitle,
       windowId: windowId,
-      icon: icon
+      icon: icon,
+      readOnly: readOnly,
+      singleRecord: singleRecord
     };
   }
   if (command) {