details: https://code.openbravo.com/erp/devel/pi/rev/b311c5f17ac7
changeset: 16716:b311c5f17ac7
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Thu May 31 14:15:46 2012 +0200
summary: Fixes issue 20651: Shortcuts applied to proper view
Prior to this fix, the shortcuts were beign applied to the active view of the
last opened window, even it the focus was in another window.
This has been solved by enabling the shorcuts of the grid and form views every
time its standard view gets the focus.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
| 2 +-
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
| 9 +++++++++
2 files changed, 10 insertions(+), 1 deletions(-)
diffs (31 lines):
diff -r cf3e984e1fae -r b311c5f17ac7
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
Thu May 31 11:28:27 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
Thu May 31 14:15:46 2012 +0200
@@ -377,7 +377,7 @@
draw: function () {
var drawnBefore = this.isDrawn(),
i, form, item, items, length;
-
+ this.enableShortcuts();
this.Super('draw', arguments);
// set the focus in the filter editor
diff -r cf3e984e1fae -r b311c5f17ac7
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Thu May 31 11:28:27 2012 +0200
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
Thu May 31 14:15:46 2012 +0200
@@ -665,6 +665,15 @@
this.lastFocusedItem = null;
}
+ // Enable the shortcuts of the form and grid view
+ // See issue 20651 (https://issues.openbravo.com/view.php?id=20651)
+ if (this.viewForm && this.viewForm.enableShortcuts) {
+ this.viewForm.enableShortcuts();
+ }
+ if (this.viewGrid && this.viewGrid.enableShortcuts) {
+ this.viewGrid.enableShortcuts();
+ }
+
if (this.isShowingForm && this.viewForm && this.viewForm.getFocusItem()) {
object = this.viewForm.getFocusItem();
functionName = 'focusInItem';
------------------------------------------------------------------------------
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