From 59bc98a05343d8997674a40081288815ea8fe381 Mon Sep 17 00:00:00 2001 From: bp2008 Date: Sun, 5 Aug 2018 19:58:47 -0600 Subject: [PATCH] Version 51: * Fixed a bug where the UI could not load if local storage was disabled in the browser (affecting HomeSeer apps). * Added a setting to the "Extra" section to automatically open the first alert/clip when loading the alert/clip list. This can be helpful when navigating the UI using only hotkeys. * Simplified the logic that prevents redundant clip list loads at UI startup. * The "TabLoaded_XXX" events are now invoked upon the first load of the UI. --- ui3.htm | 11 ++++++++-- ui3/ui3.css | 5 +++++ ui3/ui3.js | 61 +++++++++++++++++++++++++++++++++++++++++------------ 3 files changed, 62 insertions(+), 15 deletions(-) diff --git a/ui3.htm b/ui3.htm index 77451e9..0b90541 100644 --- a/ui3.htm +++ b/ui3.htm @@ -25,7 +25,14 @@ if (typeof bi_version != "undefined") biVersionStr = bi_version; url = url.replace(/\/\/.*?\//, '//censored_hostname/'); - alert("An unexpected error has occurred in " + location.pathname + " (v " + uiVersionStr + " / " + biVersionStr + "). A full refresh may solve the problem (CTRL + F5). If you wish to report the error, please SCREENSHOT the browser now.\n\n" + msg + "\nat " + url + " [" + line + ":" + charIdx + "]\n" + navigator.userAgent); + var errStr = "An unexpected error has occurred in " + location.pathname + " (v " + uiVersionStr + " / " + biVersionStr + "). A full refresh may solve the problem (CTRL + F5). If you wish to report the error, please SCREENSHOT the browser now.\n\n" + msg + "\nat " + url + " [" + line + ":" + charIdx + "]\n" + navigator.userAgent; + try + { + if (toaster) + toaster.Error(errStr, 600000); + } + catch (ex) { } + alert(errStr); } catch (ex) { @@ -34,7 +41,7 @@ };