diff options
Diffstat (limited to 'static')
-rw-r--r-- | static/css/font-awesome.css | 4 | ||||
-rw-r--r-- | static/js/kvmController.js | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/static/css/font-awesome.css b/static/css/font-awesome.css index a992aee9a5..4ce929abff 100644 --- a/static/css/font-awesome.css +++ b/static/css/font-awesome.css @@ -6,8 +6,8 @@ * -------------------------- */ @font-face { font-family: 'FontAwesome'; - src: url('../fonts/fontawesome-webfont.eot?v=4.7.0'); - src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); + /* WARNING: This line is modified from stock FA, to make cachign work*/ + src: url('../../static/fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'); font-weight: normal; font-style: normal; } diff --git a/static/js/kvmController.js b/static/js/kvmController.js index e3dcb1465f..4f692f142f 100644 --- a/static/js/kvmController.js +++ b/static/js/kvmController.js @@ -33,8 +33,6 @@ function($scope, $location, $window) { return; // don't continue trying to connect }; - - $scope.$on("$destroy", function() { if (rfb) { rfb.disconnect(); @@ -63,6 +61,14 @@ function($scope, $location, $window) { }; function status(text, level) { + var status_bar = angular.element(document.querySelector('#noVNC_status_bar'))[0]; + // Need to check if the status bar still exists. On page change, it gets destroyed + // when we swap to a different view. The system will disconnect async + if (status_bar){ + status_bar.textContent = text; + } + + var status = angular.element(document.querySelector('#noVNC_status'))[0]; switch (level) { case 'normal': case 'warn': @@ -71,8 +77,9 @@ function($scope, $location, $window) { default: level = "warn"; } - angular.element(document.querySelector('#noVNC_status'))[0].textContent = text; - angular.element(document.querySelector('#noVNC_status_bar'))[0].setAttribute("class", "noVNC_status_" + level); + if (status){ + status.setAttribute("class", "noVNC_status_" + level); + } }; function updateState(rfb, state, oldstate) { |