Changeset 15711 for trunk/templates
- Timestamp:
- 11/29/11 00:03:24 (6 months ago)
- Location:
- trunk/templates/base
- Files:
-
- 4 edited
-
css/default.css (modified) (1 diff)
-
css/grid.css (modified) (2 diffs)
-
grid.html (modified) (3 diffs)
-
scripts/BxBaseGrid.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/templates/base/css/default.css
r15675 r15711 105 105 106 106 .bx-def-color-bg-hl { 107 background-color: #f8f8ff;107 background-color: rgba(200, 200, 255, 0.2); 108 108 } 109 109 110 110 .bx-def-color-bg-active { 111 111 background-color: #ffbb33; 112 } 113 114 /* hr */ 115 116 .bx-def-hr { 117 margin-left:0; 118 margin-right:0; 119 padding:0; 120 border:none; 121 border-top:1px solid #dddddd; 122 border-bottom:1px solid #ffffff; 123 border-top:1px solid rgba(200, 200, 200, 0.5); 124 border-bottom:1px solid rgba(255, 255, 255, 0.8); 112 125 } 113 126 -
trunk/templates/base/css/grid.css
r15704 r15711 5 5 } 6 6 7 .bx-grid-table-wrapper .bx-def-hr { 8 margin:0; 9 } 10 11 .bx-grid-table .bx-grid-table-row-hr td:first-child, 12 .bx-grid-table .bx-grid-table-row-hr td { 13 padding:0; 14 } 7 15 8 16 .bx-grid-table-row-trans { … … 11 19 -o-transition:background-color 1s linear; 12 20 transition:background-color 1s linear; 21 } 22 23 .bx-grid-table .bx-grid-table-row-empty td { 24 text-align:center; 13 25 } 14 26 -
trunk/templates/base/grid.html
r15704 r15711 21 21 </bx_if:display_header> 22 22 23 <div id="__id_cont__"> 23 <div id="__id_cont__" class="bx-grid-table-wrapper bx-def-margin-top"> 24 25 <hr class="bx-def-hr" /> 24 26 25 <table id="__id_table__" class="bx-grid-table bx-def-margin-bottom bx-def-margin-top">26 <thead class="bx-def-border-bottom bx-def-border-top">27 <table id="__id_table__" class="bx-grid-table"> 28 <thead> 27 29 <tr> 28 30 <bx_repeat:row_header> … … 30 32 </bx_repeat:row_header> 31 33 </tr> 32 </thead> 33 <tbody class="bx-def-border-bottom"> 34 <tr class="bx-grid-table-row-hr"> 35 <td colspan="__columns__"><hr class="bx-def-hr" /></td> 36 </tr> 37 </thead> 38 <tbody> 34 39 <bx_repeat:rows_data> 35 40 <tr id="__id_row__" class="__row_class__"> … … 40 45 </table> 41 46 42 <div class="bx-grid-footer bx-def-margin-bottom"> 47 <hr class="bx-def-hr" /> 48 49 <div class="bx-grid-footer bx-def-margin-bottom bx-def-margin-sec-top"> 43 50 <bx_if:actions_bulk> 44 51 <div style="float:left;"> -
trunk/templates/base/scripts/BxBaseGrid.php
r15706 r15711 256 256 protected function _getRowsDataDesign (&$aData) { 257 257 $aGrid = array(); 258 foreach ($aData as $aRow) { 259 $sRow = ''; 260 foreach ($this->_aOptions['fields'] as $sKey => $aField) 261 $sRow .= $this->_getCellDesign($sKey, $aField, $aRow); 262 $aGrid[] = array('row' => $sRow, 'id_row' => $this->_sObject . '_row_' . $aRow[$this->_aOptions['field_id']], 'row_class' => $this->_isRowDisabled($aRow) ? 'bx-grid-row-disabled bx-def-font-grayed' : ''); 263 } 258 if (empty($aData)) { 259 260 $aGrid[] = array( 261 'row' => '<td class="bx-def-padding-sec-bottom bx-def-padding-sec-top" colspan="' . count($this->_aOptions['fields']) . '">' . _t('_Empty') . '</td>', 262 'id_row' => 0, 263 'row_class' => 'bx-grid-table-row-empty', 264 ); 265 266 } else { 267 268 foreach ($aData as $aRow) { 269 $sRow = ''; 270 foreach ($this->_aOptions['fields'] as $sKey => $aField) 271 $sRow .= $this->_getCellDesign($sKey, $aField, $aRow); 272 273 $aGrid[] = array( 274 'row' => $sRow, 275 'id_row' => $this->_sObject . '_row_' . $aRow[$this->_aOptions['field_id']], 276 'row_class' => $this->_isRowDisabled($aRow) ? 'bx-grid-table-row-disabled bx-def-font-grayed' : '', 277 ); 278 } 279 } 264 280 return $aGrid; 265 281 } … … 306 322 isset($aField['width']) ? 'width:' . $aField['width'] : false // add default styles 307 323 ); 308 return '<td ' . $sAttr . '>' . $this->_getActions('single', $aRow[$this->_aOptions['field_id']], true, $this->_isRowDisabled($aRow) ) . '</td>';324 return '<td ' . $sAttr . '>' . $this->_getActions('single', $aRow[$this->_aOptions['field_id']], true, $this->_isRowDisabled($aRow), $aRow) . '</td>'; 309 325 } 310 326 … … 319 335 320 336 321 protected function _getActions ($sType, $sActionData = false, $isSmall = false, $isDisabled = false ) {337 protected function _getActions ($sType, $sActionData = false, $isSmall = false, $isDisabled = false, $aRow = array()) { 322 338 $sActionsType = 'actions_' . $sType; 323 339 if (empty($this->_aOptions[$sActionsType]) || !is_array($this->_aOptions[$sActionsType])) … … 335 351 $a['attr']['bx_grid_action_confirm'] = $a['confirm'] ? 1 : 0; 336 352 } 337 $sRet .= $this->$sFunc($sType, $sKey, $a, $isSmall, $isDisabled );353 $sRet .= $this->$sFunc($sType, $sKey, $a, $isSmall, $isDisabled, $aRow); 338 354 } 339 355 return $sRet; 340 356 } 341 357 342 protected function _getActionDefault ($sType, $sKey, $a, $isSmall = false, $isDisabled = false ) {358 protected function _getActionDefault ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) { 343 359 $sAttr = $this->_convertAttrs( 344 360 $a, 'attr', … … 348 364 } 349 365 350 protected function _getActionDivider ($sType, $sKey, $a, $isSmall = false, $isDisabled = false ) {366 protected function _getActionDivider ($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array()) { 351 367 return '<div class="bx-grid-actions-divider bx-def-margin-sec-left"> | </div>'; 352 368 }
Note: See TracChangeset
for help on using the changeset viewer.