Final touches to the core wizards and the cura wizard
This commit is contained in:
parent
1425b20bd6
commit
74e33cef01
6 changed files with 32 additions and 9 deletions
|
|
@ -22,7 +22,7 @@
|
|||
</p><p>
|
||||
The <strong>Snapshot URL</strong> is the URL OctoPrint uses to fetch single
|
||||
images from the webcam for creating timelapse recordings. This needs to be
|
||||
reachable <strong>from the OctoPrint server</strong>.
|
||||
a fully qualified URL reachable <strong>from the OctoPrint server</strong>.
|
||||
</p>{% endtrans %}
|
||||
|
||||
<form class="form-horizontal" data-bind="with: settingsViewModel">
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
<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">
|
||||
<button class="btn" type="button" data-bind="click: testEnginePath">{{ _('Test') }}</button>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -446,6 +446,8 @@ function showMessageDialog(msg, options) {
|
|||
var message = options.message || "";
|
||||
var close = options.close || gettext("Close");
|
||||
var onclose = options.onclose || undefined;
|
||||
var onshow = options.onshow || undefined;
|
||||
var onshown = options.onshown || undefined;
|
||||
|
||||
if (_.isString(message)) {
|
||||
message = $("<p>" + message + "</p>");
|
||||
|
|
@ -467,6 +469,14 @@ function showMessageDialog(msg, options) {
|
|||
}
|
||||
});
|
||||
|
||||
if (onshow) {
|
||||
modal.on("show", onshow);
|
||||
}
|
||||
|
||||
if (onshown) {
|
||||
modal.on("shown", onshown);
|
||||
}
|
||||
|
||||
modal.modal("show");
|
||||
return modal;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,6 +170,11 @@ $(function() {
|
|||
self.webcam_ffmpegPathText = ko.observable();
|
||||
self.webcam_ffmpegPathOk = ko.observable(false);
|
||||
self.webcam_ffmpegPathBroken = ko.observable(false);
|
||||
self.webcam_ffmpegPathReset = function() {
|
||||
self.webcam_ffmpegPathText("");
|
||||
self.webcam_ffmpegPathOk(false);
|
||||
self.webcam_ffmpegPathBroken(false);
|
||||
};
|
||||
|
||||
self.addTemperatureProfile = function() {
|
||||
self.temperature_profiles.push({name: "New", extruder:0, bed:0});
|
||||
|
|
@ -193,9 +198,13 @@ $(function() {
|
|||
}
|
||||
|
||||
var text = gettext("If you see your webcam stream below, the entered stream URL is ok.");
|
||||
var image = $('<img src="' + self.webcam_streamUrl() + '">');
|
||||
var message = $("<p></p>")
|
||||
.append(text)
|
||||
.append(image);
|
||||
showMessageDialog({
|
||||
title: gettext("Stream test"),
|
||||
message: '<p>' + text + '</p><p><img src="' + self.webcam_streamUrl() + '" /></p>'
|
||||
message: message
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -296,6 +305,10 @@ $(function() {
|
|||
self.requestData();
|
||||
};
|
||||
|
||||
self.onSettingsHidden = function() {
|
||||
self.webcam_ffmpegPathReset();
|
||||
};
|
||||
|
||||
self.isDialogActive = function() {
|
||||
return self.settingsDialog.is(":visible");
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<div class="control-group" title="{{ _('Full path to the FFMPEG binary') }}">
|
||||
<div class="control-group" title="{{ _('Full path to the FFMPEG binary') }}" data-bind="css: {error: webcam_ffmpegPathBroken, success: webcam_ffmpegPathOk}">
|
||||
<label class="control-label" for="settings-webcamFfmpegPath">{{ _('Path to FFMPEG') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="text" class="input-block-level" data-bind="value: webcam_ffmpegPath" id="settings-webcamFfmpegPath">
|
||||
<input type="text" class="input-block-level" data-bind="value: webcam_ffmpegPath, valueUpdate: 'afterkeydown'" id="settings-webcamFfmpegPath">
|
||||
<button class="btn" type="button" data-bind="click: testWebcamFfmpegPath, enable: webcam_ffmpegPath(), css: {disabled: !webcam_ffmpegPath()}">{{ _('Test') }}</button>
|
||||
</div>
|
||||
<span class="help-block" data-bind="visible: webcam_ffmpegPathBroken() || webcam_ffmpegPathOk, text: webcam_ffmpegPathText"></span>
|
||||
<span class="help-block" data-bind="visible: webcam_ffmpegPathBroken() || webcam_ffmpegPathOk(), text: webcam_ffmpegPathText"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<label class="control-label" for="settings-webcamStreamUrl">{{ _('Stream URL') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="text" class="input-block-level" data-bind="value: webcam_streamUrl" id="settings-webcamStreamUrl">
|
||||
<input type="text" class="input-block-level" data-bind="value: webcam_streamUrl, valueUpdate: 'afterkeydown'" id="settings-webcamStreamUrl">
|
||||
<button class="btn" type="button" data-bind="click: testWebcamStreamUrl, enable: webcam_streamUrl(), css: {disabled: !webcam_streamUrl()}">{{ _('Test') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<label class="control-label" for="settings-webcamSnapshotUrl">{{ _('Snapshot URL') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-append">
|
||||
<input type="text" class="input-block-level" data-bind="value: webcam_snapshotUrl" id="settings-webcamSnapshotUrl">
|
||||
<input type="text" class="input-block-level" data-bind="value: webcam_snapshotUrl, valueUpdate: 'afterkeydown'" id="settings-webcamSnapshotUrl">
|
||||
<button class="btn" type="button" data-bind="click: testWebcamSnapshotUrl, enable: webcam_snapshotUrl(), css: {disabled: !webcam_snapshotUrl()}">{{ _('Test') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue