mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT "Readonly" behaviour for CMS tabs
This commit is contained in:
parent
d504e9e634
commit
91e4fde96f
@ -933,7 +933,16 @@ jQuery.noConflict();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
selected: (selectedTab.index() != -1) ? selectedTab.index() : 0
|
||||
selected: (selectedTab.index() != -1) ? selectedTab.index() : 0,
|
||||
show: function(e, ui) {
|
||||
// Usability: Hide actions for "readonly" tabs (which don't contain any editable fields)
|
||||
var actions = $(this).closest('form').find('.Actions');
|
||||
if($(ui.tab).closest('li').hasClass('readonly')) {
|
||||
actions.fadeOut();
|
||||
} else {
|
||||
actions.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -1182,6 +1182,9 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
}
|
||||
}
|
||||
|
||||
$permissionsTab = $fields->fieldByName("Root")->fieldByName('Permissions');
|
||||
if($permissionsTab) $permissionsTab->addExtraClass('readonly');
|
||||
|
||||
$defaultDateFormat = Zend_Locale_Format::getDateFormat($this->Locale);
|
||||
$dateFormatMap = array(
|
||||
'MMM d, yyyy' => Zend_Date::now()->toString('MMM d, yyyy'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user