Permalink
Browse files

MINOR Clearer CSS classes in CMS controller templates, added $BaseCSS…

…Classes to content templates in order to support partial template loads through ajax (instead of relying on stale CSS classes on the <body> tag)
  • Loading branch information...
1 parent c4a99df commit 38db63c3b03e5d98bb14a05665af70ac990fff03 @chillu chillu committed Jul 5, 2011
@@ -438,14 +438,6 @@ public function getEditForm($id = null, $fields = null) {
$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 @@ public function getEditForm($id = null, $fields = null) {
$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>

0 comments on commit 38db63c

Please sign in to comment.