From efea5a0534c3ec52cc23434b9fc136610c70ed6e Mon Sep 17 00:00:00 2001 From: H Plato Date: Sun, 11 Dec 2016 10:54:36 -0700 Subject: [PATCH] Fixed staticpage with direct_control --- web/ia7/house/main.shtml | 4 ++-- web/ia7/include/javascript.js | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/web/ia7/house/main.shtml b/web/ia7/house/main.shtml index d66a35d99..da784c621 100644 --- a/web/ia7/house/main.shtml +++ b/web/ia7/house/main.shtml @@ -82,10 +82,10 @@

MisterHouse was created by Bruce Winter. Ron Klinkien developed the v2.3 web interface. Kevin Robert Keegan - designed the v4 web prototype, updates by H.Plato. IA7 v1.3.600 Font Awesome by Dave Gandy - http://fontawesome.io

+ designed the v4 web prototype, updates by H.Plato. IA7 v1.3.601 Font Awesome by Dave Gandy - http://fontawesome.io

\ No newline at end of file + diff --git a/web/ia7/include/javascript.js b/web/ia7/include/javascript.js index 8e5d4fabb..1340b8b1a 100644 --- a/web/ia7/include/javascript.js +++ b/web/ia7/include/javascript.js @@ -1,4 +1,4 @@ -// v1.3.600 +// v1.3.601 var entity_store = {}; //global storage of entities var json_store = {}; @@ -972,7 +972,9 @@ var updateStaticPage = function(link,time) { $('button[entity="'+entity+'"]').removeClass("btn-danger"); $('button[entity="'+entity+'"]').removeClass("btn-info"); $('button[entity="'+entity+'"]').addClass("btn-"+color); - if (json_store.ia7_config.objects[entity].direct_control !== undefined && json_store.ia7_config.objects[entity].direct_control == "yes") $('button[entity="'+entity+'"]').addClass("btn-direct"); + if (json_store.ia7_config.objects[entity] !== undefined && + json_store.ia7_config.objects[entity].direct_control !== undefined && + json_store.ia7_config.objects[entity].direct_control == "yes") $('button[entity="'+entity+'"]').addClass("btn-direct"); //don't run this if stategrp0 exists if (states_loaded == 0) { @@ -3016,4 +3018,4 @@ $(document).ready(function() { // // You should have received a copy of the GNU General Public License along with this program; // if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// \ No newline at end of file +//