details: /erp/devel/pi/rev/9c8382863b3b
changeset: 12207:9c8382863b3b
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue May 17 21:05:00 2011 +0200
summary: Related to issue 17202. Prevent wrong call to the FIC in SETSESSION
mode when a new record is created in the grid.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
| 59 +---------
1 files changed, 2 insertions(+), 57 deletions(-)
diffs (83 lines):
diff -r 149e42c3f674 -r 9c8382863b3b
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Tue May 17 19:02:06 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-standard-view.js
Tue May 17 21:05:00 2011 +0200
@@ -1019,7 +1019,8 @@
this.updateLastSelectedState();
this.updateTabTitle();
- this.toolBar.updateButtonState(this.isEditingGrid || this.isShowingForm ||
this.viewForm.isNewRecord());
+ // note only set session info if there is a record selected
+ this.toolBar.updateButtonState(!selectedRecordId || this.isEditingGrid ||
this.isShowingForm);
var tabViewPane = null, i;
@@ -1034,9 +1035,6 @@
}
}
delete this.isOpenDirectModeParent;
-
- // and recompute the count:
- this.updateChildCount();
},
hasSelectionStateChanged: function() {
@@ -1069,59 +1067,6 @@
return this.parentView.viewGrid.getSelectedRecord();
},
-
- updateChildCount: function(){
- // note disabled for now
- if (true) {
- return;
- }
- if (!this.childTabSet) {
- return;
- }
- if (this.viewGrid.getSelectedRecords().length !== 1) {
- return;
- }
-
- var infoByTab = [], tabInfo, childView, data = {}, me = this, callback, i;
-
- data.parentId = this.getParentId();
-
- for (i = 0; i < this.childTabSet.tabs.length; i++) {
- tabInfo = {};
- childView = this.childTabSet.tabs[i].pane;
- tabInfo.parentProperty = childView.parentProperty;
- tabInfo.tabId = childView.tabId;
- tabInfo.entity = childView.entity;
- if (childView.viewGrid.whereClause) {
- tabInfo.whereClause = childView.viewGrid.whereClause;
- }
- infoByTab.push(tabInfo);
- }
- data.tabs = infoByTab;
-
- // walks through the tabs and sets the title
- callback = function(resp, data, req){
- var tab, tabPane;
- var tabInfos = data.result, i;
- if (!tabInfos || tabInfos.length !== me.childTabSet.tabs.length) {
- // error, something has changed
- return;
- }
- for (i = 0; i < me.childTabSet.tabs.length; i++) {
- childView = me.childTabSet.tabs[i].pane;
- tab = me.childTabSet.getTab(i);
- if (childView.tabId === tabInfos[i].tabId) {
- tabPane = me.childTabSet.getTabPane(tab);
- tabPane.recordCount = tabInfos[i].count;
- tabPane.updateTabTitle();
- }
- }
- };
-
- var props = this.getContextInfo(true, false);
-
-
OB.RemoteCallManager.call('org.openbravo.client.application.ChildTabRecordCounterActionHandler',
data, props, callback, null);
- },
updateTabTitle: function(){
var prefix = '', postFix;
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits