From 1cfc592686d2a482995e07e94879406e03ffd086 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 29 Feb 2016 01:33:29 +0000 Subject: [PATCH 1/3] Fix the error dialog not displaying in the old web UI --- NEWS | 10 +--------- javascript/ola/mobile/universe_tab.js | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 3388414790..a769068f5e 100644 --- a/NEWS +++ b/NEWS @@ -4,12 +4,6 @@ x/y/2016 ola-0.10.1 * Add Stellascapes Lightwidgets Number1 PIDs * Add a warning to the Web UIs if Javascript is disabled. - API: - * - - RDM Tests: - * - Bugs: * Check if a device exists before trying to acquire a UUCP lock file for it #1006 * Fix the build on FreeBSD @@ -18,9 +12,7 @@ x/y/2016 ola-0.10.1 * Fix a configure warning on OpenBSD * Allow you to set DMX address of a one slot device to 512 #1042. The JSON API now returns min and max inclusive * Switch to pkg-config for cppunit detection #1043 - - Internal: - * + * Fix the error dialog not displaying in the old web UI 3/1/2016 ola-0.10.0 Features: diff --git a/javascript/ola/mobile/universe_tab.js b/javascript/ola/mobile/universe_tab.js index 30519ae945..03f3868b91 100644 --- a/javascript/ola/mobile/universe_tab.js +++ b/javascript/ola/mobile/universe_tab.js @@ -23,6 +23,7 @@ goog.require('goog.ui.Button'); goog.require('goog.ui.Container'); goog.require('ola.BaseFrame'); +goog.require('ola.Dialog'); goog.require('ola.UniverseControl'); goog.require('ola.UniverseItem'); goog.require('ola.common.RdmSectionControl'); @@ -372,19 +373,19 @@ ola.mobile.UniverseTab.prototype.saveSection_ = function() { var value = form.elements[id].value; var int_val = parseInt(value); if (isNaN(int_val)) { - this._showErrorDialog('Invalid Value', + this.showErrorDialog_('Invalid Value', items[i]['description'] + ' must be an integer'); return; } var min = items[i]['min']; if (min != undefined && int_val < min) { - this._showErrorDialog('Invalid Value', + this.showErrorDialog_('Invalid Value', items[i]['description'] + ' must be > ' + (min - 1)); return; } var max = items[i]['max']; if (max != undefined && int_val > max) { - this._showErrorDialog('Invalid Value', + this.showErrorDialog_('Invalid Value', items[i]['description'] + ' must be < ' + (max + 1)); return; } @@ -428,3 +429,16 @@ ola.mobile.UniverseTab.prototype.saveSectionComplete_ = function(e) { this.loadSection_(); } }; + + +/** + * Show the dialog with an error message + * @private + */ +ola.mobile.UniverseTab.prototype.showErrorDialog_ = function(title, error) { + var dialog = ola.Dialog.getInstance(); + dialog.setTitle(title); + dialog.setContent(error); + dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); + dialog.setVisible(true); +}; From 754a85833c8d9e1151d2383f39681d79666c3cdf Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Tue, 1 Mar 2016 16:51:41 +0000 Subject: [PATCH 2/3] New placeholder for NEWS --- NEWS | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/NEWS b/NEWS index 84479a8bd5..e0e5ee1adc 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,19 @@ +x/y/2016 ola-0.10.2 + Features: + * + + API: + * + + RDM Tests: + * + + Bugs: + * + + Internal: + * + 29/2/2016 ola-0.10.1 Features: * Add support for Osram Lightify products via a Philips Hue bridge From 4ec1f3e27044075ec10731b9df32ff394bfdc5df Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Mon, 19 Feb 2018 00:26:22 +0000 Subject: [PATCH 3/3] Fix the version for a NEWS update --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 71cfdf4120..4ede3c5980 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,7 @@ x/y/2018 ola-0.10.7 Bugs: * Fix the build on Windows * Entire codebase now passes codespell testing + * Fix the error dialog not displaying in the old web UI * Internal: @@ -124,7 +125,6 @@ x/y/2018 ola-0.10.7 * Fix a configure warning on OpenBSD * Allow you to set DMX address of a one slot device to 512 #1042. The JSON API now returns min and max inclusive * Switch to pkg-config for cppunit detection #1043 - * Fix the error dialog not displaying in the old web UI 3/1/2016 ola-0.10.0 Features: