[Tree Extension] More Styling: filter icon and sorter are styled properly
authorAugusto Mauch <augusto.mauch@openbravo.com>
Mon, 17 Feb 2014 16:20:12 +0100
changeset 22509 aa1a521341ed
parent 22508 d02747fccff8
child 22510 1e1e9902d388
[Tree Extension] More Styling: filter icon and sorter are styled properly
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-grid.js
modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-tree-grid-styles.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-grid.js	Fri Feb 14 14:30:04 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-grid.js	Mon Feb 17 16:20:12 2014 +0100
@@ -26,7 +26,7 @@
   showDropIcons: false,
   nodeIcon: null,
   folderIcon: null,
-  showSortArrow: 'field',
+  showSortArrow: 'both',
   showRecordComponentsByCell: true,
   showRecordComponents: true,
   autoFetchTextMatchStyle: 'substring',
@@ -37,6 +37,12 @@
     parentIdField: 'parentId',
     openProperty: 'isOpen'
   },
+  
+
+  initWidget: function () {
+      this.sorterDefaults = {};
+      this.Super('initWidget', arguments);
+  },
 
   /**
    * When the grid is filtered, show the records that did not comply with the filter (but were ancestors of nodes that did) in grey
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-tree-grid-styles.js	Fri Feb 14 14:30:04 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-tree-grid-styles.js	Mon Feb 17 16:20:12 2014 +0100
@@ -30,26 +30,40 @@
 });
 
 isc.OBTreeGrid.changeDefaults('headerButtonDefaults', {
-	  showTitle: true,
-	  showDown: true,
-	  showFocused: false,
-	  // baseStyle / titleStyle is auto-assigned from headerBaseStyle
-	  src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_bg.png'
+  showTitle: true,
+  showDown: true,
+  showFocused: false,
+  // baseStyle / titleStyle is auto-assigned from headerBaseStyle
+  src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_bg.png'
 });
 
 isc.OBTreeGrid.changeDefaults('headerMenuButtonDefaults', {
-	  showDown: false,
-	  showTitle: true
-	  //src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_bg.png'
+  showDown: false,
+  showTitle: true
+  //src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_bg.png'
 });
 
-isc.OBTreeGrid.changeDefaults('sorterDefaults', {
-	  // baseStyle / titleStyle is auto-assigned from headerBaseStyle
-	  showFocused: false,
-	  //  src: '[SKIN]ListGrid/header.png',
-	  src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_bg.png',
-	  baseStyle: 'OBGridSorterButton'
-	});
+isc.OBTreeGrid.changeDefaults('sorterDefaults', {});
+
+isc.OBTreeGrid.changeDefaults('filterEditorDefaults', {
+  height: 22,
+  styleName: 'OBGridFilterBase',
+  baseStyle: 'OBGridFilterCell'
+});
+
+isc.OBTreeGrid.changeDefaults('headerButtonDefaults', {
+  showTitle: true,
+  showDown: true,
+  showFocused: false,
+  // baseStyle / titleStyle is auto-assigned from headerBaseStyle
+  src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_bg.png'
+});
+
+isc.OBTreeGrid.changeDefaults('headerMenuButtonDefaults', {
+  showDown: false,
+  showTitle: true
+//  src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_bg.png'
+});
 
 isc.OBTreeGrid.addProperties({
   // note should be the same as the height of the OBGridButtonsComponent