a2751b96d6
* Move notes above the fields * Adding documentation * Add documentation * Fix design issue on standard view
89 lines
3.5 KiB
Django/Jinja
89 lines
3.5 KiB
Django/Jinja
<div class="octo-tab-content">
|
|
<div class="row-fluid header" id="toolBar">
|
|
<div class="span11 title">
|
|
<p>Calibration</p>
|
|
</div>
|
|
<!-- <div class="span8 title">
|
|
<div class="row-fluid">
|
|
<div class="span6"></div>
|
|
<div class="span6">
|
|
<button class="btn" data-bind="click: $root.restart, visible: false">
|
|
RESTART
|
|
</button>
|
|
<button class="btn btn-primary" data-bind="click: $root.test, visible: false" title="BTN for testing">
|
|
<i class="fas fa-save" data-color="#000000"></i>  
|
|
TEST
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
<div class="span1 icon">
|
|
<a data-bind="click: $root.onSettingsClick">
|
|
<i class="fas fa-cog fa-lg" data-color="#ddd"></i>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<div class="main row-fluid">
|
|
<div id="navigation" class="span3" data-bind="css: {span0: $root.generalVM.isSmall(), span3: !$root.generalVM.isSmall()}">
|
|
<ul class="nav nav-list">
|
|
<li class="active">
|
|
<a data-toggle="tab" href="#calibration_documentation">Documentation</a>
|
|
</li>
|
|
<li>
|
|
<a data-toggle="tab" href="#calibration_eSteps">E-Steps</a>
|
|
</li>
|
|
<li>
|
|
<a data-toggle="tab" href="#calibration_x-y-z">X-Y-Z Steps</a>
|
|
</li>
|
|
<li>
|
|
<a data-toggle="tab" href="#calibration_pid">PID Autotune</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="calibrationTool_content" class="span9">
|
|
{% include "tabs/tab-content.jinja2" %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% block script%}
|
|
<script type="text/javascript">
|
|
OCTOPRINT_VIEWMODELS.push({
|
|
construct: function (parameters) {
|
|
self = this;
|
|
self.generalVM = parameters[0];
|
|
self.restart = function () { OctoPrint.system.executeCommand('core', 'restart') };
|
|
self.test = function () {
|
|
OctoPrint.simpleApiCommand("CalibrationTools", "pid_save").done(function (response) {
|
|
new PNotify({
|
|
title: "Saved",
|
|
text: "PID values successfully saved",
|
|
type: "info"
|
|
});
|
|
}).fail(function (response) {
|
|
new PNotify({
|
|
title: "Test request",
|
|
text: response.responseJSON.error.msg,
|
|
type: "error"
|
|
});
|
|
});
|
|
};
|
|
|
|
self.onSettingsClick = function () {
|
|
$('a#navbar_show_settings').click();
|
|
$('li#settings_plugin_CalibrationTools_link a').click();
|
|
$("#settings_plugin_CalibrationTools").click();
|
|
};
|
|
self.onStartupComplete = function () {
|
|
if (self.generalVM.isSmall()) {
|
|
$("#calibrationTool_content").removeClass("span9");
|
|
$("#calibrationTool_content").addClass("span12");
|
|
}
|
|
}
|
|
},
|
|
// dependencies: ["terminalViewModel"],
|
|
elements: ["#toolBar", "#navigation"],
|
|
dependencies: ["calibrationToolsGeneralViewModel"],
|
|
});
|
|
</script>
|
|
{% endblock %} |