Skip to content

Commit

Permalink
update materialize bits. see issue #886
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanejohnson committed Jul 15, 2022
1 parent 4d81cab commit 436b191
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions admin/ui/manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var tmplManual = template.Must(template.New("manual").Funcs(funcs).Parse( // lan
<a href="/" class="brand-logo"><img alt="Fabio Logo" style="margin: 15px 0" class="logo" src="/assets/logo.bw.svg"> {{if .Title}} - {{.Title}}{{end}}</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a href="/routes">Routes</a></li>
<li><a class="dropdown-button" href="#!" data-activates="overrides">Overrides<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a class="dropdown-trigger dropdown-button" href="#" data-target="overrides">Overrides<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a href="https://github.com/fabiolb/fabio/blob/master/CHANGELOG.md">{{.Version}}</a></li>
<li><a href="https://github.com/fabiolb/fabio">Github</a></li>
</ul>
Expand Down Expand Up @@ -104,14 +104,15 @@ var tmplManual = template.Must(template.New("manual").Funcs(funcs).Parse( // lan
<script>
$(function(){
$('.dropdown-trigger').dropdown();
let params={};window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(str,key,value){params[key] = value;});
$.get({{.APIPath}}, function(data) {
const $ta1 = $("#textarea1");
$("input[name=version]").val(data.version);
$("textarea>label").val("Version " + data.version);
$ta1.val(data.value);
$ta1.trigger('autoresize');
M.textareaAutoResize($('#textarea1'));
});
$.get('/api/paths', function(data) {
Expand Down
7 changes: 4 additions & 3 deletions admin/ui/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var tmplRoutes = template.Must(template.New("routes").Parse( // language=HTML
<div class="nav-wrapper">
<a href="/" class="brand-logo">fabio{{if .Title}} - {{.Title}}{{end}}</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a class="dropdown-button" href="#!" data-activates="overrides">Overrides<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a class="dropdown-trigger dropdown-button" href="#" data-target="overrides">Overrides<i class="material-icons right">arrow_drop_down</i></a></li>
<li><a href="https://github.com/fabiolb/fabio/blob/master/CHANGELOG.md">{{.Version}}</a></li>
<li><a href="https://github.com/fabiolb/fabio">Github</a></li>
</ul>
Expand All @@ -76,6 +76,7 @@ var tmplRoutes = template.Must(template.New("routes").Parse( // language=HTML
$(function(){
let params={};window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(str,key,value){params[key] = value;});
$('.dropdown-trigger').dropdown();
function renderRoutes(routes) {
const $table = $('table.routes');
Expand Down Expand Up @@ -138,10 +139,10 @@ $(function(){
});
$.get('/api/paths', function(data) {
const d = $("#overrides");
let d = $("#overrides");
$.each(data, function(idx, val) {
let path = val;
if (val === "") {
if (val == "") {
val = "default"
}
d.append(
Expand Down

0 comments on commit 436b191

Please sign in to comment.