Updated for EditorCollectionPlugin
This commit is contained in:
parent
b7179b75a8
commit
c7f67b8fc0
@ -18,6 +18,16 @@ class CustomControlPlugin(octoprint.plugin.SettingsPlugin,
|
||||
controls = []
|
||||
)
|
||||
|
||||
def get_template_configs(self):
|
||||
if "editorcollection" in self._plugin_manager.enabled_plugins:
|
||||
return [
|
||||
dict(type="plugin_editorcollection_EditorCollection", template="customControl_hookedsettings.jinja2", custom_bindings=True)
|
||||
]
|
||||
else:
|
||||
return [
|
||||
dict(type="settings", template="customControl_hookedsettings.jinja2", custom_bindings=True)
|
||||
]
|
||||
|
||||
def on_settings_save(self, data):
|
||||
s = settings()
|
||||
s.set(["controls"], data["controls"])
|
||||
|
@ -1,6 +1,6 @@
|
||||
<h4>{{ _('Control') }}</h4>
|
||||
|
||||
<div style="min-height:15px; margin: 16px 16px; border:1px solid #00e500" id="base" data-bind="contextMenu: { menuSelector: '#controlContextMenu', menuSelected: $root.controlContextMenu }, visible: loginState.isUser">
|
||||
<div style="min-height:15px; margin: 16px 16px; border:1px solid #00e500" id="base" data-bind="contextMenu: { menuSelector: '#controlContextMenu', menuSelected: $root.controlContextMenu }">
|
||||
</div>
|
||||
|
||||
<!-- "width: 588px" to be the same as teh real Control tab-->
|
Loading…
Reference in New Issue
Block a user