Fixed a bug where uninitialised widget docks wouldn't appear in the Widget Manager.
This commit is contained in:
parent
89a5eafa48
commit
6a8ad887cc
|
@ -345,6 +345,9 @@ func ThemesWidgets(w http.ResponseWriter, r *http.Request, user common.User) com
|
||||||
|
|
||||||
var docks = make(map[string][]common.WidgetEdit)
|
var docks = make(map[string][]common.WidgetEdit)
|
||||||
for _, name := range common.GetDockList() {
|
for _, name := range common.GetDockList() {
|
||||||
|
if name == "leftOfNav" || name == "rightOfNav" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
var widgets []common.WidgetEdit
|
var widgets []common.WidgetEdit
|
||||||
for _, widget := range common.GetDock(name) {
|
for _, widget := range common.GetDock(name) {
|
||||||
var data = make(map[string]string)
|
var data = make(map[string]string)
|
||||||
|
|
|
@ -17,7 +17,6 @@ type Widget struct {
|
||||||
<div class="rowitem"><h1>{{lang "panel_themes_widgets_head"}}</h1></div>
|
<div class="rowitem"><h1>{{lang "panel_themes_widgets_head"}}</h1></div>
|
||||||
</div>
|
</div>
|
||||||
{{range $name, $dock := .Docks}}
|
{{range $name, $dock := .Docks}}
|
||||||
{{if $dock}}
|
|
||||||
<div class="colstack_item colstack_head colstack_sub_head">
|
<div class="colstack_item colstack_head colstack_sub_head">
|
||||||
<div class="rowitem"><h2>{{$name}}</h2></div>
|
<div class="rowitem"><h2>{{$name}}</h2></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +40,6 @@ type Widget struct {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
|
||||||
<div id="widgetTmpl">
|
<div id="widgetTmpl">
|
||||||
<div class="rowitem panel_compactrow editable_parent widget_item blank_widget bg_red">
|
<div class="rowitem panel_compactrow editable_parent widget_item blank_widget bg_red">
|
||||||
<div class="widget_normal editable_block hide_on_block_edit">
|
<div class="widget_normal editable_block hide_on_block_edit">
|
||||||
|
|
Loading…
Reference in New Issue