[Tree Extension] New row toolbar button is not shown if tree grid view is shown
authorAugusto Mauch <augusto.mauch@openbravo.com>
Wed, 05 Feb 2014 10:28:22 +0100
changeset 22502 aa993fc56d66
parent 22501 e0c8171836c2
child 22503 d3e9610a24ee
[Tree Extension] New row toolbar button is not shown if tree grid view is shown
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Wed Jan 29 19:09:19 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Wed Feb 05 10:28:22 2014 +0100
@@ -123,7 +123,7 @@
     updateState: function () {
       var view = this.view,
           selectedRecords = view.viewGrid.getSelectedRecords();
-      this.setDisabled(view.viewGrid.isGrouped || view.isShowingForm || view.readOnly || view.editOrDeleteOnly || view.singleRecord || !view.hasValidState() || (selectedRecords && selectedRecords.length > 1));
+      this.setDisabled(view.viewGrid.isGrouped || view.isShowingForm || view.readOnly || view.editOrDeleteOnly || view.singleRecord || !view.hasValidState() || (selectedRecords && selectedRecords.length > 1) || view.isShowingTree);
     },
     keyboardShortcutId: 'ToolBar_NewRow'
   },