Merge remote branch 'origin/master' into translation-staging

This commit is contained in:
TeamCity 2012-08-28 17:13:50 +12:00
commit 0a8df0239a
11 changed files with 138 additions and 20 deletions

View File

@ -1,6 +1,7 @@
--- ---
Name: modelascontrollerroutes Name: modelascontrollerroutes
After: framework/routes#rootroutes Before: '*'
After: '#rootroutes'
--- ---
Director: Director:
rules: rules:
@ -8,7 +9,7 @@ Director:
'$URLSegment//$Action/$ID/$OtherID': 'ModelAsController' '$URLSegment//$Action/$ID/$OtherID': 'ModelAsController'
--- ---
Name: legacycmsroutes Name: legacycmsroutes
After: '*' After: '#adminroutes'
--- ---
Director: Director:
rules: rules:

View File

@ -95,7 +95,7 @@ JS
// Don't filter list when a detail view is requested, // Don't filter list when a detail view is requested,
// to avoid edge cases where the filtered list wouldn't contain the 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). // 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; return $list;
} }

View File

@ -284,7 +284,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
) )
// new TextField('MetaTags', _t('CMSMain.SearchMetaTags', 'Meta tags')) // new TextField('MetaTags', _t('CMSMain.SearchMetaTags', 'Meta tags'))
); );
$dateGroup->subfieldParam = 'FieldHolder'; $dateGroup->setFieldHolderTemplate('FieldGroup_DefaultFieldHolder')->addExtraClass('stacked');
$dateFrom->setConfig('showcalendar', true); $dateFrom->setConfig('showcalendar', true);
$dateTo->setConfig('showcalendar', true); $dateTo->setConfig('showcalendar', true);
$classDropdown->setEmptyString(_t('CMSMain.PAGETYPEANYOPT','Any')); $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)); $fields->push($idField = new HiddenField("ID", false, $id));
// Necessary for different subsites // Necessary for different subsites
$fields->push($liveURLField = new HiddenField("AbsoluteLink", false, $record->AbsoluteLink())); $fields->push($liveURLField = new HiddenField("AbsoluteLink", false, $record->AbsoluteLink()));
$fields->push($liveURLField = new HiddenField("LiveURLSegment")); $fields->push($liveURLField = new HiddenField("LiveLink"));
$fields->push($stageURLField = new HiddenField("StageURLSegment")); $fields->push($stageURLField = new HiddenField("StageLink"));
$fields->push(new HiddenField("TreeTitle", false, $record->TreeTitle)); $fields->push(new HiddenField("TreeTitle", false, $record->TreeTitle));
$fields->push(new HiddenField('Sort','', $record->Sort)); $fields->push(new HiddenField('Sort','', $record->Sort));
if($record->ID && is_numeric( $record->ID ) ) { if($record->ID && is_numeric( $record->ID ) ) {
$liveRecord = Versioned::get_one_by_stage('SiteTree', 'Live', "\"SiteTree\".\"ID\" = $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) { if(!$deletedFromStage) {
$stageURLField->setValue(Controller::join_links($record->AbsoluteLink(), '?stage=Stage')); $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 = new Form($this, "EditForm", $fields, $actions, $validator);
$form->loadDataFrom($record); $form->loadDataFrom($record);
$stageURLField->setValue(Controller::join_links($record->getStageURLSegment(), '?stage=Stage'));
$form->disableDefaultAction(); $form->disableDefaultAction();
$form->addExtraClass('cms-edit-form'); $form->addExtraClass('cms-edit-form');
$form->setTemplate($this->getTemplatesWithSuffix('_EditForm')); $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. // 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. // 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); $url = Controller::join_links(singleton('CMSPageEditController')->Link('show'), $record->ID);
$this->response->addHeader('X-ControllerURL', $url); $this->response->addHeader('X-ControllerURL', $url);
$this->request->addHeader('X-Pjax', 'Content');
$this->response->addHeader('X-Pjax', 'Content');
return $this->getResponseNegotiator()->respond($this->request); return $this->getResponseNegotiator()->respond($this->request);
} }

View File

@ -314,7 +314,7 @@ class ContentController extends Controller {
</div> </div>
<div id="switchView" class="bottomTabs"> <div id="switchView" class="bottomTabs">
<div class="blank">$viewPageIn </div> $viewPageIn
$items $items
</div> </div>
</div> </div>

View 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; }

View File

@ -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; } .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 ----------------------------------------------------------------- */ /** ------------------------------------------------------------------ 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, .field.urlsegment .preview { padding-top: 8px; display: inline-block; }
.field.urlsegment .prefix { color: #777; } .field.urlsegment .prefix { color: #777; }
.field.urlsegment .cancel, .field.urlsegment .update, .field.urlsegment .edit { margin-left: 7px; } .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-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-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-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.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 .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; } .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

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

View File

@ -94,10 +94,12 @@
} }
if (currentVal != updateVal) { if (currentVal != updateVal) {
self.addClass('loading');
self.suggest(updateVal, function(data) { self.suggest(updateVal, function(data) {
var newVal = decodeURIComponent(data.value); var newVal = decodeURIComponent(data.value);
field.val(newVal); field.val(newVal);
self.edit(title); self.edit(title);
self.removeClass('loading');
}); });
} else { } else {
self.edit(); self.edit();

View 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;
}

View File

@ -93,12 +93,8 @@
* ----------------------------------------------------------------- */ * ----------------------------------------------------------------- */
.field.urlsegment { .field.urlsegment {
&.disabled { &.loading {
color: #444; background: url(../images/loading.gif) no-repeat 162px 8px;
padding-left: 0px;
margin-left: 0px;
background: none;
border-color: transparent;
} }
.prefix, .prefix,

View File

@ -10,7 +10,7 @@ class VirtualPageTest extends SapphireTest {
); );
protected $requiredExtensions = array( protected $requiredExtensions = array(
'Page' => array('VirtualPageTest_PageExtension') 'SiteTree' => array('VirtualPageTest_PageExtension')
); );
function setUp() { function setUp() {