mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
PSR-2 conversion
This commit is contained in:
parent
fce6ffa85e
commit
23c8bc6de9
12
README.md
12
README.md
@ -9,9 +9,9 @@ This module is intended to replicate and expand upon the functionality provided
|
||||
* Indicates to a user that they are logged in
|
||||
* Indicates whether they are viewing draft or live content
|
||||
* Quickly edit the page you're viewing
|
||||
|
||||
|
||||
**For Developers**
|
||||
|
||||
|
||||
* When in Dev Mode links are included for accessing most of SilverStripe's [URL Variable Tools](http://doc.silverstripe.org/framework/en/reference/urlvariabletools)
|
||||
* Developers can access these tools on a live website by nominating themselves as a developer in the site config
|
||||
|
||||
@ -21,17 +21,17 @@ SilverStripe 3.1
|
||||
|
||||
##Installation
|
||||
|
||||
**Composer / Packagist ([best practice](http://doc.silverstripe.org/framework/en/trunk/installation/composer))**
|
||||
**Composer / Packagist ([best practice](http://doc.silverstripe.org/framework/en/trunk/installation/composer))**
|
||||
Add "jonom/silverstripe-betternavigator" to your requirements.
|
||||
|
||||
**Manually**
|
||||
**Manually**
|
||||
Download, place the folder in your project root, rename it to 'betternavigator' (if applicable) and run a dev/build?flush=1.
|
||||
|
||||
##How to use
|
||||
|
||||
Just place **$BetterNavigator** somewhere in your template(s). If your website uses caching, make sure BetterNavigator's output is excluded.
|
||||
|
||||
**Access developer tools on a live website**
|
||||
**Access developer tools on a live website**
|
||||
You can mark certain CMS users as developers in your site's config, so they can access developer tools when logged in. Example YAML:
|
||||
|
||||
```
|
||||
@ -61,4 +61,4 @@ The BetterNavigator.ss template's scope is set to the page that is being viewed,
|
||||
|
||||
##Bonus: better debugging tools
|
||||
|
||||
This module provide quick access to SilverStripe's built in [URL Variable Tools](http://doc.silverstripe.org/framework/en/reference/urlvariabletools) but reading their output isn't much fun. You can peek under SilverStripe's hood much more conveniently using the recently released [SilverStripe Clockwork](https://github.com/markguinn/silverstripe-clockwork) by Mark Guinn. Out of the box SQL Queries and controller events are logged. It's Chrome only for now.
|
||||
This module provide quick access to SilverStripe's built in [URL Variable Tools](http://doc.silverstripe.org/framework/en/reference/urlvariabletools) but reading their output isn't much fun. You can peek under SilverStripe's hood much more conveniently using the recently released [SilverStripe Clockwork](https://github.com/markguinn/silverstripe-clockwork) by Mark Guinn. Out of the box SQL Queries and controller events are logged. It's Chrome only for now.
|
||||
|
@ -7,4 +7,4 @@ LeftAndMain:
|
||||
- 'betternavigator/javascript/BN.LeftAndMain.Preview.js'
|
||||
ContentController:
|
||||
extensions:
|
||||
- BetterNavigator
|
||||
- BetterNavigator
|
||||
|
@ -2,65 +2,65 @@
|
||||
|
||||
class BetterNavigator extends DataExtension {
|
||||
|
||||
/**
|
||||
* Nominate developers who can access developer tools on live site
|
||||
* Example YAML:
|
||||
*
|
||||
* BetterNavigator:
|
||||
* developers:
|
||||
* - 'dev@yoursite.com'
|
||||
* - 'otherdev@yoursite.com'
|
||||
*
|
||||
* @config
|
||||
* @var array
|
||||
*/
|
||||
private static $developers;
|
||||
/**
|
||||
* Nominate developers who can access developer tools on live site
|
||||
* Example YAML:
|
||||
*
|
||||
* BetterNavigator:
|
||||
* developers:
|
||||
* - 'dev@yoursite.com'
|
||||
* - 'otherdev@yoursite.com'
|
||||
*
|
||||
* @config
|
||||
* @var array
|
||||
*/
|
||||
private static $developers;
|
||||
|
||||
/**
|
||||
* Provides a front-end utility menu with administrative functions and developer tools
|
||||
* Relies on SilverStripeNavigator
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function BetterNavigator() {
|
||||
$isDev = Director::isDev();
|
||||
/**
|
||||
* Provides a front-end utility menu with administrative functions and developer tools
|
||||
* Relies on SilverStripeNavigator
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function BetterNavigator() {
|
||||
$isDev = Director::isDev();
|
||||
|
||||
if($isDev || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
|
||||
if($this->owner && $this->owner->dataRecord && $this->owner->dataRecord instanceof SiteTree) {
|
||||
if($isDev || Permission::check('CMS_ACCESS_CMSMain') || Permission::check('VIEW_DRAFT_CONTENT')) {
|
||||
if($this->owner && $this->owner->dataRecord && $this->owner->dataRecord instanceof SiteTree) {
|
||||
|
||||
//Get SilverStripeNavigator links & stage info (CMS/Stage/Live/Archive)
|
||||
$nav = array();
|
||||
$navigator = new SilverStripeNavigator($this->owner->dataRecord);
|
||||
$items = $navigator->getItems();
|
||||
foreach($items as $item) {
|
||||
$nav[$item->getName()] = array(
|
||||
'Link' => $item->getLink(),
|
||||
'Active' => $item->isActive()
|
||||
);
|
||||
}
|
||||
|
||||
//Is the logged in member nominated as a developer?
|
||||
$member = Member::currentUser();
|
||||
$devs = Config::inst()->get('BetterNavigator', 'developers');
|
||||
$isDeveloper = $member && is_array($devs) ? in_array($member->Email, $devs) : false;
|
||||
|
||||
//Add other data for template
|
||||
$backURL = '?BackURL=' . urlencode($this->owner->Link());
|
||||
$bNData = array_merge($nav, array(
|
||||
'Member' => $member,
|
||||
'Stage' => Versioned::current_stage(),
|
||||
'LoginLink' => Config::inst()->get('Security', 'login_url') . $backURL,
|
||||
'LogoutLink' => 'Security/logout' . $backURL,
|
||||
'Mode' => Director::get_environment_type(),
|
||||
'IsDeveloper' => $isDeveloper
|
||||
));
|
||||
|
||||
//Merge with page data, send to template and render
|
||||
$bNData = new ArrayData($bNData);
|
||||
$page = $this->owner->customise(array('BetterNavigator' => $bNData));
|
||||
return $page->renderWith('BetterNavigator');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//Get SilverStripeNavigator links & stage info (CMS/Stage/Live/Archive)
|
||||
$nav = array();
|
||||
$navigator = new SilverStripeNavigator($this->owner->dataRecord);
|
||||
$items = $navigator->getItems();
|
||||
foreach($items as $item) {
|
||||
$nav[$item->getName()] = array(
|
||||
'Link' => $item->getLink(),
|
||||
'Active' => $item->isActive()
|
||||
);
|
||||
}
|
||||
|
||||
//Is the logged in member nominated as a developer?
|
||||
$member = Member::currentUser();
|
||||
$devs = Config::inst()->get('BetterNavigator', 'developers');
|
||||
$isDeveloper = $member && is_array($devs) ? in_array($member->Email, $devs) : false;
|
||||
|
||||
//Add other data for template
|
||||
$backURL = '?BackURL=' . urlencode($this->owner->Link());
|
||||
$bNData = array_merge($nav, array(
|
||||
'Member' => $member,
|
||||
'Stage' => Versioned::current_stage(),
|
||||
'LoginLink' => Config::inst()->get('Security', 'login_url') . $backURL,
|
||||
'LogoutLink' => 'Security/logout' . $backURL,
|
||||
'Mode' => Director::get_environment_type(),
|
||||
'IsDeveloper' => $isDeveloper
|
||||
));
|
||||
|
||||
//Merge with page data, send to template and render
|
||||
$bNData = new ArrayData($bNData);
|
||||
$page = $this->owner->customise(array('BetterNavigator' => $bNData));
|
||||
return $page->renderWith('BetterNavigator');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +1,17 @@
|
||||
{
|
||||
"name": "jonom/silverstripe-betternavigator",
|
||||
"description": "Front-end utility menu for SilverStripe websites featuring administration and development tools",
|
||||
"type": "silverstripe-module",
|
||||
"keywords": ["silverstripe", "navigator", "SilverStripeNavigator", "BetterNavigator"],
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [{
|
||||
"name": "Jonathon Menz",
|
||||
"homepage": "http://jonathonmenz.com"
|
||||
}],
|
||||
"require": {
|
||||
"silverstripe/framework": "~3.1"
|
||||
},
|
||||
"extra": {
|
||||
"installer-name": "betternavigator"
|
||||
}
|
||||
}
|
||||
"name": "jonom/silverstripe-betternavigator",
|
||||
"description": "Front-end utility menu for SilverStripe websites featuring administration and development tools",
|
||||
"type": "silverstripe-module",
|
||||
"keywords": ["silverstripe", "navigator", "SilverStripeNavigator", "BetterNavigator"],
|
||||
"license": "BSD-3-Clause",
|
||||
"authors": [{
|
||||
"name": "Jonathon Menz",
|
||||
"homepage": "http://jonathonmenz.com"
|
||||
}],
|
||||
"require": {
|
||||
"silverstripe/framework": "~3.1"
|
||||
},
|
||||
"extra": {
|
||||
"installer-name": "betternavigator"
|
||||
}
|
||||
}
|
||||
|
11
config.rb
Normal file
11
config.rb
Normal file
@ -0,0 +1,11 @@
|
||||
require 'compass/import-once/activate'
|
||||
http_path = "/betternavigator/"
|
||||
css_dir = "css"
|
||||
sass_dir = "scss"
|
||||
images_dir = "images"
|
||||
javascripts_dir = "javascript"
|
||||
fonts_dir = "fonts"
|
||||
output_style = :compact
|
||||
relative_assets = true
|
||||
line_comments = false
|
||||
sourcemap = true
|
@ -1,203 +1,54 @@
|
||||
.bn-icon-sprite, .bn-icon-close, .bn-icon-cog, .bn-icon-db, .bn-icon-devmode, .bn-icon-edit, .bn-icon-flush, .bn-icon-info, .bn-icon-tick, .bn-icon-tools, .bn-icon-user, .bn-icon-view {
|
||||
background-image: url('../images/bn-icon-sff60849a67.png');
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.bn-icon-sprite, .bn-icon-close, .bn-icon-cog, .bn-icon-db, .bn-icon-devmode, .bn-icon-edit, .bn-icon-flush, .bn-icon-info, .bn-icon-tick, .bn-icon-tools, .bn-icon-user, .bn-icon-view { background-image: url('../images/bn-icon-sff60849a67.png'); background-repeat: no-repeat; }
|
||||
|
||||
.bn-icon-close {
|
||||
background-position: 0 0;
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
.bn-icon-close { background-position: 0 0; height: 12px; width: 12px; }
|
||||
|
||||
.bn-icon-cog {
|
||||
background-position: 0 -12px;
|
||||
height: 17px;
|
||||
width: 17px;
|
||||
}
|
||||
.bn-icon-cog { background-position: 0 -12px; height: 17px; width: 17px; }
|
||||
|
||||
.bn-icon-db {
|
||||
background-position: 0 -29px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-db { background-position: 0 -29px; height: 16px; width: 16px; }
|
||||
|
||||
.bn-icon-devmode {
|
||||
background-position: 0 -45px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-devmode { background-position: 0 -45px; height: 16px; width: 16px; }
|
||||
|
||||
.bn-icon-edit {
|
||||
background-position: 0 -61px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-edit { background-position: 0 -61px; height: 16px; width: 16px; }
|
||||
|
||||
.bn-icon-flush {
|
||||
background-position: 0 -77px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-flush { background-position: 0 -77px; height: 16px; width: 16px; }
|
||||
|
||||
.bn-icon-info {
|
||||
background-position: 0 -93px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-info { background-position: 0 -93px; height: 16px; width: 16px; }
|
||||
|
||||
.bn-icon-tick {
|
||||
background-position: 0 -109px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-tick { background-position: 0 -109px; height: 16px; width: 16px; }
|
||||
|
||||
.bn-icon-tools {
|
||||
background-position: 0 -125px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-tools { background-position: 0 -125px; height: 16px; width: 16px; }
|
||||
|
||||
.bn-icon-user {
|
||||
background-position: 0 -141px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-user { background-position: 0 -141px; height: 16px; width: 16px; }
|
||||
|
||||
.bn-icon-view {
|
||||
background-position: 0 -157px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
.bn-icon-view { background-position: 0 -157px; height: 16px; width: 16px; }
|
||||
|
||||
span[class^='bn-icon'], span[class*=' bn-icon'] {
|
||||
display: inline-block;
|
||||
}
|
||||
span[class^='bn-icon'], span[class*=' bn-icon'] { display: inline-block; }
|
||||
|
||||
#BetterNavigator {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 99999;
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
background: #cfd8de;
|
||||
border: 1px solid #ecf0f2;
|
||||
border-width: 0 0 1px 1px;
|
||||
box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5);
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
#BetterNavigator.collapsed {
|
||||
-moz-transform-origin: right top;
|
||||
-ms-transform-origin: right top;
|
||||
-webkit-transform-origin: right top;
|
||||
transform-origin: right top;
|
||||
-moz-transform: rotate(90deg) translate(100%, 0);
|
||||
-ms-transform: rotate(90deg) translate(100%, 0);
|
||||
-webkit-transform: rotate(90deg) translate(100%, 0);
|
||||
transform: rotate(90deg) translate(100%, 0);
|
||||
border-width: 0 1px 1px 0;
|
||||
}
|
||||
#BetterNavigator.collapsed #BetterNavigatorStatus .bn-icon-close {
|
||||
display: none;
|
||||
}
|
||||
#BetterNavigator.collapsed #BetterNavigatorStatus .bn-icon-cog {
|
||||
display: inline-block;
|
||||
}
|
||||
#BetterNavigator.collapsed #BetterNavigatorContent {
|
||||
display: none;
|
||||
}
|
||||
#BetterNavigator { position: fixed; top: 0; right: 0; z-index: 99999; max-height: 100%; overflow: auto; background: #cfd8de; border: 1px solid #ecf0f2; border-width: 0 0 1px 1px; box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5); font-family: Helvetica, Arial, sans-serif; font-size: 12px; text-align: left; }
|
||||
#BetterNavigator.collapsed { -moz-transform-origin: right top; -ms-transform-origin: right top; -webkit-transform-origin: right top; transform-origin: right top; -moz-transform: rotate(90deg) translate(100%, 0); -ms-transform: rotate(90deg) translate(100%, 0); -webkit-transform: rotate(90deg) translate(100%, 0); transform: rotate(90deg) translate(100%, 0); border-width: 0 1px 1px 0; }
|
||||
#BetterNavigator.collapsed #BetterNavigatorStatus .bn-icon-close { display: none; }
|
||||
#BetterNavigator.collapsed #BetterNavigatorStatus .bn-icon-cog { display: inline-block; }
|
||||
#BetterNavigator.collapsed #BetterNavigatorContent { display: none; }
|
||||
|
||||
#BetterNavigatorStatus {
|
||||
color: #fff;
|
||||
background: #6f6f6f;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
padding: 10px 15px 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#BetterNavigatorStatus.Live {
|
||||
background: #39b54a;
|
||||
}
|
||||
#BetterNavigatorStatus.Live:hover {
|
||||
background: #36ab46;
|
||||
}
|
||||
#BetterNavigatorStatus.Stage {
|
||||
background: #f26c4f;
|
||||
}
|
||||
#BetterNavigatorStatus.Stage:hover {
|
||||
background: #e5664b;
|
||||
}
|
||||
#BetterNavigatorStatus .bn-icon-cog {
|
||||
margin: -4px 8px -4px -4px;
|
||||
display: none;
|
||||
}
|
||||
#BetterNavigatorStatus .bn-icon-close {
|
||||
float: right;
|
||||
margin: 1px 0 0 0;
|
||||
}
|
||||
#BetterNavigatorStatus .bn-icon-cog,
|
||||
#BetterNavigatorStatus .bn-icon-close {
|
||||
opacity: .7;
|
||||
}
|
||||
#BetterNavigatorStatus:hover {
|
||||
background: dimgray;
|
||||
}
|
||||
#BetterNavigatorStatus:hover .bn-icon-cog,
|
||||
#BetterNavigatorStatus:hover .bn-icon-close {
|
||||
opacity: 1;
|
||||
}
|
||||
#BetterNavigatorStatus { color: #fff; background: #6f6f6f; text-transform: uppercase; cursor: pointer; padding: 10px 15px 8px; font-weight: bold; }
|
||||
#BetterNavigatorStatus.Live { background: #39b54a; }
|
||||
#BetterNavigatorStatus.Live:hover { background: #36ac46; }
|
||||
#BetterNavigatorStatus.Stage { background: #f26c4f; }
|
||||
#BetterNavigatorStatus.Stage:hover { background: #e6674b; }
|
||||
#BetterNavigatorStatus .bn-icon-cog { margin: -4px 8px -4px -4px; display: none; }
|
||||
#BetterNavigatorStatus .bn-icon-close { float: right; margin: 1px 0 0 0; }
|
||||
#BetterNavigatorStatus .bn-icon-cog, #BetterNavigatorStatus .bn-icon-close { opacity: .7; }
|
||||
#BetterNavigatorStatus:hover { background: dimgray; }
|
||||
#BetterNavigatorStatus:hover .bn-icon-cog, #BetterNavigatorStatus:hover .bn-icon-close { opacity: 1; }
|
||||
|
||||
#BetterNavigatorContent {
|
||||
padding: 6px;
|
||||
color: #71767a;
|
||||
}
|
||||
#BetterNavigatorContent .bn-heading {
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 11px;
|
||||
margin: 8px 0 4px 0;
|
||||
}
|
||||
#BetterNavigatorContent span[class^='bn-icon'], #BetterNavigatorContent span[class*=' bn-icon'] {
|
||||
margin: -2px 5px -3px -2px;
|
||||
}
|
||||
#BetterNavigatorContent a,
|
||||
#BetterNavigatorContent span.bn-disabled {
|
||||
display: block;
|
||||
background: #eceff2;
|
||||
color: #313639;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
border-radius: 5px;
|
||||
border-bottom: 1px solid #a3aaaf;
|
||||
margin: 0 0 4px 0;
|
||||
padding: 6px 10px 5px 10px;
|
||||
line-height: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#BetterNavigatorContent a .light,
|
||||
#BetterNavigatorContent span.bn-disabled .light {
|
||||
font-weight: normal;
|
||||
}
|
||||
#BetterNavigatorContent a:focus,
|
||||
#BetterNavigatorContent a:hover,
|
||||
#BetterNavigatorContent a:active {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
#BetterNavigatorContent span.bn-disabled {
|
||||
background: #afbac0;
|
||||
color: #51565a;
|
||||
cursor: default;
|
||||
}
|
||||
#BetterNavigatorContent { padding: 6px; color: #71767a; }
|
||||
#BetterNavigatorContent .bn-heading { text-align: center; text-transform: uppercase; font-size: 11px; margin: 8px 0 4px 0; }
|
||||
#BetterNavigatorContent span[class^='bn-icon'], #BetterNavigatorContent span[class*=' bn-icon'] { margin: -2px 5px -3px -2px; }
|
||||
#BetterNavigatorContent a, #BetterNavigatorContent span.bn-disabled { display: block; background: #eceff2; color: #313639; font-family: Helvetica, Arial, sans-serif; font-size: 12px; border-radius: 5px; border-bottom: 1px solid #a3aaaf; margin: 0 0 4px 0; padding: 6px 10px 5px 10px; line-height: 16px; font-weight: bold; }
|
||||
#BetterNavigatorContent a .light, #BetterNavigatorContent span.bn-disabled .light { font-weight: normal; }
|
||||
#BetterNavigatorContent a:focus, #BetterNavigatorContent a:hover, #BetterNavigatorContent a:active { background: #fff; color: #000; }
|
||||
#BetterNavigatorContent span.bn-disabled { background: #afbac0; color: #51565a; cursor: default; }
|
||||
|
||||
body > p.message {
|
||||
text-align: left;
|
||||
background: #fff;
|
||||
color: #222;
|
||||
padding: 10px 20px;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-left: 5px solid #1d8aff;
|
||||
}
|
||||
body > p.message { text-align: left; background: #fff; color: #222; padding: 10px 20px; margin: 0; border-bottom: 1px solid #ccc; border-left: 5px solid #1d8aff; }
|
||||
|
||||
/*# sourceMappingURL=betternavigator.css.map */
|
||||
|
7
css/betternavigator.css.map
Normal file
7
css/betternavigator.css.map
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"mappings": "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",
|
||||
"sources": ["../../../../../../Applications/CodeKit.app/Contents/Resources/engines/compass/compass-core/stylesheets/compass/utilities/sprites/_base.scss","../scss/betternavigator.scss","../../../../../../Applications/CodeKit.app/Contents/Resources/engines/compass/compass-core/stylesheets/compass/_support.scss","../../../../../../Applications/CodeKit.app/Contents/Resources/engines/compass/compass-core/stylesheets/compass/css3/_transform.scss"],
|
||||
"names": [],
|
||||
"file": "betternavigator.css"
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
//Hide the navigator when we're in the CMS
|
||||
//ToDo - should be easier to use afterIframeAdjustedForPreview() but I couldn't work out how to do this
|
||||
(function($) {
|
||||
$('.cms-preview').entwine({
|
||||
onadd: function() {
|
||||
var iframe = this.find('iframe');
|
||||
if (iframe){
|
||||
iframe.bind('load', function() {
|
||||
var doc = this.contentDocument;
|
||||
if(!doc) return;
|
||||
var navi = doc.getElementById('BetterNavigator');
|
||||
if(navi) navi.style.display = 'none';
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
(function($) {
|
||||
$('.cms-preview').entwine({
|
||||
onadd: function() {
|
||||
var iframe = this.find('iframe');
|
||||
if (iframe){
|
||||
iframe.bind('load', function() {
|
||||
var doc = this.contentDocument;
|
||||
if(!doc) {return;}
|
||||
var navi = doc.getElementById('BetterNavigator');
|
||||
if(navi) {navi.style.display = 'none';}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}(jQuery));
|
||||
|
@ -5,40 +5,40 @@ function getCookie(cname) {
|
||||
for(var i=0; i<ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0)===' ') {
|
||||
c = c.substring(1);
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) !== -1) {
|
||||
return c.substring(name.length,c.length);
|
||||
return c.substring(name.length,c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function initialiseBetterNavigator() {
|
||||
//Dom elements
|
||||
var BetterNavigator = document.getElementById("BetterNavigator");
|
||||
var BetterNavigatorStatus = document.getElementById("BetterNavigatorStatus");
|
||||
//Dom elements
|
||||
var BetterNavigator = document.getElementById("BetterNavigator");
|
||||
var BetterNavigatorStatus = document.getElementById("BetterNavigatorStatus");
|
||||
|
||||
//Toggle visibility of menu by clicking status
|
||||
BetterNavigatorStatus.onclick = function () {
|
||||
BetterNavigator.className = BetterNavigator.className === 'collapsed' ? 'open' : 'collapsed';
|
||||
//Set cookie to remember state
|
||||
document.cookie = "BetterNavigator=" + BetterNavigator.className + ";path=/";
|
||||
};
|
||||
//Toggle visibility of menu by clicking status
|
||||
BetterNavigatorStatus.onclick = function () {
|
||||
BetterNavigator.className = BetterNavigator.className === 'collapsed' ? 'open' : 'collapsed';
|
||||
//Set cookie to remember state
|
||||
document.cookie = "BetterNavigator=" + BetterNavigator.className + ";path=/";
|
||||
};
|
||||
|
||||
//Restore menu state
|
||||
if (getCookie('BetterNavigator') === 'open') {
|
||||
BetterNavigator.className = 'open';
|
||||
}
|
||||
//Restore menu state
|
||||
if (getCookie('BetterNavigator') === 'open') {
|
||||
BetterNavigator.className = 'open';
|
||||
}
|
||||
}
|
||||
|
||||
if (document.addEventListener) {
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
//wait til DOM is ready
|
||||
initialiseBetterNavigator();
|
||||
});
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
//wait til DOM is ready
|
||||
initialiseBetterNavigator();
|
||||
});
|
||||
} else {
|
||||
//This is the case for IE8 and below
|
||||
//initialise straight away - fine if script is loaded after BN dom element
|
||||
initialiseBetterNavigator();
|
||||
}
|
||||
//This is the case for IE8 and below
|
||||
//initialise straight away - fine if script is loaded after BN dom element
|
||||
initialiseBetterNavigator();
|
||||
}
|
||||
|
@ -12,151 +12,151 @@ span[class^='bn-icon'],span[class*=' bn-icon']{
|
||||
//Container
|
||||
|
||||
#BetterNavigator {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 99999;
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
background: #cfd8de;
|
||||
border: 1px solid #ecf0f2;
|
||||
border-width: 0 0 1px 1px;
|
||||
box-shadow: 0px 0px 3px rgba(0,0,0,0.5);
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 99999;
|
||||
max-height: 100%;
|
||||
overflow: auto;
|
||||
background: #cfd8de;
|
||||
border: 1px solid #ecf0f2;
|
||||
border-width: 0 0 1px 1px;
|
||||
box-shadow: 0px 0px 3px rgba(0,0,0,0.5);
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
|
||||
//Toggle states
|
||||
|
||||
&.collapsed {
|
||||
@include transform-origin(right,top);
|
||||
@include transform(rotate(90deg) translate(100%,0));
|
||||
border-width: 0 1px 1px 0;
|
||||
|
||||
#BetterNavigatorStatus {
|
||||
|
||||
.bn-icon-close {
|
||||
display: none;
|
||||
}
|
||||
.bn-icon-cog {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
#BetterNavigatorContent {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
//Toggle states
|
||||
|
||||
&.collapsed {
|
||||
@include transform-origin(right,top);
|
||||
@include transform(rotate(90deg) translate(100%,0));
|
||||
border-width: 0 1px 1px 0;
|
||||
|
||||
#BetterNavigatorStatus {
|
||||
|
||||
.bn-icon-close {
|
||||
display: none;
|
||||
}
|
||||
.bn-icon-cog {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
#BetterNavigatorContent {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Status
|
||||
|
||||
#BetterNavigatorStatus {
|
||||
color: #fff;
|
||||
background: #6f6f6f;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
padding: 10px 15px 8px;
|
||||
font-weight: bold;
|
||||
|
||||
&.Live {
|
||||
background: #39b54a;
|
||||
|
||||
&:hover {
|
||||
background: shade(#39b54a, 5);
|
||||
}
|
||||
}
|
||||
|
||||
&.Stage {
|
||||
background: #f26c4f;
|
||||
|
||||
&:hover {
|
||||
background: shade(#f26c4f, 5);
|
||||
}
|
||||
}
|
||||
|
||||
.bn-icon-cog {
|
||||
margin: -4px 8px -4px -4px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bn-icon-close {
|
||||
float: right;
|
||||
margin: 1px 0 0 0;
|
||||
}
|
||||
|
||||
.bn-icon-cog,
|
||||
.bn-icon-close {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: shade(#6f6f6f, 5);
|
||||
|
||||
.bn-icon-cog,
|
||||
.bn-icon-close {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
color: #fff;
|
||||
background: #6f6f6f;
|
||||
text-transform: uppercase;
|
||||
cursor: pointer;
|
||||
padding: 10px 15px 8px;
|
||||
font-weight: bold;
|
||||
|
||||
&.Live {
|
||||
background: #39b54a;
|
||||
|
||||
&:hover {
|
||||
background: shade(#39b54a, 5);
|
||||
}
|
||||
}
|
||||
|
||||
&.Stage {
|
||||
background: #f26c4f;
|
||||
|
||||
&:hover {
|
||||
background: shade(#f26c4f, 5);
|
||||
}
|
||||
}
|
||||
|
||||
.bn-icon-cog {
|
||||
margin: -4px 8px -4px -4px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bn-icon-close {
|
||||
float: right;
|
||||
margin: 1px 0 0 0;
|
||||
}
|
||||
|
||||
.bn-icon-cog,
|
||||
.bn-icon-close {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: shade(#6f6f6f, 5);
|
||||
|
||||
.bn-icon-cog,
|
||||
.bn-icon-close {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Content
|
||||
|
||||
#BetterNavigatorContent {
|
||||
padding: 6px;
|
||||
color: #71767a;
|
||||
|
||||
.bn-heading {
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 11px;
|
||||
margin: 8px 0 4px 0;
|
||||
}
|
||||
padding: 6px;
|
||||
color: #71767a;
|
||||
|
||||
span[class^='bn-icon'],span[class*=' bn-icon']{
|
||||
margin: -2px 5px -3px -2px;
|
||||
}
|
||||
|
||||
a,
|
||||
span.bn-disabled {
|
||||
display: block;
|
||||
background: #eceff2;
|
||||
color: #313639;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
border-radius: 5px;
|
||||
border-bottom: 1px solid #a3aaaf;
|
||||
margin: 0 0 4px 0;
|
||||
padding: 6px 10px 5px 10px;
|
||||
line-height: 16px;
|
||||
font-weight: bold;
|
||||
|
||||
.light {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
a:focus,
|
||||
a:hover,
|
||||
a:active {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
span.bn-disabled {
|
||||
background: #afbac0;
|
||||
color: #51565a;
|
||||
cursor: default;
|
||||
}
|
||||
.bn-heading {
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 11px;
|
||||
margin: 8px 0 4px 0;
|
||||
}
|
||||
|
||||
span[class^='bn-icon'],span[class*=' bn-icon']{
|
||||
margin: -2px 5px -3px -2px;
|
||||
}
|
||||
|
||||
a,
|
||||
span.bn-disabled {
|
||||
display: block;
|
||||
background: #eceff2;
|
||||
color: #313639;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
border-radius: 5px;
|
||||
border-bottom: 1px solid #a3aaaf;
|
||||
margin: 0 0 4px 0;
|
||||
padding: 6px 10px 5px 10px;
|
||||
line-height: 16px;
|
||||
font-weight: bold;
|
||||
|
||||
.light {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
a:focus,
|
||||
a:hover,
|
||||
a:active {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
span.bn-disabled {
|
||||
background: #afbac0;
|
||||
color: #51565a;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
//Some hlep for debugging info
|
||||
body > p.message {
|
||||
text-align: left;
|
||||
background: #fff;
|
||||
color: #222;
|
||||
padding: 10px 20px;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-left: 5px solid #1d8aff;
|
||||
}
|
||||
text-align: left;
|
||||
background: #fff;
|
||||
color: #222;
|
||||
padding: 10px 20px;
|
||||
margin: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-left: 5px solid #1d8aff;
|
||||
}
|
||||
|
@ -1,91 +1,91 @@
|
||||
<% if $ID > 0 %><%-- Only show on 'real' pages --%>
|
||||
|
||||
<% require javascript("betternavigator/javascript/betternavigator.js") %>
|
||||
<% require css("betternavigator/css/betternavigator.css") %>
|
||||
|
||||
<div id="BetterNavigator" class="collapsed">
|
||||
|
||||
<% with $BetterNavigator %>
|
||||
<div id="BetterNavigatorStatus" class="$Stage">
|
||||
<span class="bn-icon-cog"></span>
|
||||
<% if $LiveLink.Active %>Published<% end_if %>
|
||||
<% if $StageLink.Active %>Draft<% end_if %>
|
||||
<% if $ArchiveLink.Active %>Archived<% end_if %>
|
||||
<span class="bn-icon-close"></span>
|
||||
</div>
|
||||
<% end_with %>
|
||||
|
||||
<div id="BetterNavigatorContent">
|
||||
|
||||
<div class="bn-links">
|
||||
|
||||
<% with $BetterNavigator %>
|
||||
<% if not $LiveLink.Active %>
|
||||
<% if $LiveLink.Link %>
|
||||
<a href="$LiveLink.Link"><span class="bn-icon-view"></span>View Published</a>
|
||||
<% else %>
|
||||
<span class="bn-disabled"><span class="bn-icon-view"></span>Not yet published</span>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
<% if not $StageLink.Active %>
|
||||
<% if $StageLink.Link %>
|
||||
<a href="$StageLink.Link"><span class="bn-icon-view"></span>View Draft</a>
|
||||
<% else %>
|
||||
<span class="bn-disabled"><span class="bn-icon-view"></span>Deleted from draft site</span>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
<a href="$CMSLink.Link" target="_blank"><span class="bn-icon-edit"></span>Edit in CMS</a>
|
||||
|
||||
<% if $Member %>
|
||||
<a href="$LogoutLink"><span class="bn-icon-user"></span>Log out<% if $Member.FirstName %><span class="light"> ($Member.FirstName)</span><% end_if %></a>
|
||||
<% else %>
|
||||
<a href="$LoginLink"><span class="bn-icon-user"></span>Log in</a>
|
||||
<% end_if %>
|
||||
<% end_with %>
|
||||
|
||||
</div>
|
||||
|
||||
<% include BetterNavigatorExtraContent %>
|
||||
|
||||
<% if $BetterNavigator.Mode=='dev' || $BetterNavigator.IsDeveloper %>
|
||||
|
||||
<div class="bn-heading">Developer Tools</div>
|
||||
|
||||
<div class="bn-links">
|
||||
|
||||
<% if $BetterNavigator.Mode='dev' %>
|
||||
<span class="bn-disabled" title="Log out to end Dev Mode"><span class="bn-icon-tick"></span>Dev Mode On</span>
|
||||
<% else %>
|
||||
<a href="$Link?isDev=1"><span class="bn-icon-devmode"></span>Dev Mode</a>
|
||||
<% end_if %>
|
||||
|
||||
<a href="$Link?flush=1" title="Flush templates and manifest, and regenerate images for this page (behaviour varies by Framework version)"><span class="bn-icon-flush"></span>Flush Caches</a>
|
||||
<a href="dev/build/?flush=1" target="_blank" title="Build database and flush caches (excludes template caches pre SS-3.1.7)"><span class="bn-icon-db"></span>Build Database</a>
|
||||
<a href="dev" target="_blank"><span class="bn-icon-tools"></span>Dev Menu</a>
|
||||
|
||||
</div>
|
||||
|
||||
<% include BetterNavigatorExtraDevTools %>
|
||||
|
||||
<div class="bn-heading">Debugging</div>
|
||||
|
||||
<div class="bn-links">
|
||||
|
||||
<a href="$Link?showtemplate=1"><span class="bn-icon-info"></span>Show Template</a>
|
||||
<a href="$Link?debug=1&isDev=1"><span class="bn-icon-info"></span>Debug Page</a>
|
||||
<a href="$Link?debugmethods=1"><span class="bn-icon-info"></span>Debug Methods</a>
|
||||
<a href="$Link?debug_request=1&isDev=1"><span class="bn-icon-info"></span>Debug Request</a>
|
||||
<a href="$Link?debugfailover=1&isDev=1"><span class="bn-icon-info"></span>Debug Failover</a>
|
||||
<a href="$Link?showqueries=1&isDev=1"><span class="bn-icon-info"></span>Show Queries</a>
|
||||
<a href="$Link?previewwrite=1&isDev=1"><span class="bn-icon-info"></span>Preview write</a>
|
||||
|
||||
</div>
|
||||
|
||||
<% include BetterNavigatorExtraDebugging %>
|
||||
|
||||
<% end_if %>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% require javascript("betternavigator/javascript/betternavigator.js") %>
|
||||
<% require css("betternavigator/css/betternavigator.css") %>
|
||||
|
||||
<div id="BetterNavigator" class="collapsed">
|
||||
|
||||
<% with $BetterNavigator %>
|
||||
<div id="BetterNavigatorStatus" class="$Stage">
|
||||
<span class="bn-icon-cog"></span>
|
||||
<% if $LiveLink.Active %>Published<% end_if %>
|
||||
<% if $StageLink.Active %>Draft<% end_if %>
|
||||
<% if $ArchiveLink.Active %>Archived<% end_if %>
|
||||
<span class="bn-icon-close"></span>
|
||||
</div>
|
||||
<% end_with %>
|
||||
|
||||
<div id="BetterNavigatorContent">
|
||||
|
||||
<div class="bn-links">
|
||||
|
||||
<% with $BetterNavigator %>
|
||||
<% if not $LiveLink.Active %>
|
||||
<% if $LiveLink.Link %>
|
||||
<a href="$LiveLink.Link"><span class="bn-icon-view"></span>View Published</a>
|
||||
<% else %>
|
||||
<span class="bn-disabled"><span class="bn-icon-view"></span>Not yet published</span>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
<% if not $StageLink.Active %>
|
||||
<% if $StageLink.Link %>
|
||||
<a href="$StageLink.Link"><span class="bn-icon-view"></span>View Draft</a>
|
||||
<% else %>
|
||||
<span class="bn-disabled"><span class="bn-icon-view"></span>Deleted from draft site</span>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
<a href="$CMSLink.Link" target="_blank"><span class="bn-icon-edit"></span>Edit in CMS</a>
|
||||
|
||||
<% if $Member %>
|
||||
<a href="$LogoutLink"><span class="bn-icon-user"></span>Log out<% if $Member.FirstName %><span class="light"> ($Member.FirstName)</span><% end_if %></a>
|
||||
<% else %>
|
||||
<a href="$LoginLink"><span class="bn-icon-user"></span>Log in</a>
|
||||
<% end_if %>
|
||||
<% end_with %>
|
||||
|
||||
</div>
|
||||
|
||||
<% include BetterNavigatorExtraContent %>
|
||||
|
||||
<% if $BetterNavigator.Mode=='dev' || $BetterNavigator.IsDeveloper %>
|
||||
|
||||
<div class="bn-heading">Developer Tools</div>
|
||||
|
||||
<div class="bn-links">
|
||||
|
||||
<% if $BetterNavigator.Mode='dev' %>
|
||||
<span class="bn-disabled" title="Log out to end Dev Mode"><span class="bn-icon-tick"></span>Dev Mode On</span>
|
||||
<% else %>
|
||||
<a href="$Link?isDev=1"><span class="bn-icon-devmode"></span>Dev Mode</a>
|
||||
<% end_if %>
|
||||
|
||||
<a href="$Link?flush=1" title="Flush templates and manifest, and regenerate images for this page (behaviour varies by Framework version)"><span class="bn-icon-flush"></span>Flush Caches</a>
|
||||
<a href="dev/build/?flush=1" target="_blank" title="Build database and flush caches (excludes template caches pre SS-3.1.7)"><span class="bn-icon-db"></span>Build Database</a>
|
||||
<a href="dev" target="_blank"><span class="bn-icon-tools"></span>Dev Menu</a>
|
||||
|
||||
</div>
|
||||
|
||||
<% include BetterNavigatorExtraDevTools %>
|
||||
|
||||
<div class="bn-heading">Debugging</div>
|
||||
|
||||
<div class="bn-links">
|
||||
|
||||
<a href="$Link?showtemplate=1"><span class="bn-icon-info"></span>Show Template</a>
|
||||
<a href="$Link?debug=1&isDev=1"><span class="bn-icon-info"></span>Debug Page</a>
|
||||
<a href="$Link?debugmethods=1"><span class="bn-icon-info"></span>Debug Methods</a>
|
||||
<a href="$Link?debug_request=1&isDev=1"><span class="bn-icon-info"></span>Debug Request</a>
|
||||
<a href="$Link?debugfailover=1&isDev=1"><span class="bn-icon-info"></span>Debug Failover</a>
|
||||
<a href="$Link?showqueries=1&isDev=1"><span class="bn-icon-info"></span>Show Queries</a>
|
||||
<a href="$Link?previewwrite=1&isDev=1"><span class="bn-icon-info"></span>Preview write</a>
|
||||
|
||||
</div>
|
||||
|
||||
<% include BetterNavigatorExtraDebugging %>
|
||||
|
||||
<% end_if %>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
@ -1 +1 @@
|
||||
<%-- Implement this template to add extra content below the standard buttons --%>
|
||||
<%-- Implement this template to add extra content below the standard buttons --%>
|
||||
|
@ -1 +1 @@
|
||||
<%-- Implement this template to add content below the debugging menu --%>
|
||||
<%-- Implement this template to add content below the debugging menu --%>
|
||||
|
@ -1 +1 @@
|
||||
<%-- Implement this template to add content below the developer tools menu --%>
|
||||
<%-- Implement this template to add content below the developer tools menu --%>
|
||||
|
Loading…
Reference in New Issue
Block a user