genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0

[TASK] reload images

This commit is contained in:
Martin Geno 2017-05-12 13:05:04 +02:00
parent ced8a5d959
commit 8902066812
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941
3 changed files with 9 additions and 3 deletions

View File

@ -34,7 +34,7 @@
<td>{{item.position}}</td>
<td>{{item.comment}}</td>
<td></td>
<td valign="middle"><img class="icon" ng-src="/api/good/freshness/{{item.id}}"/></td>
<td valign="middle"><img class="icon" ng-src="{{'/api/good/freshness/'+item.id| reloadSrc}}"/></td>
<td><i class="trash icon" ng-click="delete(item.id)"></i></td>
</tr>
</tbody>

View File

@ -13,7 +13,7 @@
<td>{{item.id}}</td>
<td><a ui-sref="item({productid: item.id})">{{item.title}}</a></td>
<td>
<img class="icon" ng-src="/api/good/availablity/{{item.id}}"/>
<img class="icon" ng-src="{{'/api/good/availablity/'+item.id| reloadSrc}}"/>
</td>
<td>
<a class="ui icon button" ui-sref="item-add({productid: item.id})"><i class="icon plus"></i></a>

View File

@ -29,7 +29,13 @@ angular.module('microStock', [
templateUrl: '/static/html/statistics.html',
controller: 'StatisticsCtrl'
});
}]);
}])
.filter('reloadSrc', function () {
return function (input) {
if (input)
return input + '?v=' + new Date().getTime();
}
});
var config = {