Permalink
Browse files

MINOR Using LeftAndMain->BaseCSSClasses() instead of ViewableData->CS…

…SClasses() to avoid conflicts with customized controller objects (e.g. ModelAdmin_RecordController->edit())
  • Loading branch information...
1 parent 2e9ea1d commit 1dc94570480ddd15ee5232af538b3b7b306343c0 @chillu chillu committed Jul 4, 2011
Showing with 12 additions and 1 deletion.
  1. +11 −0 admin/code/LeftAndMain.php
  2. +1 −1 admin/templates/LeftAndMain.ss
View
@@ -1206,6 +1206,17 @@ function MceRoot() {
return MCE_ROOT;
}
+ /**
+ * Same as {@link ViewableData->CSSClasses()}, but with a changed name
+ * to avoid problems when using {@link ViewableData->customise()}
+ * (which always returns "ArrayData" from the $original object).
+ *
+ * @return String
+ */
+ function BaseCSSClasses() {
+ return $this->CSSClasses();
+ }
+
function IsPreviewExpanded() {
return ($this->request->getVar('cms-preview-expanded'));
}
@@ -7,7 +7,7 @@
<title>$Title</title>
</head>
-<body class="loading cms $CSSClasses">
+<body class="loading cms $BaseCSSClasses">
<% include CMSLoadingScreen %>

0 comments on commit 1dc9457

Please sign in to comment.