Skip to content

Commit

Permalink
MINOR Using LeftAndMain->BaseCSSClasses() instead of ViewableData->CS…
Browse files Browse the repository at this point in the history
…SClasses() to avoid conflicts with customized controller objects (e.g. ModelAdmin_RecordController->edit())
  • Loading branch information
chillu committed Jul 8, 2011
1 parent 2e9ea1d commit 1dc9457
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions admin/code/LeftAndMain.php
Expand Up @@ -1206,6 +1206,17 @@ function MceRoot() {
return MCE_ROOT; 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() { function IsPreviewExpanded() {
return ($this->request->getVar('cms-preview-expanded')); return ($this->request->getVar('cms-preview-expanded'));
} }
Expand Down
2 changes: 1 addition & 1 deletion admin/templates/LeftAndMain.ss
Expand Up @@ -7,7 +7,7 @@
<title>$Title</title> <title>$Title</title>
</head> </head>


<body class="loading cms $CSSClasses"> <body class="loading cms $BaseCSSClasses">


<% include CMSLoadingScreen %> <% include CMSLoadingScreen %>


Expand Down

0 comments on commit 1dc9457

Please sign in to comment.