Browse Source

Supported GIF download

master
Igor Zhukov 10 years ago
parent
commit
8269a59754
  1. 9
      app/js/directives.js
  2. 2
      app/partials/desktop/full_gif.html

9
app/js/directives.js

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

2
app/partials/desktop/full_gif.html

@ -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"> <div class="img_gif_image_wrap" ng-switch="document.url &amp;&amp; isActive">

Loading…
Cancel
Save