Supported GIF download

This commit is contained in:
Igor Zhukov 2014-10-06 17:52:40 +04:00
parent 6112c49cac
commit 8269a59754
2 changed files with 8 additions and 3 deletions

View File

@ -1373,7 +1373,7 @@ angular.module('myApp.directives', ['myApp.filters'])
})
.directive('myLoadGif', function(MtpApiFileManager) {
.directive('myLoadGif', function($rootScope, MtpApiFileManager) {
return {
link: link,
@ -1397,7 +1397,12 @@ angular.module('myApp.directives', ['myApp.filters'])
/*return $scope.document.progress = {enabled: true, percent: 30, total: $scope.document.size};*/
$scope.toggle = function () {
$scope.toggle = function (e) {
if (checkClick(e, true)) {
$rootScope.downloadDoc($scope.document.id);
return false;
}
if ($scope.document.url) {
$scope.isActive = !$scope.isActive;
$scope.$emit('ui_height');

View File

@ -1,4 +1,4 @@
<a class="img_gif_with_progress_wrap" ng-click="toggle()">
<a class="img_gif_with_progress_wrap" ng-click="toggle($event)">
<div class="img_gif_image_wrap" ng-switch="document.url &amp;&amp; isActive">