details: https://code.openbravo.com/erp/devel/pi/rev/55c319563446 changeset: 29953:55c319563446 user: Carlos Aristu <carlos.aristu <at> openbravo.com> date: Wed Aug 31 10:27:37 2016 +0200 summary: related to issue 33775: backed out changes
Backed out changes as the problem is still reproducible diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js | 3 +- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js | 11 +--- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js | 33 +--------- modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-recent-utilities.js | 7 +- 4 files changed, 5 insertions(+), 49 deletions(-) diffs (116 lines): diff -r 71d43f621ba5 -r 55c319563446 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Wed Aug 31 08:37:02 2016 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Wed Aug 31 10:27:37 2016 +0200 @@ -1705,9 +1705,8 @@ delete this.isOpenDirectModeLeaf; } - if (this.targetOpenNewEdit || this.view.deferOpenNewEdit) { + if (this.targetOpenNewEdit) { delete this.targetOpenNewEdit; - delete this.view.deferOpenNewEdit; // not passing record opens new this.view.editRecord(); } else if (this.targetOpenGrid) { diff -r 71d43f621ba5 -r 55c319563446 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js Wed Aug 31 08:37:02 2016 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js Wed Aug 31 10:27:37 2016 +0200 @@ -94,9 +94,6 @@ if (this.command === isc.OBStandardWindow.COMMAND_NEW) { this.viewProperties.allowDefaultEditMode = false; } - if (this.deferOpenNewEdit) { - this.viewProperties.deferOpenNewEdit = this.deferOpenNewEdit; - } if (OB.Utilities.checkProfessionalLicense(null, true)) { this.viewState = OB.PropertyStore.get('OBUIAPP_GridConfiguration', this.windowId); @@ -1181,13 +1178,7 @@ } } else if (this.command === isc.OBStandardWindow.COMMAND_NEW) { var currentView = this.activeView || this.view; - if (this.deferOpenNewEdit) { - // if deferOpenNewEdit is enabled, the form opening in NEW mode is postponed - // the form will be opened once the window view is completely loaded (including its saved views, if any) - delete this.deferOpenNewEdit; - } else { - currentView.editRecord(); - } + currentView.editRecord(); this.command = null; } else { this.setFocusInView(this.view); diff -r 71d43f621ba5 -r 55c319563446 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js Wed Aug 31 08:37:02 2016 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js Wed Aug 31 10:27:37 2016 +0200 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2011-2016 Openbravo SLU + * All portions are Copyright (C) 2011-2014 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -266,7 +266,7 @@ isc.OBQuickRun.currentQuickRun.doHide(); var openObject = isc.addProperties({}, record); if (record.optionType && record.optionType === 'tab') { - openObject = this.openViewUsingRecordInfo(record, this.command); + openObject = OB.Utilities.openView(record.windowId, viewValue, record[OB.Constants.IDENTIFIER], null, this.command, record.icon, record.readOnly, record.singleRecord, null, record.editOrDeleteOnly); if (openObject) { OB.RecentUtilities.addRecent(this.recentPropertyName, openObject); } @@ -348,35 +348,6 @@ } }, - openViewUsingRecordInfo: function (record, command) { - var openObject = { - windowId: record.windowId, - tabId: record.viewValue, - id: record.viewValue, - tabTitle: record[OB.Constants.IDENTIFIER], - icon: record.icon - }; - - if (OB.Utilities.useClassicMode(record.windowId)) { - openObject.viewId = 'OBClassicWindow'; - openObject.command = 'DEFAULT'; - } else { - openObject.viewId = '_' + record.windowId; - openObject.readOnly = record.readOnly; - openObject.singleRecord = record.singleRecord; - openObject.editOrDeleteOnly = record.editOrDeleteOnly; - if (command) { - openObject.command = command; - if (command === isc.OBStandardWindow.COMMAND_NEW) { - openObject.deferOpenNewEdit = true; - } - } - } - - OB.Layout.ViewManager.openView(openObject.viewId, openObject); - return openObject; - }, - handleKeyPress: function () { var result = this.Super('handleKeyPress', arguments); diff -r 71d43f621ba5 -r 55c319563446 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-recent-utilities.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-recent-utilities.js Wed Aug 31 08:37:02 2016 +0200 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-recent-utilities.js Wed Aug 31 10:27:37 2016 +0200 @@ -133,12 +133,7 @@ } } } - currentRecentValue[0] = isc.clone(choiceObject); - if (propertyName !== 'UINAVBA_RecentCreateList' && currentRecentValue[0].deferOpenNewEdit) { - // keep deferOpenNewEdit property just for 'Create New' recent entries - // it should not be used for the rest of the recent entries - delete currentRecentValue[0].deferOpenNewEdit; - } + currentRecentValue[0] = choiceObject; currentRecentValue.length = newLength; OB.PropertyStore.set(propertyName, currentRecentValue); } ------------------------------------------------------------------------------ _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits