|
|
@ -368,7 +368,7 @@ angular.module('myApp.directives', ['myApp.filters']) |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
.directive('mySendForm', function ($timeout, AppConfigManager) { |
|
|
|
.directive('mySendForm', function ($timeout, AppConfigManager, ErrorService) { |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
link: link, |
|
|
|
link: link, |
|
|
@ -530,13 +530,11 @@ angular.module('myApp.directives', ['myApp.filters']) |
|
|
|
|
|
|
|
|
|
|
|
var blob = new Blob([array], {type: contentType}); |
|
|
|
var blob = new Blob([array], {type: contentType}); |
|
|
|
|
|
|
|
|
|
|
|
if (safeConfirm('Are you sure to send file(s) from clipboard?')) { |
|
|
|
ErrorService.confirm({type: 'FILE_CLIPBOARD_PASTE'}).then(function () { |
|
|
|
$scope.$apply(function () { |
|
|
|
|
|
|
|
$scope.draftMessage.files = [blob]; |
|
|
|
$scope.draftMessage.files = [blob]; |
|
|
|
$scope.draftMessage.isMedia = true; |
|
|
|
$scope.draftMessage.isMedia = true; |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
function onPasteEvent (e) { |
|
|
|
function onPasteEvent (e) { |
|
|
@ -551,8 +549,8 @@ angular.module('myApp.directives', ['myApp.filters']) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (files.length && safeConfirm('Are you sure to send file(s) from clipboard?')) { |
|
|
|
if (files.length > 0) { |
|
|
|
$scope.$apply(function () { |
|
|
|
ErrorService.confirm({type: 'FILES_CLIPBOARD_PASTE', files: files}).then(function () { |
|
|
|
$scope.draftMessage.files = files; |
|
|
|
$scope.draftMessage.files = files; |
|
|
|
$scope.draftMessage.isMedia = true; |
|
|
|
$scope.draftMessage.isMedia = true; |
|
|
|
}); |
|
|
|
}); |
|
|
|