(js) Force copy of dragged contacts from remote AB

pull/218/merge
Francis Lachapelle 2017-11-30 11:25:11 -05:00
parent 7ddecd4006
commit 8e1a19dca2
2 changed files with 7 additions and 2 deletions

1
NEWS
View File

@ -38,6 +38,7 @@ Bug fixes
- [web] fixed mail composition from message headers (#4335)
- [web] restore messages selection after automatic refresh (#4330)
- [web] fixed path of destination mailbox in Sieve filter editor
- [web] force copy of dragged contacts from global address books
- [eas] hebrew folders encoding problem using EAS (#4240)
- [eas] avoid sync requests for shared folders every second (#4275)

View File

@ -120,7 +120,7 @@
$rootScope.$emit('folder:dragstart', this.folder);
}
if (this.dragHasStarted) {
if (ev.shiftKey)
if (ev.shiftKey || this.folder.isRemote)
this.helper.addClass('sg-draggable-helper--copy');
else
this.helper.removeClass('sg-draggable-helper--copy');
@ -130,12 +130,16 @@
onDragEnd: function(ev) {
var action = 'move';
this.startPosition = null;
$document.off('mousemove', this.bindedOnDrag);
if (this.dragHasStarted) {
if (ev.shiftKey || this.folder.isRemote)
action = 'copy';
$log.debug('emit folder:dragend');
$rootScope.$emit('folder:dragend', this.folder, ev.shiftKey?'copy':'move');
$rootScope.$emit('folder:dragend', this.folder, action);
this.dragHasStarted = false;
this.helper.addClass('ng-hide');
}