mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge branch '3.0'
This commit is contained in:
commit
746ac59a01
@ -1,6 +1,7 @@
|
||||
---
|
||||
Name: modelascontrollerroutes
|
||||
After: framework/routes#rootroutes
|
||||
Before: '*'
|
||||
After: '#rootroutes'
|
||||
---
|
||||
Director:
|
||||
rules:
|
||||
@ -8,7 +9,7 @@ Director:
|
||||
'$URLSegment//$Action/$ID/$OtherID': 'ModelAsController'
|
||||
---
|
||||
Name: legacycmsroutes
|
||||
After: '*'
|
||||
After: '#adminroutes'
|
||||
---
|
||||
Director:
|
||||
rules:
|
||||
|
@ -95,7 +95,7 @@ JS
|
||||
// Don't filter list when a detail view is requested,
|
||||
// to avoid edge cases where the filtered list wouldn't contain the requested
|
||||
// record due to faulty session state (current folder not always encoded in URL, see #7408).
|
||||
if($this->request->param('ID') == 'field') {
|
||||
if(!$folder->ID && ($this->request->param('ID') == 'field')) {
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
)
|
||||
// new TextField('MetaTags', _t('CMSMain.SearchMetaTags', 'Meta tags'))
|
||||
);
|
||||
$dateGroup->subfieldParam = 'FieldHolder';
|
||||
$dateGroup->setFieldHolderTemplate('FieldGroup_DefaultFieldHolder')->addExtraClass('stacked');
|
||||
$dateFrom->setConfig('showcalendar', true);
|
||||
$dateTo->setConfig('showcalendar', true);
|
||||
$classDropdown->setEmptyString(_t('CMSMain.PAGETYPEANYOPT','Any'));
|
||||
@ -574,17 +574,18 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
$fields->push($idField = new HiddenField("ID", false, $id));
|
||||
// Necessary for different subsites
|
||||
$fields->push($liveURLField = new HiddenField("AbsoluteLink", false, $record->AbsoluteLink()));
|
||||
$fields->push($liveURLField = new HiddenField("LiveURLSegment"));
|
||||
$fields->push($stageURLField = new HiddenField("StageURLSegment"));
|
||||
$fields->push($liveURLField = new HiddenField("LiveLink"));
|
||||
$fields->push($stageURLField = new HiddenField("StageLink"));
|
||||
$fields->push(new HiddenField("TreeTitle", false, $record->TreeTitle));
|
||||
|
||||
$fields->push(new HiddenField('Sort','', $record->Sort));
|
||||
|
||||
if($record->ID && is_numeric( $record->ID ) ) {
|
||||
$liveRecord = Versioned::get_one_by_stage('SiteTree', 'Live', "\"SiteTree\".\"ID\" = $record->ID");
|
||||
if($liveRecord) $liveURLField->setValue($liveRecord->AbsoluteLink());
|
||||
if($liveRecord) {
|
||||
$liveURLField->setValue(Controller::join_links($liveRecord->AbsoluteLink(), '?stage=Live'));
|
||||
}
|
||||
}
|
||||
|
||||
if(!$deletedFromStage) {
|
||||
$stageURLField->setValue(Controller::join_links($record->AbsoluteLink(), '?stage=Stage'));
|
||||
}
|
||||
@ -615,7 +616,6 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
|
||||
$form = new Form($this, "EditForm", $fields, $actions, $validator);
|
||||
$form->loadDataFrom($record);
|
||||
$stageURLField->setValue(Controller::join_links($record->getStageURLSegment(), '?stage=Stage'));
|
||||
$form->disableDefaultAction();
|
||||
$form->addExtraClass('cms-edit-form');
|
||||
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm'));
|
||||
@ -1061,8 +1061,12 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
|
||||
// Can be used in different contexts: In normal page edit view, in which case the redirect won't have any effect.
|
||||
// Or in history view, in which case a revert causes the CMS to re-load the edit view.
|
||||
// The X-Pjax header forces a "full" content refresh on redirect.
|
||||
$url = Controller::join_links(singleton('CMSPageEditController')->Link('show'), $record->ID);
|
||||
$this->response->addHeader('X-ControllerURL', $url);
|
||||
$this->request->addHeader('X-Pjax', 'Content');
|
||||
$this->response->addHeader('X-Pjax', 'Content');
|
||||
|
||||
return $this->getResponseNegotiator()->respond($this->request);
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ class ContentController extends Controller {
|
||||
</div>
|
||||
|
||||
<div id="switchView" class="bottomTabs">
|
||||
<div class="blank">$viewPageIn </div>
|
||||
$viewPageIn
|
||||
$items
|
||||
</div>
|
||||
</div>
|
||||
|
25
css/SilverStripeNavigator.css
Normal file
25
css/SilverStripeNavigator.css
Normal file
@ -0,0 +1,25 @@
|
||||
#SilverStripeNavigator { position: fixed; bottom: 0; left: 0; width: 100%; border-top: 2px solid #d4d0c8; background-color: #81858d; height: 22px; }
|
||||
|
||||
#SilverStripeNavigator * { font-family: Arial,Helvetica,sans-serif; font-size: 10px !important; }
|
||||
|
||||
#SilverStripeNavigator .holder { text-align: center; padding-top: 4px; padding-left: 3px; padding-right: 6px; color: white; border-top: 1px solid #555555; }
|
||||
|
||||
#SilverStripeNavigator #logInStatus { float: right; }
|
||||
|
||||
#SilverStripeNavigator #switchView { float: left; }
|
||||
|
||||
#SilverStripeNavigator a { color: #fff; background-color: transparent; text-decoration: underline; }
|
||||
|
||||
#SilverStripeNavigator a:hover { background-color: transparent; }
|
||||
|
||||
#SilverStripeNavigator .bottomTabs a { margin-right: 8px; text-decoration: underline; }
|
||||
|
||||
#SilverStripeNavigator .bottomTabs a.current { font-weight: bold; text-decoration: none; }
|
||||
|
||||
#SilverStripeNavigatorMessage { font-family: 'Lucida Grande', Verdana, Arial, 'sans-serif'; position: absolute; right: 20px; top: 40px; padding: 10px; border-color: #c99; color: #fff; background-color: #c00; border: 1px solid #000; }
|
||||
|
||||
#SilverStripeNavigatorLinkPopup { display: none; position: absolute; top: -60px; height: 50px; width: 350px; left: 200px; background-color: white; border: 1px solid black; z-index: 100; color: black; padding: 5px; }
|
||||
|
||||
#SilverStripeNavigatorLinkPopup input { width: 250px; }
|
||||
|
||||
#SilverStripeNavigatorLinkPopup a.close { color: blue; text-align: right; width: 80%; border: none !important; cursor: pointer; }
|
@ -21,7 +21,7 @@
|
||||
.cms-content-tools #cms-content-treeview .cms-tree a:hover > .text > .badge, .cms-content-tools #cms-content-treeview .cms-tree .jstree-clicked > .text > .badge { display: inline-block; }
|
||||
|
||||
/** ------------------------------------------------------------------ URLSegment field ----------------------------------------------------------------- */
|
||||
.field.urlsegment.disabled { color: #444; padding-left: 0px; margin-left: 0px; background: none; border-color: transparent; }
|
||||
.field.urlsegment.loading { background: url(../images/loading.gif) no-repeat 162px 8px; }
|
||||
.field.urlsegment .prefix, .field.urlsegment .preview { padding-top: 8px; display: inline-block; }
|
||||
.field.urlsegment .prefix { color: #777; }
|
||||
.field.urlsegment .cancel, .field.urlsegment .update, .field.urlsegment .edit { margin-left: 7px; }
|
||||
@ -41,7 +41,7 @@
|
||||
.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-state-active.content-treeview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active.content-treeview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active.content-treeview a { background-position: 1px -40px; }
|
||||
.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-state-active.content-galleryview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active.content-galleryview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active.content-galleryview a { background-position: -161px -40px; }
|
||||
.cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-state-active.content-listview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-content .ui-state-active.content-listview a, .cms .AssetAdmin .cms-content-header-tabs .ui-tabs-nav .ui-widget-header .ui-state-active.content-listview a { background-position: -38px -40px; }
|
||||
.cms .AssetAdmin .cms-content-toolbar .cms-page-add-button { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f3f3f3), color-stop(100%, #d9d9d9)); background-image: -webkit-linear-gradient(#f3f3f3, #d9d9d9); background-image: -moz-linear-gradient(#f3f3f3, #d9d9d9); background-image: -o-linear-gradient(#f3f3f3, #d9d9d9); background-image: -ms-linear-gradient(#f3f3f3, #d9d9d9); background-image: linear-gradient(#f3f3f3, #d9d9d9); border-color: #c0c0c2; }
|
||||
.cms .AssetAdmin .cms-content-toolbar .cms-page-add-button { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f3f3f3), color-stop(100%, #d9d9d9)); background-image: -webkit-linear-gradient(#f3f3f3, #d9d9d9); background-image: -moz-linear-gradient(#f3f3f3, #d9d9d9); background-image: -o-linear-gradient(#f3f3f3, #d9d9d9); background-image: linear-gradient(#f3f3f3, #d9d9d9); border-color: #c0c0c2; }
|
||||
.cms .AssetAdmin .cms-content-toolbar .cms-page-add-button span.btn-icon-add { height: 17px; }
|
||||
.cms .AssetAdmin .cms-content-toolbar .cms-page-add-button span.ui-button-text { color: #393939; text-shadow: white 0 1px 1px; }
|
||||
.cms .AssetAdmin #Root_TreeView .cms-tree ul .class-Folder a span.text span.jstree-foldericon { background: url(../images/blue-folder-horizontal.png) no-repeat; width: 16px; height: 16px; float: left; display: block; margin-right: 4px; }
|
||||
|
BIN
images/loading.gif
Normal file
BIN
images/loading.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 847 B |
@ -94,10 +94,12 @@
|
||||
}
|
||||
|
||||
if (currentVal != updateVal) {
|
||||
self.addClass('loading');
|
||||
self.suggest(updateVal, function(data) {
|
||||
var newVal = decodeURIComponent(data.value);
|
||||
field.val(newVal);
|
||||
self.edit(title);
|
||||
self.removeClass('loading');
|
||||
});
|
||||
} else {
|
||||
self.edit();
|
||||
|
90
scss/SilverStripeNavigator.scss
Normal file
90
scss/SilverStripeNavigator.scss
Normal file
@ -0,0 +1,90 @@
|
||||
|
||||
#SilverStripeNavigator {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
border-top: 2px solid #d4d0c8;
|
||||
background-color:#81858d;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
#SilverStripeNavigator * {
|
||||
font-family: Arial,Helvetica,sans-serif;
|
||||
font-size: 10px !important;
|
||||
}
|
||||
|
||||
#SilverStripeNavigator .holder {
|
||||
text-align: center;
|
||||
padding-top : 4px;
|
||||
padding-left : 3px;
|
||||
padding-right : 6px;
|
||||
color: white;
|
||||
border-top: 1px solid #555555;
|
||||
}
|
||||
#SilverStripeNavigator #logInStatus {
|
||||
float: right;
|
||||
}
|
||||
#SilverStripeNavigator #switchView {
|
||||
float: left;
|
||||
|
||||
}
|
||||
|
||||
#SilverStripeNavigator a {
|
||||
color: #fff;
|
||||
background-color: transparent;
|
||||
text-decoration: underline;
|
||||
}
|
||||
#SilverStripeNavigator a:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#SilverStripeNavigator .bottomTabs a {
|
||||
margin-right: 8px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#SilverStripeNavigator .bottomTabs a.current {
|
||||
font-weight:bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#SilverStripeNavigatorMessage {
|
||||
font-family: 'Lucida Grande', Verdana, Arial, 'sans-serif';
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 40px;
|
||||
padding: 10px;
|
||||
border-color: #c99;
|
||||
color: #fff;
|
||||
background-color: #c00;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
#SilverStripeNavigatorLinkPopup {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: -60px;
|
||||
height: 50px;
|
||||
width: 350px;
|
||||
left: 200px;
|
||||
background-color: white;
|
||||
border: 1px solid black;
|
||||
z-index: 100;
|
||||
color: black;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#SilverStripeNavigatorLinkPopup input {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
#SilverStripeNavigatorLinkPopup a.close {
|
||||
color: blue;
|
||||
text-align: right;
|
||||
width: 80%;
|
||||
border: none !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
@ -93,12 +93,8 @@
|
||||
* ----------------------------------------------------------------- */
|
||||
.field.urlsegment {
|
||||
|
||||
&.disabled {
|
||||
color: #444;
|
||||
padding-left: 0px;
|
||||
margin-left: 0px;
|
||||
background: none;
|
||||
border-color: transparent;
|
||||
&.loading {
|
||||
background: url(../images/loading.gif) no-repeat 162px 8px;
|
||||
}
|
||||
|
||||
.prefix,
|
||||
|
@ -10,7 +10,7 @@ class VirtualPageTest extends SapphireTest {
|
||||
);
|
||||
|
||||
protected $requiredExtensions = array(
|
||||
'Page' => array('VirtualPageTest_PageExtension')
|
||||
'SiteTree' => array('VirtualPageTest_PageExtension')
|
||||
);
|
||||
|
||||
function setUp() {
|
||||
|
Loading…
Reference in New Issue
Block a user