Merge pull request #1638 from open-sausages/features/4.0/jlayout-to-flexbox

Part 1 of 5, remove JLayout and apply flexbox to pages section (excludes preview)
This commit is contained in:
Damian Mooyman 2016-10-11 17:35:47 +13:00 committed by GitHub
commit 431714d0eb
11 changed files with 25 additions and 21 deletions

View File

@ -140,7 +140,8 @@ s=r["default"].sprintf(this.data("linkTmplShow"),i,l)
t(".cms-container").loadPanel(s,"",{pjax:"CurrentForm"})}}),t("#Form_VersionsForm input[name=ShowUnpublished]").entwine({onmatch:function a(){this.toggle(),this._super()},onunmatch:function o(){this._super()
},onchange:function s(){this.toggle()},toggle:function d(){var e=t(this),n=e.parents("form")
e.attr("checked")?n.find("tr[data-published=false]").show():n.find("tr[data-published=false]").hide()._unselect()}}),t("#Form_VersionsForm tbody tr").entwine({onclick:function l(t){var e,n
e.attr("checked")?n.find("tr[data-published=false]").css("display",""):n.find("tr[data-published=false]").css("display","none")._unselect()}}),t("#Form_VersionsForm tbody tr").entwine({onclick:function l(t){
var e,n
return e=this.parents("form").find(":input[name=CompareMode]").attr("checked"),n=this.siblings(".active"),e&&this.hasClass("active")?void this._unselect():e?n.length>1?alert(r["default"]._t("ONLYSELECTTWO","You can only compare two versions at this time.")):(this._select(),
void(1==n.length&&this.parents("form").submit())):(this._select(),n._unselect(),this.parents("form").submit(),void 0)},_unselect:function c(){this.removeClass("active"),this.find(":input[type=checkbox]").attr("checked",!1)

View File

@ -96,9 +96,9 @@ $.entwine('ss', function($){
var form = self.parents('form');
if(self.attr('checked')) {
form.find('tr[data-published=false]').show();
form.find('tr[data-published=false]').css('display', '');
} else {
form.find("tr[data-published=false]").hide()._unselect();
form.find("tr[data-published=false]").css('display', 'none')._unselect();
}
}
});

View File

@ -734,6 +734,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
if ($record instanceof CMSPreviewable) {
$form->addExtraClass('cms-previewable');
}
$form->addExtraClass('fill-height flexbox-area-grow');
if(!$record->canEdit() || $deletedFromStage) {
$readonlyFields = $form->Fields()->makeReadonly();

View File

@ -160,7 +160,7 @@ class CMSPageAddController extends CMSPageEditController {
}
return null;
});
$form->addExtraClass('cms-add-form cms-content center cms-edit-form ' . $this->BaseCSSClasses());
$form->addExtraClass('flexbox-area-grow fill-height cms-add-form cms-content cms-edit-form ' . $this->BaseCSSClasses());
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
return $form;

View File

@ -1,4 +1,4 @@
<div id="pages-controller-cms-content" class="has-panel cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content" data-ignore-tab-state="true">
<div id="pages-controller-cms-content" class="has-panel cms-content flexbox-area-grow fill-height cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content" data-ignore-tab-state="true">
<div class="cms-content-header north">
@ -42,8 +42,9 @@
</div>
</div>
$Tools
$EditForm
<div class="flexbox-area-grow fill-width">
$Tools
$EditForm
</div>
</div>

View File

@ -1,6 +1,6 @@
<form $FormAttributes data-layout-type="border">
<div class="panel panel--padded panel--scrollable panel--single-toolbar cms-content-fields ">
<div class="panel panel--padded panel--scrollable flexbox-area-grow cms-content-fields ">
<% if $Message %>
<p id="{$FormName}_error" class="message $MessageType">$Message</p>
<% else %>

View File

@ -1,11 +1,12 @@
<div class="cms-preview east" data-layout-type="border">
<div class="preview-note"><span><!-- --></span><%t CMSPageHistoryController_versions_ss.PREVIEW 'Website preview' %></div>
<div class="panel panel--scrollable panel--single-toolbar">
<div class="cms-preview fill-height flexbox-area-grow" data-layout-type="border">
<div class="panel panel--scrollable flexbox-area-grow">
<div class="preview-note"><span><!-- --></span><%t CMSPageHistoryController_versions_ss.PREVIEW 'Website preview' %></div>
<div class="preview-device-outer">
<div class="preview-device-inner">
<iframe src="about:blank" class="center" name="cms-preview-iframe"></iframe>
</div>
</div>
</div>
<div class="cms-content-controls cms-preview-controls south"></div>
<div class="toolbar toolbar--south cms-content-controls cms-preview-controls"></div>
<div class="cms-preview-overlay ui-widget-overlay-light"></div>
</div>

View File

@ -1,5 +1,5 @@
<div class="cms-content-tools west cms-panel cms-panel-layout" data-expandOnClick="true" data-layout-type="border" id="cms-content-tools-CMSMain">
<div class="panel panel--scrollable panel--single-toolbar cms-panel-content center">
<div class="cms-content-tools fill-height cms-panel cms-panel-layout" data-expandOnClick="true" data-layout-type="border" id="cms-content-tools-CMSMain">
<div class="panel panel--scrollable flexbox-area-grow cms-panel-content">
<div class="cms-content-filters">
$SearchForm
</div>

View File

@ -1,7 +1,7 @@
<div class="cms-content center $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
<div class="flexbox-area-grow cms-content $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
<% with $AddForm %>
<form $FormAttributes data-layout-type="border">
<div class="toolbar--north container-fluid">
<div class="toolbar toolbar--north">
<div class="toolbar__navigation">
<ol class="breadcrumb">
<li class="breadcrumb__item breadcrumb__item--last">
@ -13,7 +13,7 @@
</div>
</div>
<div class="panel panel--padded panel--scrollable panel--double-toolbar container-fluid cms-panel-padded">
<div class="panel panel--padded panel--scrollable flexbox-area-grow">
<% if $Message %>
<p id="{$FormName}_error" class="message $MessageType">$Message</p>
<% else %>

View File

@ -1,6 +1,6 @@
<div class="cms-content-tools west cms-panel cms-panel-layout" data-expandOnClick="true" data-layout-type="border" id="cms-content-tools-CMSPageHistoryController">
<div class="cms-content-tools fill-height cms-panel cms-panel-layout" data-expandOnClick="true" data-layout-type="border" id="cms-content-tools-CMSPageHistoryController">
<div class="cms-panel-content cms-helper-hide-actions center">
<div class="flexbox-area-grow panel--scrollable cms-panel-content cms-helper-hide-actions ">
$VersionsForm
</div>
</div>

View File

@ -1,4 +1,4 @@
<div id="pages-controller-cms-content" class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
<div id="pages-controller-cms-content" class="flexbox-area-grow fill-height cms-content cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
<div class="cms-content-header north">
<div class="cms-content-header-info">