mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FEATURE: Make navigator items more overloadable (from r97376)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@99047 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1f60bde524
commit
76b366e760
@ -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;
|
||||||
@ -341,7 +341,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,4 +80,4 @@
|
|||||||
background:transparent url(../../cms/images/logout.gif) no-repeat scroll right top !important;
|
background:transparent url(../../cms/images/logout.gif) no-repeat scroll right top !important;
|
||||||
padding-bottom:4px;
|
padding-bottom:4px;
|
||||||
padding-right:20px;
|
padding-right:20px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user