From 6a8ad887cc4c7e5c299df673d43654270e81f697 Mon Sep 17 00:00:00 2001 From: Azareal Date: Tue, 22 Jan 2019 22:42:46 +1000 Subject: [PATCH] Fixed a bug where uninitialised widget docks wouldn't appear in the Widget Manager. --- routes/panel/themes.go | 3 +++ templates/panel_themes_widgets.html | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/routes/panel/themes.go b/routes/panel/themes.go index efb65e81..53c26961 100644 --- a/routes/panel/themes.go +++ b/routes/panel/themes.go @@ -345,6 +345,9 @@ func ThemesWidgets(w http.ResponseWriter, r *http.Request, user common.User) com var docks = make(map[string][]common.WidgetEdit) for _, name := range common.GetDockList() { + if name == "leftOfNav" || name == "rightOfNav" { + continue + } var widgets []common.WidgetEdit for _, widget := range common.GetDock(name) { var data = make(map[string]string) diff --git a/templates/panel_themes_widgets.html b/templates/panel_themes_widgets.html index 43f90613..d626f253 100644 --- a/templates/panel_themes_widgets.html +++ b/templates/panel_themes_widgets.html @@ -17,7 +17,6 @@ type Widget struct {

{{lang "panel_themes_widgets_head"}}

{{range $name, $dock := .Docks}} - {{if $dock}}

{{$name}}

@@ -41,7 +40,6 @@ type Widget struct { {{end}} - {{end}}