diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 563d6746e..5a844058d 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -672,9 +672,26 @@ angular.module('zmApp.controllers') $scope.showPTZ = !$scope.showPTZ; }; - $scope.toggleSelectItem = function(ndx) + + function getIndex (mid) { + var ndx = 0; + for (var i=0; i< $scope.MontageMonitors.length; i++) + { + if ($scope.MontageMonitors[i].Monitor.Id == mid) + { + ndx = i; + break; + } + } + return ndx; + + } + $scope.toggleSelectItem = function(mid) + { + var ndx = getIndex(mid); + //console.log ("TOGGLE DETECTED AT INDEX:"+ndx+" NAME="+$scope.MontageMonitors[ndx].Monitor.Name); if ($scope.MontageMonitors[ndx].Monitor.selectStyle !== "undefined" && $scope.MontageMonitors[ndx].Monitor.selectStyle == "dragborder-selected") { $scope.MontageMonitors[ndx].Monitor.selectStyle = ""; diff --git a/www/templates/montage.html b/www/templates/montage.html index 680ebe5b2..6e561097a 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -88,12 +88,12 @@ - +