MINOR Reduced HTML validation errors in CMS and FieldGroup

This commit is contained in:
Ingo Schommer 2011-12-18 16:57:26 +01:00
parent bc2bb53274
commit 4d28b79c1b
3 changed files with 12 additions and 5 deletions

View File

@ -568,7 +568,7 @@ class LeftAndMain extends Controller {
$treeTitle = '...';
}
$html = "<ul><li id=\"record-0\" data-id=\"0\"class=\"Root nodelete\"><a href=\"$rootLink\"><strong>$treeTitle</strong></a>"
$html = "<ul><li id=\"record-0\" data-id=\"0\" class=\"Root nodelete\"><a href=\"$rootLink\"><strong>$treeTitle</strong></a>"
. $html . "</li></ul>";
}
@ -1226,6 +1226,13 @@ class LeftAndMain extends Controller {
function IsPreviewExpanded() {
return ($this->request->getVar('cms-preview-expanded'));
}
/**
* @return String
*/
function Locale() {
return DBField::create('DBLocale', $this->i18nLocale());
}
/**
* Register the given javascript file as required in the CMS.

View File

@ -2,12 +2,11 @@
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-language" content="$i18nLocale" />
<% base_tag %>
<title>$Title</title>
</head>
<body class="loading cms">
<body class="loading cms" lang="$Locale.RFC1766">
<% include CMSLoadingScreen %>
@ -18,7 +17,7 @@
$Content
<div class="cms-preview east <% if IsPreviewExpanded %>is-expanded<% else %>is-collapsed<% end_if %>" data-layout="{type: 'border'}">
<iframe src="$PreviewLink" class="center"></iframe>
<iframe src="<% if $PreviewLink %>$PreviewLink<% else %>about:blank<% end_if %>" class="center"></iframe>
<div class="cms-preview-controls south"></div>
</div>

View File

@ -136,9 +136,10 @@ class FieldGroup extends CompositeField {
$titleBlock = (!empty($Title)) ? "<label class=\"left\">$Title</label>" : "";
$messageBlock = (!empty($Message)) ? "<span class=\"message $MessageType\">$Message</span>" : "";
$rightTitleBlock = (!empty($RightTitle)) ? "<label class=\"right\">$RightTitle</label>" : "";
$id = $Name ? ' id="$Name"' : '';
return <<<HTML
<div id="$Name" class="field $Type $extraClass">$titleBlock<div class="middleColumn">$Field</div>$rightTitleBlock$messageBlock</div>
<div$id class="field $Type $extraClass">$titleBlock<div class="middleColumn">$Field</div>$rightTitleBlock$messageBlock</div>
HTML;
}