Don't hide source element when it is copied
This commit is contained in:
parent
8314f481ef
commit
dd88d786f9
7 changed files with 35 additions and 2 deletions
|
@ -1430,6 +1430,9 @@ div.percentdone {
|
|||
ol[dnd-list] .dndDraggingSource {
|
||||
display: none;
|
||||
}
|
||||
ol[dnd-list] .copy.dndDraggingSource {
|
||||
display: block;
|
||||
}
|
||||
/**
|
||||
* An element with .dndPlaceholder class will be
|
||||
* added to the dnd-list while the user is dragging
|
||||
|
|
|
@ -344,7 +344,17 @@
|
|||
} else {
|
||||
return "copy";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this._$scope.dragStart = function($event) {
|
||||
if ($event.dataTransfer.effectAllowed === 'copy' || ($event.dataTransfer.effectAllowed === 'copyMove' && $event.ctrlKey)) {
|
||||
$($event.target).addClass('copy');
|
||||
}
|
||||
};
|
||||
|
||||
this._$scope.dragEnd = function($event) {
|
||||
$($event.target).removeClass('copy');
|
||||
};
|
||||
}
|
||||
|
||||
return TasksController;
|
||||
|
|
|
@ -1135,7 +1135,17 @@ angular.module('Tasks').controller('SettingsController', [
|
|||
} else {
|
||||
return "copy";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
this._$scope.dragStart = function($event) {
|
||||
if ($event.dataTransfer.effectAllowed === 'copy' || ($event.dataTransfer.effectAllowed === 'copyMove' && $event.ctrlKey)) {
|
||||
$($event.target).addClass('copy');
|
||||
}
|
||||
};
|
||||
|
||||
this._$scope.dragEnd = function($event) {
|
||||
$($event.target).removeClass('copy');
|
||||
};
|
||||
}
|
||||
|
||||
return TasksController;
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
ng-click="openDetails(task.uri,$event)"
|
||||
ng-class="{done: task.completed}"
|
||||
dnd-draggable="task"
|
||||
dnd-dragstart="dragStart(event)"
|
||||
dnd-dragend="dragEnd(event)"
|
||||
dnd-effect-allowed="{{ allow(task) }}">
|
||||
<?php print_unescaped($this->inc('part.taskbody')); ?>
|
||||
</li>
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
ng-click="openDetails(task.uri,$event)"
|
||||
ng-class="{done: task.completed}"
|
||||
dnd-draggable="task"
|
||||
dnd-dragstart="dragStart(event)"
|
||||
dnd-dragend="dragEnd(event)"
|
||||
dnd-effect-allowed="{{ allow(task) }}">
|
||||
<?php print_unescaped($this->inc('part.taskbody')); ?>
|
||||
</li>
|
||||
|
|
|
@ -54,6 +54,8 @@
|
|||
ng-class="{done: task.completed}"
|
||||
ng-include="'part.taskbody'"
|
||||
dnd-draggable="task"
|
||||
dnd-dragstart="dragStart(event)"
|
||||
dnd-dragend="dragEnd(event)"
|
||||
dnd-effect-allowed="{{ allow(task) }}">
|
||||
</li>
|
||||
</ol>
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
ng-click="openDetails(task.uri,$event)"
|
||||
ng-class="{done: task.completed}"
|
||||
dnd-draggable="task"
|
||||
dnd-dragstart="dragStart(event)"
|
||||
dnd-dragend="dragEnd(event)"
|
||||
dnd-effect-allowed="{{ allow(task) }}">
|
||||
<?php print_unescaped($this->inc('part.taskbody')); ?>
|
||||
</li>
|
||||
|
@ -35,6 +37,8 @@
|
|||
ng-click="openDetails(task.uri,$event)"
|
||||
ng-class="{done: task.completed}"
|
||||
dnd-draggable="task"
|
||||
dnd-dragstart="dragStart(event)"
|
||||
dnd-dragend="dragEnd(event)"
|
||||
dnd-effect-allowed="{{ allow(task) }}">
|
||||
<?php print_unescaped($this->inc('part.taskbody')); ?>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue