Refactored cura settings dialog & fixed path check bug

This commit is contained in:
Gina Häußge 2015-08-21 16:57:32 +02:00
parent c5cc3d0394
commit 990a44c7c9
7 changed files with 27 additions and 30 deletions

View file

@ -0,0 +1,7 @@
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: settings.plugins.cura.debug_logging"> {{ _('Log the output of CuraEngine to plugin_cura_engine.log') }}
</label>
</div>
</div>

View file

@ -0,0 +1,10 @@
<div class="control-group" data-bind="css: {error: pathBroken(), success: pathOk()}">
<label class="control-label" for="settings-cura-path">{{ _('Path to CuraEngine') }}</label>
<div class="controls">
<div class="input-append">
<input type="text" class="input-block-level" data-bind="value: settings.plugins.cura.cura_engine, valueUpdate: 'afterkeydown'">
<button class="btn" type="button" data-bind="click: testEnginePath, enable: settings.plugins.cura.cura_engine(), css: {disabled: !settings.plugins.cura.cura_engine()}">{{ _('Test') }}</button>
</div>
<span class="help-block" data-bind="visible: pathBroken() || pathOk(), text: pathText"></span>
</div>
</div>

View file

@ -1,11 +1,14 @@
<h4>{{ _('General') }}</h4>
{% include "snippets/cura_engine.jinja2" %}
<form class="form-horizontal">
{% include "_snippets/settings/cura/enginePath.jinja2" %}
{% include "_snippets/settings/cura/engineLog.jinja2" %}
</form>
<h4>{{ _('Profiles') }}</h4>
{% include "snippets/cura_profiles.jinja2" %}
{% include "_snippets/settings/cura/profiles.jinja2" %}
<button class="btn pull-right" data-bind="click: function() { $root.showImportProfileDialog() }">{{ _('Import Profile...') }}</button>
{% include "snippets/cura_profile_importer.jinja2" %}
{% include "_snippets/settings/cura/profileImporter.jinja2" %}

View file

@ -1,9 +1,3 @@
<div class="alert alert-info">{% trans %}
<strong>Note:</strong> OctoPrint currently only supports slicing with
CuraEngine up to 15.04 and importing Cura profiles from Cura versions
<em>up to 15.04</em>.
{% endtrans %}</div>
<div data-bind="visible: unconfiguredCuraEngine">
<h3>{{ _('Configure CuraEngine') }}</h3>
<p>{% trans %}
@ -12,7 +6,9 @@
{% endtrans %}</p>
<div style="margin-top: 1em">
{% include "snippets/cura_engine.jinja2" %}
<form class="form-horizontal">
{% include "_snippets/settings/cura/enginePath.jinja2" %}
</form>
</div>
</div>
@ -22,7 +18,7 @@
yet. You should do this now.{% endtrans %}</p>
<div>
{% include "snippets/cura_profiles.jinja2" %}
{% include "_snippets/settings/cura/profiles.jinja2" %}
</div>
<button class="btn btn-block" data-bind="click: function() { $root.showImportProfileDialog() }">{{ _('Import Profile...') }}</button>

View file

@ -1,19 +0,0 @@
<form class="form-horizontal">
<div class="control-group" data-bind="css: {error: pathBroken, success: pathOk}">
<label class="control-label" for="settings-cura-path">{{ _('Path to CuraEngine') }}</label>
<div class="controls">
<div class="input-append">
<input type="text" class="input-block-level" data-bind="value: settings.plugins.cura.cura_engine, valueUpdate: 'afterkeydown'">
<button class="btn" type="button" data-bind="click: testEnginePath, enable: testEnginePath(), css: {disabled: !testEnginePath()}">{{ _('Test') }}</button>
</div>
<span class="help-block" data-bind="visible: pathBroken() || pathOk, text: pathText"></span>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" data-bind="checked: settings.plugins.cura.debug_logging"> {{ _('Log the output of CuraEngine to plugin_cura_engine.log') }}
</label>
</div>
</div>
</form>