details:   https://code.openbravo.com/erp/devel/pi/rev/cdcbb0c7f479
changeset: 15474:cdcbb0c7f479
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Tue Feb 14 15:10:03 2012 +0100
summary:   Fixes issue 19730: Focus now stars in first filter editor field

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
      |  3 ++-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
 |  5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r f4324ff133a7 -r cdcbb0c7f479 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
  Tue Feb 14 14:13:35 2012 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js
  Tue Feb 14 15:10:03 2012 +0100
@@ -127,7 +127,8 @@
       length = items.length;
       for (i = 0; i < length; i++) {
         item = items[i];
-        if (item.getCanFocus() && !item.isDisabled()) {
+        // The first filterable item (editorType!=='StaticTextItem') should be 
focused
+        if (item.getCanFocus() && !item.isDisabled() && 
item.editorType!=='StaticTextItem') {
           this.focusInFilterEditor(item);
           return true;
         }
diff -r f4324ff133a7 -r cdcbb0c7f479 
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 Feb 14 14:13:35 2012 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
     Tue Feb 14 15:10:03 2012 +0100
@@ -501,6 +501,11 @@
       this.deleteSelectedParentRecordFilter(localState);
 
       this.Super('setViewState', ['(' + isc.Comm.serialize(localState, false) 
+ ')']);
+      
+      // Focus on the first filterable item
+      if (this.view.isActiveView()) {
+        this.focusInFirstFilterEditor();  
+      }      
     }
 
     if (localState.noFilterClause) {

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to