mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge branch 'pjax-multiple'
This commit is contained in:
commit
ca9f4f6f6f
@ -169,7 +169,7 @@ JS
|
||||
$uploadBtn = new LiteralField(
|
||||
'UploadButton',
|
||||
sprintf(
|
||||
'<a class="ss-ui-button ss-ui-action-constructive cms-panel-link" data-target-panel=".cms-content" data-icon="drive-upload" href="%s">%s</a>',
|
||||
'<a class="ss-ui-button ss-ui-action-constructive cms-panel-link" data-pjax-target="Content" data-icon="drive-upload" href="%s">%s</a>',
|
||||
Controller::join_links(singleton('CMSFileAddController')->Link(), '?ID=' . $folder->ID),
|
||||
_t('Folder.UploadFilesButton', 'Upload')
|
||||
)
|
||||
@ -282,6 +282,7 @@ JS
|
||||
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
|
||||
// TODO Can't merge $FormAttributes in template at the moment
|
||||
$form->addExtraClass('cms-edit-form cms-panel-padded center ' . $this->BaseCSSClasses());
|
||||
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
|
||||
$form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||
|
||||
$this->extend('updateEditForm', $form);
|
||||
|
@ -625,6 +625,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
// TODO Can't merge $FormAttributes in template at the moment
|
||||
$form->addExtraClass('center ss-tabset ' . $this->BaseCSSClasses());
|
||||
// if($form->Fields()->hasTabset()) $form->Fields()->findOrMakeTab('Root')->setTemplate('CMSTabSet');
|
||||
$form->setAttribute('data-pjax-fragment', 'CurrentForm');
|
||||
|
||||
if(!$record->canEdit() || $deletedFromStage) {
|
||||
$readonlyFields = $form->Fields()->makeReadonly();
|
||||
@ -720,7 +721,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
$num = $item->numChildren();
|
||||
if($num) {
|
||||
return sprintf(
|
||||
'<a class="cms-panel-link list-children-link" data-pjax="ListViewForm" data-target-panel="#Form_ListViewForm" href="%s?ParentID=%d&view=list">%s</a>',
|
||||
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s?ParentID=%d&view=list">%s</a>',
|
||||
$controller->Link(),
|
||||
$item->ID,
|
||||
$num
|
||||
@ -737,6 +738,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
new FieldList($gridField),
|
||||
new FieldList()
|
||||
);
|
||||
$listview->setAttribute('data-pjax-fragment', 'ListViewForm');
|
||||
|
||||
$this->extend('updateListView', $listview);
|
||||
|
||||
|
@ -15,6 +15,13 @@ class CMSPagesController extends CMSMain {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
public function ViewState() {
|
||||
return $this->request->getVar('view');
|
||||
}
|
||||
|
||||
/**
|
||||
* Doesn't deal with a single record, and we need
|
||||
* to avoid session state from previous record edits leaking in here.
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border">
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border">
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="pages-controller-cms-content" class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border">
|
||||
<div id="pages-controller-cms-content" class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div id="pages-controller-cms-content" class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border">
|
||||
<div id="pages-controller-cms-content" class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
@ -9,10 +9,10 @@
|
||||
|
||||
<div class="cms-content-header-tabs">
|
||||
<ul>
|
||||
<li class="content-treeview">
|
||||
<li class="content-treeview<% if ViewState == tree %> ui-tabs-selected<% end_if %>">
|
||||
<a href="#cms-content-treeview" class="cms-panel-link" data-href="$LinkTreeView"><% _t('CMSPagesController.TreeView', 'Tree View') %></a>
|
||||
</li>
|
||||
<li class="content-listview">
|
||||
<li class="content-listview<% if ViewState == list %> ui-tabs-selected<% end_if %>">
|
||||
<a href="#cms-content-listview" class="cms-panel-link" data-href="$LinkListView"><% _t('CMSPagesController.ListView', 'List View') %></a>
|
||||
</li>
|
||||
<!--
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border">
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border">
|
||||
<div class="cms-content center cms-tabset $BaseCSSClasses" data-layout-type="border" data-pjax-fragment="Content">
|
||||
|
||||
<div class="cms-content-header north">
|
||||
<div>
|
||||
|
Loading…
Reference in New Issue
Block a user