ENHANCEMENT "Readonly" behaviour for CMS tabs

This commit is contained in:
Ingo Schommer 2012-09-28 16:32:16 +02:00
parent d504e9e634
commit 91e4fde96f
2 changed files with 14 additions and 2 deletions

View File

@ -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();
}
}
});
},

View File

@ -1128,7 +1128,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
_t('Member.INTERFACELANG', "Interface Language", 'Language of the CMS'),
i18n::get_existing_translations()
));
$mainFields->removeByName('Bounced');
$mainFields->removeByName('RememberLoginToken');
$mainFields->removeByName('AutoLoginHash');
@ -1181,6 +1181,9 @@ class Member extends DataObject implements TemplateGlobalProvider {
$fields->addFieldToTab('Root.Permissions', $permissionsField);
}
}
$permissionsTab = $fields->fieldByName("Root")->fieldByName('Permissions');
if($permissionsTab) $permissionsTab->addExtraClass('readonly');
$defaultDateFormat = Zend_Locale_Format::getDateFormat($this->Locale);
$dateFormatMap = array(