From 4fe8f59f9994e64f749d867aefbb1d2deef97591 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 31 Mar 2017 20:04:12 -0400 Subject: #504 - new monitors won't show up on custom profiles --- www/js/DataModel.js | 21 ++++++++++++++++++++- www/lang/locale-en.json | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'www') diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 7804bfdd..efa18634 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -301,7 +301,8 @@ angular.module('zmApp.controllers') function reloadMonitorDisplayStatus() { - debug("Loading hidden/unhidden status..."); + debug("Loading hidden/unhidden status for profile:"+loginData.currentMontageProfile); + var positionsStr = loginData.packeryPositions; //console.log ("positionStr="+positionsStr); var positions = {}; @@ -313,15 +314,33 @@ angular.module('zmApp.controllers') positions = JSON.parse(positionsStr); for (var m = 0; m < monitors.length; m++) { + var positionFound = false; for (var p = 0; p < positions.length; p++) { if (monitors[m].Monitor.Id == positions[p].attr) { monitors[m].Monitor.listDisplay = positions[p].display; + positionFound = true; debug("DataModel: Setting MID:" + monitors[m].Monitor.Id + " to " + monitors[m].Monitor.listDisplay); } } + if (!positionFound) + { + if (loginData.currentMontageProfile != $translate.instant('kMontageDefaultProfile')) + { + monitors[m].Monitor.listDisplay = 'noshow'; + console.log("*************DISABLE NEW MONITOR"); + } + else // make sure we add it because its show all view + { + monitors[m].Monitor.listDisplay = 'show'; + console.log("*************ENABLE NEW MONITOR"); + } + + + } + } } diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index 324ce4fe..33cdfc4c 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -216,9 +216,11 @@ "kMonitorSingleImageScale" :"Live view single image scale", "kMonitors" :"Monitors", "kMontage" :"Montage", + "kMontageDefaultProfile" :"default", "kMontageImageScale" :"Montage image scale", "kMontageNoSavedProfiles" :"No saved montage profiles", "kMontageSave" :"Save Montage Profile", + "kMontageSaveDefaultError" :"This is a read-only profile. Please use another name", "kMontageSaveSubtitle" :"please enter a profile name to save current settings", "kMonth" :"Month", "kMore" :"more", -- cgit v1.2.3