|
|
@ -1907,7 +1907,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
.service('AppDocsManager', function ($sce, $rootScope, $modal, $window, $q, RichTextProcessor, MtpApiFileManager, FileManager, qSync) { |
|
|
|
.service('AppDocsManager', function ($sce, $rootScope, $modal, $window, $q, $timeout, RichTextProcessor, MtpApiFileManager, FileManager, qSync) { |
|
|
|
var docs = {}, |
|
|
|
var docs = {}, |
|
|
|
docsForHistory = {}, |
|
|
|
docsForHistory = {}, |
|
|
|
windowW = $(window).width(), |
|
|
|
windowW = $(window).width(), |
|
|
@ -2096,13 +2096,16 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
downloadPromise.then(function (blob) { |
|
|
|
downloadPromise.then(function (blob) { |
|
|
|
delete historyDoc.progress; |
|
|
|
|
|
|
|
if (blob) { |
|
|
|
if (blob) { |
|
|
|
FileManager.getFileCorrectUrl(blob, doc.mime_type).then(function (url) { |
|
|
|
FileManager.getFileCorrectUrl(blob, doc.mime_type).then(function (url) { |
|
|
|
historyDoc.url = $sce.trustAsResourceUrl(url); |
|
|
|
historyDoc.url = $sce.trustAsResourceUrl(url); |
|
|
|
}) |
|
|
|
}) |
|
|
|
historyDoc.downloaded = true; |
|
|
|
historyDoc.downloaded = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
historyDoc.progress.percent = 100; |
|
|
|
|
|
|
|
$timeout(function () { |
|
|
|
|
|
|
|
delete historyDoc.progress; |
|
|
|
|
|
|
|
}); |
|
|
|
console.log('file save done'); |
|
|
|
console.log('file save done'); |
|
|
|
}, function (e) { |
|
|
|
}, function (e) { |
|
|
|
console.log('document download failed', e); |
|
|
|
console.log('document download failed', e); |
|
|
@ -2283,6 +2286,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) |
|
|
|
var applied = false; |
|
|
|
var applied = false; |
|
|
|
var started = false; |
|
|
|
var started = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// $rootScope.$on('apiUpdate', function (e, update) {
|
|
|
|
|
|
|
|
// if (update._ == 'updateStickerSets') {
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
start: start, |
|
|
|
start: start, |
|
|
|
openStickersetLink: openStickersetLink, |
|
|
|
openStickersetLink: openStickersetLink, |
|
|
|