diff --git a/octoprint_simpleemergencystop/static/js/simpleemergencystop.js b/octoprint_simpleemergencystop/static/js/simpleemergencystop.js index 300c1c1..d5c3088 100644 --- a/octoprint_simpleemergencystop/static/js/simpleemergencystop.js +++ b/octoprint_simpleemergencystop/static/js/simpleemergencystop.js @@ -12,9 +12,7 @@ $(function () { this.printerState = parameters[2]; this.confirmation = undefined; - this.onAfterBinding = function () { - - }; + this.onAfterBinding = function () {}; this.onBeforeBinding = function () { this.confirmation = $("#confirmation"); this.settings = this.allSettings.settings.plugins.simpleemergencystop; @@ -26,7 +24,7 @@ $(function () { if (this.settings.confirmationDialog()) this.confirmation.modal("show"); else - this.sendCommand() + this.sendCommand(); }; @@ -39,39 +37,37 @@ $(function () { command: "emergencyStop" }), contentType: "application/json; charset=UTF-8", - success: function (data, status) { - - } + success: function (data, status) {} }); this.confirmation.modal("hide"); }; 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 () { - return this.loginState.isUser() && !this.settings.big_button() + return this.loginState.isUser() && !this.settings.big_button(); }; this.can_send_command = function () { - return this.loginState.isUser() && this.printerState.isOperational() + return this.loginState.isUser() && this.printerState.isOperational(); }; 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 () { - 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 () { - 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 OCTOPRINT_VIEWMODELS.push([ diff --git a/setup.py b/setup.py index f1483f8..c264861 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_package = "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 -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 # module