Skip to content

Commit

Permalink
fixes #305
Browse files Browse the repository at this point in the history
  • Loading branch information
pliablepixels committed Aug 18, 2016
1 parent c0e7ea5 commit 7234b64
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions www/js/MonitorModalCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$

ZMDataModel.zmDebug ("Modal removed - killing connkey");
controlStream(17,"",$scope.connKey,-1);



// Execute action
Expand Down
24 changes: 15 additions & 9 deletions www/js/MontageCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', '
// switch off awake, as liveview is finished
ZMDataModel.zmDebug("Modal is open, closing it");
ZMDataModel.setAwake(false);
$scope.modal.remove();
$scope.isModalActive = false;
cleanupOnClose();
}
else
{
Expand Down Expand Up @@ -715,13 +715,8 @@ function initPackery()
//
//---------------------------------------------------------------------

$scope.closeModal = function () {
ZMDataModel.zmDebug("MontageCtrl: Close & Destroy Monitor Modal");
// $scope.isModalActive = false;
// Note: no need to setAwake(false) as needs to be awake
// in montage view


function cleanupOnClose()
{
$scope.modal.remove();
$timeout (function() {ZMDataModel.zmLog("MontageCtrl:Stopping network pull...");if (ZMDataModel.isForceNetworkStop()) ZMDataModel.stopNetwork();},50);

Expand All @@ -730,7 +725,7 @@ function initPackery()

ZMDataModel.zmLog("Restarting montage timer, closing Modal...");
var ld = ZMDataModel.getLogin();
console.log ("closeModal: Cancelling timer");
// console.log ("closeModal: Cancelling timer");
$interval.cancel(intervalHandleMontage);
$interval.cancel(intervalHandleAlarmStatus);

Expand All @@ -747,6 +742,17 @@ function initPackery()
// $timeout (function() {pckry.shiftLayout();},zm.packeryTimer);


}

$scope.closeModal = function () {
ZMDataModel.zmDebug("MontageCtrl: Close & Destroy Monitor Modal");
cleanupOnClose();
// $scope.isModalActive = false;
// Note: no need to setAwake(false) as needs to be awake
// in montage view



};


Expand Down

0 comments on commit 7234b64

Please sign in to comment.