Skip to content

Commit

Permalink
Navigationsoptionen umgruppieren
Browse files Browse the repository at this point in the history
  • Loading branch information
GB609 authored Sep 25, 2024
1 parent c337bb6 commit a7b817d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions plugins/MobileLayout/js/MobileLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
padding:5px; margin:5px 0px;`)
.ruleFor(DOM.h4, "margin-top:5px")
.ruleFor(CheckOption, "display: block"),

OptionGroup('NAV', false,
DOM.h4().add('Navigation allgemein'),
CheckOption('linksAsButtons', 'Menüeinträge mit Rahmen und vergößertem Klickbereich anzeigen', true)
),
OptionGroup('PROV', false,
DOM.h4().add('In Provinzen'),
new BorderedGroup('Navigation')
new BorderedGroup('Menü allgemein')
.add(RadioSelectionOption("shortLinkTable", "Minilink-Tabelle", [
Entry('', 'icons', 'Bilder verwenden', true),
Entry('', 'enlargeLinks', 'Links vergrößern'),
Entry('', 'no-mods', 'unberührt lassen'),
Entry('', 'hide', 'ausblenden')]))
.add(CheckOption('linksAsButtons', 'Menüeinträge mit Rahmen und vergößertem Klickbereich anzeigen', true)),
Entry('', 'hide', 'ausblenden')])),
//new BorderedGroup('Ansicht'),
new BorderedGroup('Baumenü')
.add(CheckOption('hideUnavailable', 'Unbaubares ausblenden (Uniques, Küste/Land, betrifft NICHT fehlendes Material)', true))
Expand Down Expand Up @@ -200,10 +202,6 @@

//no default on purpose - do nothing if not specified
}

if(OPTIONS.PROV.linksAsButtons == true){
this.stylesheet.addRule(TEMPLATE.asText('naviFrame.css'));
}
}

var LINK_TITLE_PATTERN = /.*#title=(.*)$/;
Expand All @@ -219,6 +217,10 @@
let frameEle = window.frames[i].frameElement;
frameEle.parentElement.setAttribute("id", "frameDiv_" + frameEle.getAttribute("name"));
}

if(OPTIONS.NAV.linksAsButtons == true && document.title.includes("Navigation")){
HOOKS.stylesheet.addRule(TEMPLATE.asText('naviFrame.css'));
}

let newTitle = document.title;
let path = location.pathname.substr(1) || "index.php";
Expand Down

0 comments on commit a7b817d

Please sign in to comment.