- Timestamp:
- 02/03/12 00:45:12 (4 months ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
inc/classes/BxDolPage.php (modified) (1 diff)
-
inc/js/classes/BxDolGrid.js (modified) (1 diff)
-
samples/form_objects.php (modified) (1 diff)
-
studio/templates/base/scripts/BxBaseStudioFormsFields.php (modified) (1 diff)
-
templates/base/css/grid.css (modified) (1 diff)
-
templates/base/scripts/BxBaseGrid.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/classes/BxDolPage.php
r15942 r15943 42 42 * - user level id = 3 -> 2^(3-1) = 4 43 43 * - user level id = 4 -> 2^(4-1) = 8 44 * - visible_for_levels_editable: it determines if 'visible_for_levels' field is edi able from page builder, visibility options can be overriden by custom class and shouldn'teditable in this case.44 * - visible_for_levels_editable: it determines if 'visible_for_levels' field is editable from page builder, visibility options can be overriden by custom class and shouldn't be editable in this case. 45 45 * - url: the page url, if it is static page. 46 46 * - meta_description: meta description of the page. -
trunk/inc/js/classes/BxDolGrid.js
r15930 r15943 120 120 BxDolGrid.prototype.enable = function (sId, isEnable) { 121 121 var e = jQuery('#' + sId); 122 var eActions = e.find('.bx-grid-cell-single-actions-wrapper *[bx_grid_action_single]').not('*[bx_grid_permanent_state]'); 123 122 124 if (isEnable) { 123 125 e.removeClass('bx-grid-table-row-disabled bx-def-font-grayed'); 124 e.find('*[bx_grid_action_single]').removeClass('bx-btn-disabled'); 125 this._bindActionsSingle(e); 126 eActions.removeClass('bx-btn-disabled'); 127 if (eActions.length) 128 this._bindActionsSingle(e); 126 129 } else { 127 e.find('*[bx_grid_action_single]').addClass('bx-btn-disabled'); 128 e.addClass('bx-grid-table-row-disabled bx-def-font-grayed'); 129 this._unbindActionsSingle(e); 130 eActions.addClass('bx-btn-disabled'); 131 e.addClass('bx-grid-table-row-disabled bx-def-font-grayed'); 132 if (eActions.length) 133 this._unbindActionsSingle(e); 130 134 } 131 135 } -
trunk/samples/form_objects.php
r15934 r15943 75 75 // display add form 76 76 77 $oForm = BxDolForm::getObjectInstance('sample 2_form_objects', 'sample2_form_objects_add'); // get form instance for specified form object and display77 $oForm = BxDolForm::getObjectInstance('sample_form_objects', 'sample_form_objects_add'); // get form instance for specified form object and display 78 78 if (!$oForm) 79 79 die('"sample_form_objects_add" form object or "sample_form_objects_add" display is not defined'); -
trunk/studio/templates/base/scripts/BxBaseStudioFormsFields.php
r15911 r15943 178 178 } 179 179 180 protected function _getActionsDisabledBehavior($aRow) { 181 return false; 182 } 180 183 181 184 protected function _getFilterControls () { -
trunk/templates/base/css/grid.css
r15736 r15943 75 75 76 76 77 td:last-child .bx-grid-cell-si gnge-actions-wrapper {77 td:last-child .bx-grid-cell-single-actions-wrapper { 78 78 float:right; 79 79 } -
trunk/templates/base/scripts/BxBaseGrid.php
r15929 r15943 266 266 /** 267 267 * Check if the whole row is disabled. 268 * When row is disabled checlbox is not selectable, actions aren't clickable and text is grayed out.268 * When row is disabled - checkbox is not selectable, actions aren't clickable and text is grayed out. 269 269 * By default all rows aren't disabled. 270 270 * @param $aRow row array … … 277 277 } 278 278 279 /** 280 * Determine how actions are disabled when whole row is disabled. 281 * @param $aRow row array 282 * @return null - disable/enable actions when row is disabled/enabled, true - actions are always disabled, false - actions are always enabled 283 */ 284 protected function _getActionsDisabledBehavior($aRow) { 285 return null; 286 } 287 279 288 /** 280 289 * Check if the checkbox is disabled. … … 415 424 isset($aField['width']) ? 'width:' . $aField['width'] : false // add default styles 416 425 ); 417 return '<td ' . $sAttr . '><div class="bx-grid-cell-signge-actions-wrapper">' . $this->_getActions('single', $aRow[$this->_aOptions['field_id']], false, $this->_isRowDisabled($aRow), $aRow) . '</div></td>'; 426 427 $mixedDisabledBehavior = $this->_getActionsDisabledBehavior($aRow); 428 $sActions = $this->_getActions('single', $aRow[$this->_aOptions['field_id']], false, null === $mixedDisabledBehavior ? $this->_isRowDisabled($aRow) : $mixedDisabledBehavior, null !== $mixedDisabledBehavior, $aRow); 429 430 return '<td ' . $sAttr . '><div class="bx-grid-cell-single-actions-wrapper">' . $sActions . '</div></td>'; 418 431 } 419 432 … … 428 441 429 442 430 protected function _getActions ($sType, $sActionData = false, $isSmall = false, $isDisabled = false, $ aRow = array()) {443 protected function _getActions ($sType, $sActionData = false, $isSmall = false, $isDisabled = false, $isPermanentState = false, $aRow = array()) { 431 444 $sActionsType = 'actions_' . $sType; 432 445 if (empty($this->_aOptions[$sActionsType]) || !is_array($this->_aOptions[$sActionsType])) 433 446 return ''; 434 447 $sRet = ''; 435 foreach ($this->_aOptions[$sActionsType] as $sKey => $a) { 448 foreach ($this->_aOptions[$sActionsType] as $sKey => $a) 449 { 436 450 $sFunc = '_getAction' . $this->_genMethodName($sKey); 437 451 if (!method_exists($this, $sFunc)) 438 452 $sFunc = empty($a) ? '_getActionDivider' : '_getActionDefault'; 453 439 454 if (!isset($a['attr']['bx_grid_action'])) { 440 455 $a['attr']['bx_grid_action_' . $sType] = $sKey; … … 444 459 $a['attr']['bx_grid_action_confirm'] = $a['confirm'] ? 1 : 0; 445 460 } 461 462 if ($isPermanentState && !isset($a['attr']['bx_grid_permanent_state'])) 463 $a['attr']['bx_grid_permanent_state'] = 1; 464 446 465 $sRet .= $this->$sFunc($sType, $sKey, $a, $isSmall, $isDisabled, $aRow); 447 466 }
Note: See TracChangeset
for help on using the changeset viewer.