From ee9f396c5ce9678274ef0e3e73a495d77ed3c77f Mon Sep 17 00:00:00 2001 From: boyska Date: Sat, 16 Nov 2019 12:41:40 +0100 Subject: [PATCH] js: more linting --- server/static/js/reclibrary.js | 2 ++ server/static/js/ui.js | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/server/static/js/reclibrary.js b/server/static/js/reclibrary.js index 2da697b..cbd408b 100644 --- a/server/static/js/reclibrary.js +++ b/server/static/js/reclibrary.js @@ -1,3 +1,5 @@ +/* global $ */ + console.log('Loading...') function trx_startbut (code) { return 'startbutton-' + code } diff --git a/server/static/js/ui.js b/server/static/js/ui.js index 41a0420..212727f 100644 --- a/server/static/js/ui.js +++ b/server/static/js/ui.js @@ -1,13 +1,13 @@ /* global $ */ function time_changer_dialog (d, changed_callback) { // d is a Date object - var dlg_html = '
\ -
\ - \ - \ - \ -
\ -
' + var dlg_html = '
' + + '
' + + ' ' + + ' ' + + ' ' + + '
' + + '
' var $dlg = $($.parseHTML(dlg_html)) $('[name=h]', $dlg).val(d.getHours()) @@ -22,7 +22,7 @@ function time_changer_dialog (d, changed_callback) { if (changed_callback === undefined) { return } - newd = new Date(d.getTime()) + var newd = new Date(d.getTime()) newd.setHours($('[name=h]', $dlg).val()) newd.setMinutes($('[name=m]', $dlg).val()) newd.setSeconds($('[name=s]', $dlg).val()) @@ -49,11 +49,10 @@ $.widget('ror.thebutton', { 'use strict' // create an appropriate button var widget = this - var state = this.options.rec + // var state = this.options.rec widget.element.addClass('pure-button') widget.element.on('click', function (evt) { - /* global error_dialog */ if (widget.element.hasClass('rec-failed')) { error_dialog(widget.options.errormsg, function () { @@ -113,7 +112,9 @@ $.widget('ror.thebutton', { function error_dialog (msg, retry, cancel) { $('
').html($('
').text(msg))
-  .dialog({modal: true, title: 'Dettaglio errori',
+  .dialog({
+    modal: true,
+    title: 'Dettaglio errori',
     buttons: {
       Retry: retry,
       Cancel: cancel