updated to reflect PR on OctoPrint

This commit is contained in:
electr0sheep
2018-02-22 01:09:59 -07:00
parent 09ff8e9953
commit 7a6877e709
3 changed files with 9 additions and 10 deletions

View File

@ -231,7 +231,7 @@
}
control.name = ko.observable(control.name || "");
control.style = ko.observable(control.style || "");
control.customClass = ko.observable(control.customClass || "");
control.width = ko.observable(control.hasOwnProperty("width") ? control.width : "2");
control.offset = ko.observable(control.hasOwnProperty("offset") ? control.offset : "");
@ -321,7 +321,7 @@
return;
}
element.style("btn " + style);
element.customClass("btn " + style);
}
self.deleteElement = function (invokedOn, contextParent, selectedMenu) {
var element = self.searchElement(self.controlsFromServer, contextParent.attr('id'));

View File

@ -59,7 +59,7 @@
self.reset = function (data) {
var element = {
name: undefined,
style: "",
cusotmClass: "",
collapsed: false,
commands: "",
confirm: "",
@ -106,7 +106,7 @@
}
case "command": {
el.name = obj.name;
el.style = "btn";
el.customClass = "btn";
if (obj.commands.indexOf('\n') == -1)
el.command = obj.commands;
else
@ -167,7 +167,7 @@
case "script":
{
el.name = obj.name;
el.style = "btn";
el.customClass = "btn";
el.script = obj.script;
if (self.useConfirm()) {