Skip to content

Commit fb91ad9

Browse files
authored
SW-1136-cancelling-a-laser-job-message-not-clear-enough (mrbeam#1498)
* change cancel modal to talk about a laserjob instead of a print
1 parent 6dfb0ee commit fb91ad9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

octoprint_mrbeam/static/js/mother_viewmodel.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,24 @@ $(function () {
5252
"Starts the laser job"
5353
);
5454

55+
// override the default octoprint cancel modal
56+
self.state.cancel = function() {
57+
if (!self.settings.feature_printCancelConfirmation()) {
58+
OctoPrint.job.cancel();
59+
} else {
60+
showConfirmationDialog({
61+
message: gettext("The laserjob will be cancelled."),
62+
question: gettext("Do you still want to cancel?"),
63+
cancel: gettext("No"),
64+
proceed: gettext("Yes"),
65+
proceedClass: "primary",
66+
onproceed: function() {
67+
OctoPrint.job.cancel();
68+
}
69+
});
70+
}
71+
};
72+
5573
self.onStartup = function () {
5674
// TODO fetch machine profile on start
5775
//self.requestData();

0 commit comments

Comments
 (0)