fix url when using different apps folder

master
Jörn Friedrich Dreyer 2016-12-27 23:41:14 +01:00
parent 16c09a619e
commit bbffcebb6c
2 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ app.controller('WeatherController', ['$scope', '$interval', '$timeout', '$compil
// timeout functions internal calls cannot be serialized
$timeout(function () {
var imgPath = OC.generateUrl('/apps/weather').replace('index.php/','');
var imgPath = OC.filePath('weather','img','').replace('index.php/','');
$scope.owncloudAppImgPath = imgPath;
$scope.loadCities();
});

View File

@ -48,12 +48,12 @@
<a href="http://home.openweathermap.org/users/sign_in" ng-show="cityLoadNeedsAPIKey == true">Click here to get an API key</a>
</span>
</div>
<div id="city-right" ng-show="cityLoadError == '' && currentCity != null" style="background-image: url('{{ owncloudAppImgPath }}/img/{{ currentCity.image }}');">
<div id="city-right" ng-show="cityLoadError == '' && currentCity != null" style="background-image: url('{{ owncloudAppImgPath }}{{ currentCity.image }}');">
<div id="city-weather-panel">
<div class="city-name">
{{ currentCity.name }}, {{ currentCity.sys.country }}
<img ng-show="selectedCityId == homeCity" src="{{ owncloudAppImgPath }}/img/home-pick.png" />
<img class="home-icon" ng-click="setHome(selectedCityId);" ng-show="selectedCityId != homeCity" src="{{ owncloudAppImgPath }}/img/home-nopick.png" />
<img ng-show="selectedCityId == homeCity" src="{{ owncloudAppImgPath }}home-pick.png" />
<img class="home-icon" ng-click="setHome(selectedCityId);" ng-show="selectedCityId != homeCity" src="{{ owncloudAppImgPath }}home-nopick.png" />
</div>
<div class="city-current-temp">{{ currentCity.main.temp }}{{ metricRepresentation }}</div>
<div class="city-current-pressure">Pressure: {{ currentCity.main.pressure }} hpa</div>