diff options
author | Kristian Lyngstol <kly@kly.no> | 2019-01-09 01:16:16 +0100 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2019-01-09 01:16:16 +0100 |
commit | 16fa2623327192ca44263ad77c19e45c03d5df11 (patch) | |
tree | fcaea77a92deb7efba5f042c8205d526a3e82d0c /web/js/nms-ui-boxes.js | |
parent | 9a93c82da5d7de308e810d3f63c94e0b2569a4b6 (diff) |
Expose new-style edit-stuff in old-style panel
The integration is a hack, but a first step. I will eventually remove all the
code in nms-info-box, but I needed a simple test.
This also demonstrates how to add a new switch.... simply hit edit, then change
the name. It aint pretty, and shouldn't work like it does today, but it's
a decent example.
Also, had to fix the backend again now that I actually tested the write-api :D
Diffstat (limited to 'web/js/nms-ui-boxes.js')
-rw-r--r-- | web/js/nms-ui-boxes.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/web/js/nms-ui-boxes.js b/web/js/nms-ui-boxes.js index 9a3330c..dda77c9 100644 --- a/web/js/nms-ui-boxes.js +++ b/web/js/nms-ui-boxes.js @@ -176,6 +176,12 @@ class nmsString extends nmsBox { return this.html.textContent; } } + +class nmsButton extends nmsBox { + constructor(text,type = "btn-default") { + super("button",{html:{textContent:text,className:"btn "+type,type:"button"}}) + } +} /* * A general-purpose table. It can be created in one go, or * as-you-go. |