mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Clearer CSS classes in CMS controller templates, added $BaseCSSClasses to content templates in order to support partial template loads through ajax (instead of relying on stale CSS classes on the <body> tag)
This commit is contained in:
parent
c4a99dfc09
commit
38db63c3b0
@ -438,14 +438,6 @@ JS;
|
||||
$actions = $record->getCMSActions();
|
||||
}
|
||||
|
||||
// Add a default or custom validator.
|
||||
// @todo Currently the default Validator.js implementation
|
||||
// adds javascript to the document body, meaning it won't
|
||||
// be included properly if the associated fields are loaded
|
||||
// through ajax. This means only serverside validation
|
||||
// will kick in for pages+validation loaded through ajax.
|
||||
// This will be solved by using less obtrusive javascript validation
|
||||
// in the future, see http://open.silverstripe.com/ticket/2915 and http://open.silverstripe.com/ticket/3386
|
||||
if($record->hasMethod('getCMSValidator')) {
|
||||
$validator = $record->getCMSValidator();
|
||||
} else {
|
||||
@ -464,7 +456,7 @@ JS;
|
||||
$form->addExtraClass('cms-edit-form');
|
||||
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
|
||||
// TODO Can't merge $FormAttributes in template at the moment
|
||||
$form->addExtraClass('cms-content center ss-tabset');
|
||||
$form->addExtraClass('cms-content center ss-tabset ' . $this->BaseCSSClasses());
|
||||
if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||
|
||||
if(!$record->canEdit() || $record->IsDeletedFromStage) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="cms-content center ss-tabset" data-layout="{type: 'border'}">
|
||||
<div class="cms-content center ss-tabset $BaseCSSClasses" data-layout="{type: 'border'}">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="cms-content-form center">
|
||||
<div class="cms-content-fields center">
|
||||
<div id="cms-content-listview">
|
||||
$EditForm
|
||||
</div>
|
||||
|
@ -1,3 +1,3 @@
|
||||
<div class="cms-content center">
|
||||
<div class="cms-content center $BaseCSSClasses">
|
||||
<i>Not implemented yet</i>
|
||||
</div>
|
@ -1,3 +1,3 @@
|
||||
<div class="cms-content center">
|
||||
<div class="cms-content center $BaseCSSClasses">
|
||||
<i>Not implemented yet</i>
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<div class="cms-content center ss-tabset" data-layout="{type: 'border'}">
|
||||
<div class="cms-content center ss-tabset $BaseCSSClasses" data-layout="{type: 'border'}">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="cms-content-form center ui-widget-content">
|
||||
<div class="cms-content-fields center ui-widget-content">
|
||||
|
||||
<div id="cms-content-treeview">
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="cms-content center" data-layout="{type: 'border'}">
|
||||
<div class="cms-content center $BaseCSSClasses" data-layout="{type: 'border'}">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<h2><% _t('REPORTS','Reports') %></h2>
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="cms-content-form center ui-widget-content">
|
||||
<div class="cms-content-fields center ui-widget-content">
|
||||
$EditForm
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user