details: https://code.openbravo.com/erp/devel/pi/rev/f9d149854a7f
changeset: 17581:f9d149854a7f
user: Martin Taal <martin.taal <at> openbravo.com>
date: Tue Jul 31 15:20:54 2012 +0200
summary: Fixes issue 21249: Wrong grid layout when restoring original view in
grid
Filtereditor had focus, unfocus during set viewstate resulted in an error
because
the filtereditor was using an old field definition, resolve by resetting focus
and then recomputing it after viewstate. Recompute focus after viewstate needs
to
be done anyway as the setviewstate can have removed the current focus field.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
| 11 ++++++++++
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
| 4 +++
2 files changed, 15 insertions(+), 0 deletions(-)
diffs (35 lines):
diff -r f7250e458578 -r f9d149854a7f
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
Tue Jul 31 12:18:51 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
Tue Jul 31 15:20:54 2012 +0200
@@ -541,6 +541,17 @@
delete localState.selected;
this.deselectAllRecords();
+ // remove focus as this results in blur behavior before the
+ // (filter)editor is redrawn with new fields when
+ // doing setviewstate
+ // https://issues.openbravo.com/view.php?id=21249
+ if (this.getEditForm() && this.getEditForm().getFocusItem()) {
+ this.getEditForm().getFocusItem().hasFocus = false;
+ }
+ if (this.filterEditor && this.filterEditor.getEditForm() &&
this.filterEditor.getEditForm().getFocusItem()) {
+ this.filterEditor.getEditForm().getFocusItem().hasFocus = false;
+ }
+
this.deleteSelectedParentRecordFilter(localState);
this.Super('setViewState', ['(' + isc.Comm.serialize(localState, false)
+ ')']);
diff -r f7250e458578 -r f9d149854a7f
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
Tue Jul 31 12:18:51 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
Tue Jul 31 15:20:54 2012 +0200
@@ -410,6 +410,10 @@
return 1;
});
}
+
+ // restore focus as the focusitem may have been hidden now
+ // https://issues.openbravo.com/view.php?id=21249
+ this.setFocusInView();
},
clearLastViewPersonalization: function () {
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits