1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 01:34:31 +02:00

Fix issue processwire/processwire-issues#818 where listable but not editable or viewable page in dropdown for Pages > Tree > [items] was navigating to some useless JSON output. Also disabled the fallback to view URL when page is viewable but not editable.

This commit is contained in:
Ryan Cramer
2019-03-01 09:21:18 -05:00
parent b76deded68
commit be84331dbd
3 changed files with 10 additions and 5 deletions

View File

@@ -337,13 +337,17 @@ var ProcessWireAdmin = {
if(this.url == 'navJSON') {
// click triggers another navJSON load
} else {
var url = this.url.indexOf('/') === 0 ? this.url : data.url + this.url;
} else if(this.url.indexOf('/') === 0) {
url = this.url;
} else if(this.url.length) {
url = data.url + this.url;
}
var $li = $("<li class='ui-menu-item'></li>");
var $a = $("<a href='" + url + "'>" + icon + this.label + "</a>");
var $a = $("<a>" + icon + this.label + "</a>");
var $ulSub = null;
if(url.length) $a.attr('href', url);
if(this.navJSON) {
$a.attr('data-json', this.navJSON).addClass('pw-has-items pw-has-ajax-items');

File diff suppressed because one or more lines are too long