More Work

This commit is contained in:
Marc 2015-04-18 13:12:06 +02:00
parent e48e196e4e
commit 5e91ff77dc
4 changed files with 30 additions and 9 deletions

View File

@ -23,13 +23,14 @@ class CustomControlPlugin(octoprint.plugin.SettingsPlugin,
s.set(["controls"], data["controls"])
def get_assets(self):
return {
"js": [
return dict(
js=[
"js/customControl.js",
"js/containerDialog.js",
],
"css": ["css/customControls.css"]
}
css=["css/customControls.css"],
less=["less/customControls.css"]
)
# If you want your plugin to be registered within OctoPrint under a different name than what you defined in setup.py
# ("OctoPrint-PluginSkeleton"), you may define that here. Same goes for the other metadata derived from setup.py that

View File

@ -1,3 +1 @@
#customControls .custom_section_horizontal{display:inline-block}
#customControls .custom_section_vertical_section{min-width:15px; min-height:15px; margin: 8px 8px; padding: 8px 8px; border:1px dashed #000000}
#customControls .custom_section_horizontal_section{float:left; min-width:15px; min-height:15px; margin: 8px 8px; padding: 8px 8px; border:1px dashed #000000}
#customControls .custom_section_horizontal{display:inline-block}#customControls .custom_section_vertical_section{min-width:15px;min-height:15px;margin:8px;padding:8px;border:1px dashed #000}#customControls .custom_section_horizontal_section{float:left;min-width:15px;min-height:15px;margin:8px;padding:8px;border:1px dashed #000}

View File

@ -51,6 +51,9 @@
};
self.rerenderControls = function () {
// TODO: Brainstorming about how to handle additionalControls...
self.staticID = 0;
self.controls(self._processControls(undefined, self.controlsFromServer))
};
@ -305,8 +308,8 @@
self.recursiveDeleteProperties(self.controlsFromServer);
self.settingsViewModel.settings.plugins.octoprint_customControl.controls = self.controlsFromServer;
}
self.onSettingsAfterSave = function () {
self.controlViewModel.requestData();
self.onEventSettingsUpdated = function (payload) {
self.requestData();
}
}

View File

@ -0,0 +1,19 @@
#customControls {
.custom_section_horizontal {
display:inline-block;
}
.custom_section_vertical_section {
min-width:15px;
min-height:15px;
margin: 8px 8px;
padding: 8px 8px;
border:1px dashed #000000;
}
.custom_section_horizontal_section {
float:left;
.custom_section_vertical_section();
}
}