Skip to content

Commit

Permalink
0.1.6
Browse files Browse the repository at this point in the history
* added option in horizontal layout to control navbar resizing
  • Loading branch information
jneilliii committed Jun 15, 2020
1 parent 2c72ec4 commit 5153dec
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion octoprint_consolidate_temp_control/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ConsolidateTempControlPlugin(octoprint.plugin.TemplatePlugin,

##-- Settings mixin
def get_settings_defaults(self):
return dict(tab_order=[dict(name="Temperature",selector="#temp"),dict(name="Control",selector="#control")], layout="horizontal")
return dict(tab_order=[dict(name="Temperature",selector="#temp"),dict(name="Control",selector="#control")], layout="horizontal", resize_navbar=True)

##-- Template mixin
def get_template_configs(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ $(function() {
$('div.page-container').css({'min-width':'1900px'});

// navbar adjustments
$('#navbar > div.navbar-inner > div.container').css({'width':'100%'});
$('#navbar > div.navbar-inner > div.row-fluid > div.nav-collapse').css({'padding-right':'20px'});
if(self.settings.settings.plugins.consolidate_temp_control.resize_navbar()){
$('#navbar > div.navbar-inner > div.container').css({'width':'100%'});
$('#navbar > div.navbar-inner > div.row-fluid > div.nav-collapse').css({'padding-right':'20px'});
}

// main content adjustments
$('div.container.octoprint-container').addClass('row-fluid');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@
</div>
<div class="row-fluid"><h5><u>{{ _('Layout') }}</u></h5></div>
<div class="row-fluid">
<select data-bind="value: settings.settings.plugins.consolidate_temp_control.layout">
<option value="horizontal">Horizontal</option>
<option value="vertical">Vertical</option>
</select>
<div class="span4">
<select data-bind="value: settings.settings.plugins.consolidate_temp_control.layout">
<option value="horizontal">Horizontal</option>
<option value="vertical">Vertical</option>
</select>
</div>
<div class="span4" style="padding-top: 3px;" data-bind="visible: settings.settings.plugins.consolidate_temp_control.layout() == 'horizontal'">
<label class="checkbox">
<input type="checkbox" data-bind="checked: settings.settings.plugins.consolidate_temp_control.resize_navbar" /> {{ _('Resize Navbar') }}
</label>
</div>
</div>
</form>
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "Consolidate Temp Control"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.1.5"
plugin_version = "0.1.6"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 5153dec

Please sign in to comment.