From 8269a597547a3fd8e91d770dd9367ccbbb073e39 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Mon, 6 Oct 2014 17:52:40 +0400 Subject: [PATCH] Supported GIF download --- app/js/directives.js | 9 +++++++-- app/partials/desktop/full_gif.html | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/js/directives.js b/app/js/directives.js index 6ced06d8..72266009 100644 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -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'); diff --git a/app/partials/desktop/full_gif.html b/app/partials/desktop/full_gif.html index cffc8140..227ab0be 100644 --- a/app/partials/desktop/full_gif.html +++ b/app/partials/desktop/full_gif.html @@ -1,4 +1,4 @@ - +