Start of destination support and some refactoring
This commit is contained in:
@@ -54,8 +54,6 @@
|
||||
</template>
|
||||
|
||||
|
||||
{{ range $k, $v := .Downloads }}
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -65,7 +63,7 @@
|
||||
<script>
|
||||
function index() {
|
||||
return {
|
||||
items: [], version: {},
|
||||
items: [], version: {}, popups: {},
|
||||
fetch_version() {
|
||||
fetch('/rest/version')
|
||||
.then(response => response.json())
|
||||
@@ -90,9 +88,11 @@
|
||||
})
|
||||
},
|
||||
show_popup(item) {
|
||||
window.open(item.popup_url, item.id, "width={{ .Config.UI.PopupWidth }},height={{ .Config.UI.PopupHeight }}");
|
||||
},
|
||||
}
|
||||
// allegedly you can use the reference to pop the window to the front on subsequent
|
||||
// clicks, but I can't seem to find a reliable way to do so.
|
||||
this.popups[item.id] = window.open(item.popup_url, item.id, "width={{ .Config.UI.PopupWidth }},height={{ .Config.UI.PopupHeight }}");
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user