mirror of
https://github.com/Sebclem/OctoPrint-SimpleEmergencyStop.git
synced 2024-11-22 01:02:59 +01:00
Js file review to prevent issue with minify
This commit is contained in:
parent
5b4edf6356
commit
e80ec6916f
@ -12,9 +12,7 @@ $(function () {
|
|||||||
this.printerState = parameters[2];
|
this.printerState = parameters[2];
|
||||||
this.confirmation = undefined;
|
this.confirmation = undefined;
|
||||||
|
|
||||||
this.onAfterBinding = function () {
|
this.onAfterBinding = function () {};
|
||||||
|
|
||||||
};
|
|
||||||
this.onBeforeBinding = function () {
|
this.onBeforeBinding = function () {
|
||||||
this.confirmation = $("#confirmation");
|
this.confirmation = $("#confirmation");
|
||||||
this.settings = this.allSettings.settings.plugins.simpleemergencystop;
|
this.settings = this.allSettings.settings.plugins.simpleemergencystop;
|
||||||
@ -26,7 +24,7 @@ $(function () {
|
|||||||
if (this.settings.confirmationDialog())
|
if (this.settings.confirmationDialog())
|
||||||
this.confirmation.modal("show");
|
this.confirmation.modal("show");
|
||||||
else
|
else
|
||||||
this.sendCommand()
|
this.sendCommand();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -39,39 +37,37 @@ $(function () {
|
|||||||
command: "emergencyStop"
|
command: "emergencyStop"
|
||||||
}),
|
}),
|
||||||
contentType: "application/json; charset=UTF-8",
|
contentType: "application/json; charset=UTF-8",
|
||||||
success: function (data, status) {
|
success: function (data, status) {}
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.confirmation.modal("hide");
|
this.confirmation.modal("hide");
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.big_button_visible = function () {
|
this.big_button_visible = function () {
|
||||||
return this.loginState.isUser() && this.settings.big_button()
|
return this.loginState.isUser() && this.settings.big_button();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.little_button_visible = function () {
|
this.little_button_visible = function () {
|
||||||
return this.loginState.isUser() && !this.settings.big_button()
|
return this.loginState.isUser() && !this.settings.big_button();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.can_send_command = function () {
|
this.can_send_command = function () {
|
||||||
return this.loginState.isUser() && this.printerState.isOperational()
|
return this.loginState.isUser() && this.printerState.isOperational();
|
||||||
};
|
};
|
||||||
|
|
||||||
this.little_button_css = function () {
|
this.little_button_css = function () {
|
||||||
return this.printerState.isOperational() ? "ses_small" : "ses_small_disabled";
|
return (this.printerState.isOperational() ? "ses_small" : "ses_small_disabled");
|
||||||
};
|
};
|
||||||
this.big_button_css = function () {
|
this.big_button_css = function () {
|
||||||
return this.printerState.isOperational() ? "ses_big" : "ses_big ses_big_disabled";
|
return (this.printerState.isOperational() ? "ses_big" : "ses_big ses_big_disabled");
|
||||||
};
|
};
|
||||||
|
|
||||||
this.get_title = function () {
|
this.get_title = function () {
|
||||||
return this.printerState.isOperational() ? gettext('!!! Emergency Stop !!! ') : gettext('Printer disconnected')
|
return (this.printerState.isOperational() ? gettext('!!! Emergency Stop !!! ') : gettext('Printer disconnected'));
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
};
|
||||||
|
|
||||||
// view model class, parameters for constructor, container to bind to
|
// view model class, parameters for constructor, container to bind to
|
||||||
OCTOPRINT_VIEWMODELS.push([
|
OCTOPRINT_VIEWMODELS.push([
|
||||||
|
2
setup.py
2
setup.py
@ -14,7 +14,7 @@ plugin_package = "octoprint_simpleemergencystop"
|
|||||||
plugin_name = "OctoPrint-SimpleEmergencyStop"
|
plugin_name = "OctoPrint-SimpleEmergencyStop"
|
||||||
|
|
||||||
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
|
# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
|
||||||
plugin_version = "1.0.1"
|
plugin_version = "1.0.2"
|
||||||
|
|
||||||
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
|
# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
|
||||||
# module
|
# module
|
||||||
|
Loading…
Reference in New Issue
Block a user