fixed #3341, introduced new navigation data property, "targetBlank", deprecated "target", which was never exposed anyway, and updated default values

v1.18.x
Julian Lam 10 years ago
parent 33434ed13d
commit 22251cb0bd

@ -67,7 +67,7 @@
"textClass": "visible-xs-inline",
"text": "\\[\\[global:header.admin\\]\\]",
"properties": {
"target": "_top",
"targetBlank": false,
"adminOnly": true
}
},

@ -62,12 +62,6 @@ define('admin/general/navigation', ['translator'], function(translator) {
data.properties = {};
available.forEach(function(item) {
if (item.route.match(data.route)) {
data.properties = item.properties || {};
}
});
for (var prop in properties) {
if (properties.hasOwnProperty(prop)) {
data.properties[prop] = properties[prop];

@ -80,7 +80,7 @@ $(document).ready(function() {
var isAdminRoute = url.startsWith('admin') && window.location.pathname.indexOf(RELATIVE_PATH + '/admin') !== 0;
var uploadsOrApi = url.startsWith('uploads') || url.startsWith('api');
if (isAdminRoute || uploadsOrApi) {
window.open(RELATIVE_PATH + '/' + url, '_blank');
window.open(RELATIVE_PATH + '/' + url, '_top');
return true;
}
return false;

@ -7,26 +7,33 @@
<!-- BEGIN enabled -->
<li class="well">
<form>
<label>ID: <small>optional</small>
<input class="form-control" type="text" name="id" value="{enabled.id}" />
</label>
<label>Route: <small>ex. /unread</small>
<input class="form-control" type="text" name="route" value="{enabled.route}" />
</label>
<label>Title: <small>shown upon mouseover</small>
<input class="form-control" type="text" name="title" value="{enabled.title}" />
</label>
<label>Text:
<input class="form-control" type="text" name="text" value="{enabled.text}" />
</label>
<label>Icon Class: <small><a href="http://fortawesome.github.io/Font-Awesome/cheatsheet/" target="_blank">pick one</a></small>
<input class="form-control" type="text" name="iconClass" value="{enabled.iconClass}" />
</label>
<label>Text Class: <small>optional</small>
<input class="form-control" type="text" name="textClass" value="{enabled.textClass}" />
</label>
<div class="row">
<div class="col-sm-6">
<label>ID: <small>optional</small>
<input class="form-control" type="text" name="id" value="{enabled.id}" />
</label>
<label>Title: <small>shown upon mouseover</small>
<input class="form-control" type="text" name="title" value="{enabled.title}" />
</label>
<label>Icon Class: <small><a href="http://fortawesome.github.io/Font-Awesome/cheatsheet/" target="_blank">pick one</a></small>
<input class="form-control" type="text" name="iconClass" value="{enabled.iconClass}" />
</label>
</div>
<div class="col-sm-6">
<label>Route: <small>ex. /unread</small>
<input class="form-control" type="text" name="route" value="{enabled.route}" />
</label>
<label>Text:
<input class="form-control" type="text" name="text" value="{enabled.text}" />
</label>
<label>Text Class: <small>optional</small>
<input class="form-control" type="text" name="textClass" value="{enabled.textClass}" />
</label>
</div>
</div>
<hr />
<strong>Properties:</strong>
<div class="checkbox">
<label>
@ -38,6 +45,11 @@
<input type="checkbox" name="property:loggedIn" <!-- IF enabled.properties.loggedIn -->checked<!-- ENDIF enabled.properties.loggedIn -->/> <strong>Only display to logged in users</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="property:targetBlank" <!-- IF enabled.properties.targetBlank -->checked<!-- ENDIF enabled.properties.targetBlank -->/> <strong>Open in a new window</strong>
</label>
</div>
<hr />

Loading…
Cancel
Save