.
This commit is contained in:
@@ -36,3 +36,69 @@ new PNotify({
|
|||||||
}),
|
}),
|
||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
## Notification JS with buttons
|
||||||
|
new PNotify({
|
||||||
|
title: "tit",
|
||||||
|
text: "sime",
|
||||||
|
hide: false,
|
||||||
|
confirm: {
|
||||||
|
confirm: true,
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
text: "btnText",
|
||||||
|
click: function(notice) {console.log("btnPress")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]},
|
||||||
|
buttons: {
|
||||||
|
sticker: false,
|
||||||
|
closer: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
## confirmation modal
|
||||||
|
showConfirmationDialog({
|
||||||
|
title: gettext("Are you sure you want to update now?"),
|
||||||
|
html: "ss",
|
||||||
|
proceed: gettext("Proceed"),
|
||||||
|
onproceed: function() {
|
||||||
|
console.log("proc");
|
||||||
|
},
|
||||||
|
onclose: function() {
|
||||||
|
console.log("close");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
## dialog with showing progress
|
||||||
|
showProgressModal(options, promise)
|
||||||
|
|
||||||
|
## dialog with multi buttons
|
||||||
|
showSelectionDialog({"title": "tt", "message": "text", "selections":["ss","fdgd","asdas","asda"]})
|
||||||
|
|
||||||
|
## Message dialog
|
||||||
|
showMessageDialog("sss", {options})
|
||||||
|
|
||||||
|
## modal dialog with buttons
|
||||||
|
showConfirmationDialog({
|
||||||
|
"message": "something",
|
||||||
|
"question": "que?",
|
||||||
|
"cancel" : "somaCancel",
|
||||||
|
"proceed" : "someProceed",
|
||||||
|
})
|
||||||
|
var title = options.title || gettext("Are you sure?");
|
||||||
|
var message = options.message || "";
|
||||||
|
var question = options.question || gettext("Are you sure you want to proceed?");
|
||||||
|
var html = options.html;
|
||||||
|
var checkboxes = options.checkboxes;
|
||||||
|
var cancel = options.cancel || gettext("Cancel");
|
||||||
|
var proceed = options.proceed || gettext("Proceed");
|
||||||
|
var proceedClass = options.proceedClass || "danger";
|
||||||
|
var onproceed = options.onproceed || undefined;
|
||||||
|
var oncancel = options.oncancel || undefined;
|
||||||
|
var onclose = options.onclose || undefined;
|
||||||
|
var dialogClass = options.dialogClass || "";
|
||||||
|
var nofade = options.nofade || false;
|
||||||
|
var noclose = options.noclose || false;
|
||||||
@@ -30,7 +30,7 @@ $(function () {
|
|||||||
return (self.steps.E() / self.results.actualExtrusion() * 100).toFixed(3);
|
return (self.steps.E() / self.results.actualExtrusion() * 100).toFixed(3);
|
||||||
});
|
});
|
||||||
self.results["newStepsDisplay"] = ko.computed(function () {
|
self.results["newStepsDisplay"] = ko.computed(function () {
|
||||||
return "M92 E" + self.results.newSteps() ;
|
return "M92 E" + self.results.newSteps();
|
||||||
});
|
});
|
||||||
|
|
||||||
self.onBeforeBinding = self.onUserLoggedIn = self.onUserLoggedOut = function () {
|
self.onBeforeBinding = self.onUserLoggedIn = self.onUserLoggedOut = function () {
|
||||||
@@ -64,9 +64,10 @@ $(function () {
|
|||||||
self.startExtrusion = function () {
|
self.startExtrusion = function () {
|
||||||
OctoPrint.simpleApiCommand("CalibrationTools", "startExtrusion").done(function (response) {
|
OctoPrint.simpleApiCommand("CalibrationTools", "startExtrusion").done(function (response) {
|
||||||
new PNotify({
|
new PNotify({
|
||||||
title: "Test request",
|
title: "E axe calibration started",
|
||||||
text: "<span style='font-weight:bold; color: red;'>Heating nuzzle has started!!!</span><br> When extrusion stops you have to fulfil <b>Length after extrusion</b> and save the new value ",
|
text: "<span style='font-weight:bold; color: red;'>Heating nuzzle has started!!!</span><br> When extrusion stops you have to fulfil <b>Length after extrusion</b> and save the new value ",
|
||||||
type: "info"
|
type: "warning",
|
||||||
|
hide: false
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user