Fix panel switch between error & working

master
Loic Blot 2015-10-25 11:55:17 +01:00
parent 96bd17cf4f
commit 3e6f50e575
2 changed files with 2 additions and 1 deletions

View File

@ -211,6 +211,7 @@ app.controller('WeatherController', ['$scope', '$interval', '$timeout', '$compil
else if ($scope.currentCity.wind.deg > 288 && $scope.currentCity.wind.deg < 334) { else if ($scope.currentCity.wind.deg > 288 && $scope.currentCity.wind.deg < 334) {
$scope.currentCity.wind.desc = "North-West"; $scope.currentCity.wind.desc = "North-West";
} }
$scope.cityLoadError = '';
} }
else { else {
$scope.cityLoadError = 'Failed to get city weather informations. Please contact your administrator'; $scope.cityLoadError = 'Failed to get city weather informations. Please contact your administrator';

View File

@ -45,7 +45,7 @@
<div id="city-right" ng-show="cityLoadError != ''"> <div id="city-right" ng-show="cityLoadError != ''">
<span class="city-load-error">{{ cityLoadError }}</span> <span class="city-load-error">{{ cityLoadError }}</span>
</div> </div>
<div id="city-right" ng-show="currentCity != null" style="background-image: url('{{ owncloudAppImgPath }}/img/{{ currentCity.image }}');"> <div id="city-right" ng-show="cityLoadError == '' && currentCity != null" style="background-image: url('{{ owncloudAppImgPath }}/img/{{ currentCity.image }}');">
<div id="city-weather-panel"> <div id="city-weather-panel">
<div class="city-name"> <div class="city-name">
{{ currentCity.name }}, {{ currentCity.sys.country }} {{ currentCity.name }}, {{ currentCity.sys.country }}