details: /erp/devel/pi/rev/0bb5ac454ee1
changeset: 12184:0bb5ac454ee1
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue May 17 09:48:59 2011 +0200
summary: Fixes issue 16611: Initial request done by UI selector element in
form view does not use any filters or paging
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
| 15 +++++++++-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
| 4 +-
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
| 13 +++++---
3 files changed, 24 insertions(+), 8 deletions(-)
diffs (82 lines):
diff -r 9f8a30621e41 -r 0bb5ac454ee1
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Tue May 17 08:34:13 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-grid.js
Tue May 17 09:48:59 2011 +0200
@@ -207,7 +207,20 @@
return this.Super('setValuesAsCriteria', [criteria, refresh]);
},
-
+
+ // the filtereditor will assign the grids datasource to a field
+ // if it has a display field and no datasource
+ // prevent this as we get the datasource later it is not
+ // yet set
+ getEditorProperties : function (field) {
+ var noDataSource = field.displayField && !field.optionDataSource,
+ ret = this.Super('getEditorProperties', arguments);
+ if (ret.optionDataSource && noDataSource) {
+ delete ret.optionDataSource;
+ }
+ return ret;
+ },
+
actionButtonProperties: {
baseStyle: 'OBGridFilterFunnelIcon',
visibility: 'hidden',
diff -r 9f8a30621e41 -r 0bb5ac454ee1
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Tue May 17 08:34:13 2011 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form.js
Tue May 17 09:48:59 2011 +0200
@@ -660,10 +660,10 @@
if (this.getFocusItem()) {
if (this.allItemsDisabled) {
this.getFocusItem().blurItem();
- this.redraw();
+ this.setHandleDisabled(state);
this.view.viewGrid.refreshEditRow();
} else {
- this.redraw();
+ this.setHandleDisabled(state);
this.view.viewGrid.refreshEditRow();
// reset the canfocus
for (i = 0; i < this.getFields().length; i++) {
diff -r 9f8a30621e41 -r 0bb5ac454ee1
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
Tue May 17 08:34:13 2011 +0200
+++
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
Tue May 17 09:48:59 2011 +0200
@@ -78,7 +78,7 @@
useClientFiltering: false,
useClientSorting: false
},
-
+
width: this.selectorGridProperties.width,
height: this.selectorGridProperties.height,
alternateRecordStyles: this.selectorGridProperties.alternateRecordStyles,
@@ -337,13 +337,16 @@
// get the display value
// https://issues.openbravo.com/view.php?id=16611
setValue: function(newValue) {
+ if (!this.valueMap) {
+ this.valueMap = {};
+ }
if (this.form && this.form.getValues() && this.form.getValues()[this.name]
=== newValue &&
this.form.getValues()[this.name + '._identifier']) {
- if (!this.valueMap) {
- this.valueMap = {};
- }
this.valueMap[newValue] = this.form.getValues()[this.name +
'._identifier'];
}
+ if (newValue === '') {
+ this.valueMap[newValue] = '';
+ }
this.Super('setValue', arguments);
},
@@ -480,7 +483,7 @@
return ret;
},
- filterDataBoundPickList : function (requestProperties, dropCache){
+ filterDataBoundPickList: function (requestProperties, dropCache){
requestProperties = requestProperties || {};
requestProperties.params = requestProperties.params || {};
------------------------------------------------------------------------------
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