Improved doc download
This commit is contained in:
parent
ad3ffb47ce
commit
51a3fd6984
@ -27,28 +27,8 @@ angular.module('myApp', [
|
||||
]).
|
||||
config(['$locationProvider', '$routeProvider', '$compileProvider', 'StorageProvider', function($locationProvider, $routeProvider, $compileProvider, StorageProvider) {
|
||||
|
||||
// var icons = {}, reverseIcons = {}, i, j, hex, name, dataItem, row, column, totalColumns;
|
||||
|
||||
// for (j = 0; j < Config.EmojiCategories.length; j++) {
|
||||
// totalColumns = Config.EmojiCategorySpritesheetDimens[j][1];
|
||||
// for (i = 0; i < Config.EmojiCategories[j].length; i++) {
|
||||
// dataItem = Config.Emoji[Config.EmojiCategories[j][i]];
|
||||
// name = dataItem[1][0];
|
||||
// row = Math.floor(i / totalColumns);
|
||||
// column = (i % totalColumns);
|
||||
// icons[':' + name + ':'] = [j, row, column, ':'+name+':'];
|
||||
// reverseIcons[name] = dataItem[0];
|
||||
// }
|
||||
// }
|
||||
|
||||
// $.emojiarea.spritesheetPath = 'img/emojisprite_!.png';
|
||||
// $.emojiarea.spritesheetDimens = Config.EmojiCategorySpritesheetDimens;
|
||||
// $.emojiarea.iconSize = 20;
|
||||
// $.emojiarea.icons = icons;
|
||||
// $.emojiarea.reverseIcons = reverseIcons;
|
||||
|
||||
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|blob|filesystem|chrome-extension|app):|data:image\//);
|
||||
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|file|mailto|blob|filesystem|chrome-extension|app):|data:image\//);
|
||||
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|file|mailto|blob|filesystem|chrome-extension|app):|data:/);
|
||||
|
||||
if (Config.Modes.test) {
|
||||
StorageProvider.setPrefix('t_');
|
||||
|
@ -275,7 +275,6 @@ angular.module('izhukov.utils', [])
|
||||
} catch (e) {
|
||||
console.error('Download click error', e);
|
||||
try {
|
||||
console.error('Download click error', e);
|
||||
anchor[0].click();
|
||||
} catch (e) {
|
||||
window.open(url, '_blank');
|
||||
|
@ -2911,7 +2911,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
||||
historyDoc.progress = {enabled: !historyDoc.downloaded, percent: 1, total: doc.size};
|
||||
|
||||
var downloadPromise = MtpApiFileManager.downloadFile(doc.dc_id, inputFileLocation, doc.size, {
|
||||
mime: doc.mime_type,
|
||||
mime: doc.mime_type || 'application/octet-stream',
|
||||
toFileEntry: toFileEntry
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user