mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-02 22:28:37 +02:00
FEATURE: Make navigator items more overloadable (from r97376) (from r99047)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102824 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8a781341c9
commit
9284d63827
@ -302,7 +302,7 @@ class ContentController extends Controller {
|
|||||||
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
|
Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
|
||||||
Requirements::customScript(<<<JS
|
Requirements::customScript(<<<JS
|
||||||
(function($) {
|
(function($) {
|
||||||
$('#switchView a').click(function() {
|
$('#switchView a.newWindow').click(function() {
|
||||||
var w = window.open(this.href,windowName(this.target));
|
var w = window.open(this.href,windowName(this.target));
|
||||||
w.focus();
|
w.focus();
|
||||||
return false;
|
return false;
|
||||||
@ -340,7 +340,8 @@ JS
|
|||||||
|
|
||||||
$text = $obj->getHTML($this->dataRecord);
|
$text = $obj->getHTML($this->dataRecord);
|
||||||
if($text) $items .= $text;
|
if($text) $items .= $text;
|
||||||
if(!$message) $message = $obj->getMessage($this);
|
$newMessage = $obj->getMessage($this);
|
||||||
|
if($newMessage) $message = $newMessage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
|
|||||||
static $priority = 20;
|
static $priority = 20;
|
||||||
|
|
||||||
function getHTML($controller) {
|
function getHTML($controller) {
|
||||||
if(Versioned::current_stage() == 'Stage') {
|
if(Versioned::current_stage() == 'Stage' && !(ClassInfo::exists('SiteTreeFutureState') && SiteTreeFutureState::get_future_datetime())) {
|
||||||
return "<a class=\"current\">". _t('ContentController.DRAFTSITE', 'Draft Site') ."</a>";
|
return "<a class=\"current\">". _t('ContentController.DRAFTSITE', 'Draft Site') ."</a>";
|
||||||
} else {
|
} else {
|
||||||
$thisPage = $controller->Link();
|
$thisPage = $controller->Link();
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
border-top: 2px solid #d4d0c8;
|
border-top: 2px solid #d4d0c8;
|
||||||
background-color:#81858d;
|
background-color:#81858d;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
overflow:hidden;
|
|
||||||
background: #4d4e5a url(../../cms/images/textures/footerBg.gif) repeat-x left top;
|
background: #4d4e5a url(../../cms/images/textures/footerBg.gif) repeat-x left top;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user