From 9cf888fd6345642e47d750e1872aa82ad32985a8 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Sat, 12 Jan 2019 21:23:46 +0100 Subject: front: Implement new network/switch and more Fixes #183 References #182 It's now possible to add new networks and switches, and it's also possible to edit networks, but since I haven't exposed it in the UI yet, I can't really close the bug. This is also a major step in stripping nms-info-box apart. Next up is listing existing networks, possibly linking to them. I think that might be a decent first-step towards a new core nms-info-box since it doesn't alreay exist. --- web/js/nms-ui-boxes.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'web/js/nms-ui-boxes.js') diff --git a/web/js/nms-ui-boxes.js b/web/js/nms-ui-boxes.js index 3de8ff2..ee4dc98 100644 --- a/web/js/nms-ui-boxes.js +++ b/web/js/nms-ui-boxes.js @@ -247,7 +247,7 @@ class nmsTable extends nmsBox { */ class nmsPanel extends nmsBox{ constructor(title){ - super("div",{html: { className: "col-sm-8 col-md-6 col-lg-5 genericBox"}}); + super("div",{html:{style:{gridColumn: 2}}}); this._topBox = new nmsBox("div",{ html: { className: "panel panel-default"}}); this._body = new nmsBox("div",{html:{className: "panel-body"}}); this.nav = new nmsBox("div",{html:{className: "panel-body"}}); @@ -256,7 +256,12 @@ class nmsPanel extends nmsBox{ this._topBox.add(this._body); super.add(this._topBox); } - attach(root = document.getElementById("metaContainer")) { + attach(root = document.getElementById("genericPanelContainer")) { + try { + var x = parseInt(root.lastElementChild.style.gridColumnStart); + this.html.style.gridColumnStart = x+1; + } catch(e) { + } super.attach(root) } show() { -- cgit v1.2.3