Skip to content

Commit

Permalink
Add type class to template
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Conway-Jones committed Nov 30, 2020
1 parent 8aea2d3 commit 31ad2c1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
6 changes: 5 additions & 1 deletion dist/css/app.min.less
Original file line number Diff line number Diff line change
Expand Up @@ -619,10 +619,14 @@ md-select-menu md-option:focus:not([disabled]):not([selected]) {
margin-left: 6px;
}

.nr-dashboard-theme .nr-dashboard-template {
// padding: 0;
background-color: @widgetBorderColor;
}
.nr-dashboard-theme .nr-dashboard-template md-switch .md-thumb {
background-color: rgb(148, 148, 148);
}
.nr-dashboard-theme .nr-dashboard-template md-switch .md-bar {
.nr-dashboard-theme .nr-dashboard-template md-switch .md-bar {
background-color: rgba(111, 111, 111, 0.5);
}
.nr-dashboard-theme .nr-dashboard-template md-switch.md-checked:not([disabled]) .md-thumb {
Expand Down
4 changes: 2 additions & 2 deletions dist/dashboard.appcache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CACHE MANIFEST
# Time: Sat Nov 28 2020 23:04:07 GMT+0000 (Greenwich Mean Time)
# Time: Mon Nov 30 2020 10:57:46 GMT+0000 (Greenwich Mean Time)

CACHE:
i18n.js
Expand All @@ -26,4 +26,4 @@ loading.html
NETWORK:
*

# hash: 95f0e323e7e2c119623864e95d3b2a0c268358f6ae4cc88405af5bfcdb25b288
# hash: ee645d7af0d9ffa1371e3d6a47cd43028765699db35636c7e7ffd87f1bda8edc
2 changes: 1 addition & 1 deletion dist/js/app.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ function addWidget(RED, options) {
var ui_control = {
type: "template",
order: options.order,
format: options.format
format: options.format,
class: "nr-dashboard-"+(options.node.type || "template-blank")
};

var node = options.node;
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui-component/templates/template.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<md-card
ui-template="me.item.format"
ui-card-size="{{ me.item.width }}x{{ me.item.height }}"
class="nr-dashboard-template"
class="nr-dashboard-template {{ me.item.class }}"
ng-class="{'nr-dashboard-disabled':me.item.disabled}"
ng-show="{{me.item.height >= 0}}"
node-id="{{me.item.id}}"
Expand Down
6 changes: 5 additions & 1 deletion src/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,14 @@ md-select-menu md-option:focus:not([disabled]):not([selected]) {
margin-left: 6px;
}

.nr-dashboard-theme .nr-dashboard-template {
// padding: 0;
background-color: @widgetBorderColor;
}
.nr-dashboard-theme .nr-dashboard-template md-switch .md-thumb {
background-color: rgb(148, 148, 148);
}
.nr-dashboard-theme .nr-dashboard-template md-switch .md-bar {
.nr-dashboard-theme .nr-dashboard-template md-switch .md-bar {
background-color: rgba(111, 111, 111, 0.5);
}
.nr-dashboard-theme .nr-dashboard-template md-switch.md-checked:not([disabled]) .md-thumb {
Expand Down

0 comments on commit 31ad2c1

Please sign in to comment.