More Work
This commit is contained in:
parent
e48e196e4e
commit
5e91ff77dc
@ -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
|
||||
|
@ -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}
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
19
octoprint_customControl/static/less/customControls.less
Normal file
19
octoprint_customControl/static/less/customControls.less
Normal 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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user