[Tree Extension] Adds styling to ob-tree
authorAugusto Mauch <augusto.mauch@openbravo.com>
Fri, 14 Feb 2014 10:05:57 +0100
changeset 22507 babab6914b4b
parent 22506 c852439d2ef1
child 22508 d02747fccff8
[Tree Extension] Adds styling to ob-tree
modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java
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.css
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/src/org/openbravo/client/application/ApplicationComponentProvider.java	Fri Feb 07 14:38:01 2014 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Fri Feb 14 10:05:57 2014 +0100
@@ -320,6 +320,10 @@
     globalResources.add(createStyleSheetResource(
         "web/org.openbravo.userinterface.smartclient/openbravo/skins/"
             + KernelConstants.SKIN_PARAMETER
+            + "/org.openbravo.client.application/ob-tree-grid-styles.css", false));
+    globalResources.add(createStyleSheetResource(
+        "web/org.openbravo.userinterface.smartclient/openbravo/skins/"
+            + KernelConstants.SKIN_PARAMETER
             + "/org.openbravo.client.application/ob-navigation-bar-styles.css", false));
     globalResources.add(createStyleSheetResource(
         "web/org.openbravo.userinterface.smartclient/openbravo/skins/"
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-grid.js	Fri Feb 07 14:38:01 2014 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-grid.js	Fri Feb 14 10:05:57 2014 +0100
@@ -26,7 +26,7 @@
   showDropIcons: false,
   nodeIcon: null,
   folderIcon: null,
-  showSortArrow: false,
+  showSortArrow: 'field',
   showRecordComponentsByCell: true,
   showRecordComponents: true,
   autoFetchTextMatchStyle: 'substring',
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-tree-grid-styles.css	Fri Feb 14 10:05:57 2014 +0100
@@ -0,0 +1,75 @@
+.OBTreeGridCell,
+.OBTreeGridCellOver,
+.OBTreeGridCellDark,
+.OBTreeGridCellOverDark,
+.OBTreeGridCellSelected,
+.OBTreeGridCellSelectedDark,
+.OBTreeGridCellSelectedOver,
+.OBTreeGridCellSelectedOverDark,
+.OBTreeGridCellDisabled,
+.OBTreeGridCellDisabledDark,
+
+.OBTreeGridCellSelectedViewInactive,
+.OBTreeGridCellSelectedViewInactiveDark,
+
+.OBTreeGridCellEdit,
+.OBTreeGridCellEditOver,
+.OBTreeGridCellEditDark,
+.OBTreeGridCellEditOverDark,
+.OBTreeGridCellEditSelected,
+.OBTreeGridCellEditSelectedDark,
+.OBTreeGridCellEditSelectedOver,
+.OBTreeGridCellEditSelectedOverDark,
+.OBTreeGridCellEditDisabled,
+.OBTreeGridCellEditDisabledDark,
+
+.OBTreeGridCellError,
+.OBTreeGridCellErrorOver,
+.OBTreeGridCellErrorDark,
+.OBTreeGridCellErrorOverDark,
+.OBTreeGridCellErrorSelected,
+.OBTreeGridCellErrorSelectedDark,
+.OBTreeGridCellErrorSelectedOver,
+.OBTreeGridCellErrorSelectedOverDark,
+.OBTreeGridCellErrorDisabled,
+.OBTreeGridCellErrorDisabledDark,
+
+.OBTreeGridCellErrorEdit,
+.OBTreeGridCellErrorEditOver,
+.OBTreeGridCellErrorEditDark,
+.OBTreeGridCellErrorEditOverDark,
+.OBTreeGridCellErrorEditSelected,
+.OBTreeGridCellErrorEditSelectedDark,
+.OBTreeGridCellErrorEditSelectedOver,
+.OBTreeGridCellErrorEditSelectedOverDark,
+.OBTreeGridCellErrorEditDisabled,
+.OBTreeGridCellErrorEditDisabledDark {
+  font-family: arial, sans-serif;
+  font-size: 12px;
+  vertical-align: middle;  
+  border: 1px solid #cdd7bb;
+  border-width: 0px 1px 1px 0px;
+  border-top-style:solid;
+  border-right-style:solid;
+  border-bottom-style:solid;
+  border-left-style:solid;  
+/*  margin: 0px; */
+  padding: 0px 4px 0px 4px;
+}
+
+.OBTreeGridHeaderCellTitle,
+.OBTreeGridHeaderCellTitleOver,
+.OBTreeGridHeaderCellTitleDown,
+.OBTreeGridHeaderCellTitleSelected,
+.OBTreeGridHeaderCellTitleSelectedOver,
+.OBTreeGridHeaderCellTitleSelectedDown,
+.OBTreeGridHeaderCellTitleDisabled,
+.OBTreeGridHeaderCellTitleSelectedDisabled {
+  font-size: 11px;
+  font-family: 'lucida sans', sans-serif;
+  font-weight: bold;
+  border: 1px solid #BBBFB6;
+  border-width: 0px 1px 0px 0px;
+  text-align: center;
+  background: none;
+}
\ No newline at end of file
--- 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 07 14:38:01 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	Fri Feb 14 10:05:57 2014 +0100
@@ -0,0 +1,59 @@
+isc.OBTreeGrid.addProperties({
+  bodyStyleName: 'OBGridBody',
+  baseStyle: 'OBTreeGridCell',
+  recordStyleError: 'OBGridCellError',
+  recordStyleSelectedViewInActive: 'OBGridCellSelectedViewInactive',
+  headerBaseStyle: 'OBGridHeaderCell',
+  headerBarStyle: 'OBGridHeaderBar',
+  headerTitleStyle: 'OBGridHeaderCellTitle',
+  emptyMessageStyle: 'OBGridNotificationText',
+  emptyMessageLinkStyle: 'OBGridNotificationTextLink',
+  cellPadding: 0,
+  /* Set in the CSS */
+  cellAlign: 'center',
+  leaveHeaderMenuButtonSpace: false,
+  sortAscendingImage: {
+    src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_sortAscending.png',
+    width: 7,
+    height: 11
+  },
+  sortDescendingImage: {
+    src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeader_sortDescending.png',
+    width: 7,
+    height: 11
+  },
+  headerMenuButtonConstructor: 'OBGridHeaderImgButton',
+  headerButtonConstructor: 'ImgButton',
+  headerMenuButtonWidth: 17,
+  headerMenuButtonSrc: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/grid/gridHeaderMenuButton.png',
+  hoverWidth: 200
+});
+
+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.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.addProperties({
+  // note should be the same as the height of the OBGridButtonsComponent
+  recordComponentHeight: 21,
+  cellHeight: 25,
+  bodyStyleName: 'OBViewGridBody'
+});
\ No newline at end of file