(css) Cleanup transition of event DnD ghosts

pull/27/merge
Francis Lachapelle 2016-08-04 14:16:18 -04:00
parent 21e0cd8711
commit 23185273a6
2 changed files with 2 additions and 19 deletions

View File

@ -83,13 +83,10 @@
function updateGhost() {
// From SOGoEventDragGhostController._updateGhosts
var showGhost, isRelative, currentDay, wasOtherBlock,
start, duration, durationLeft, maxDuration, enableTransition;
var showGhost, isRelative, currentDay,
start, duration, durationLeft, maxDuration;
showGhost = false;
enableTransition = function() {
iElement.removeClass('sg-event--notransition');
};
if (Calendar.$view && Calendar.$view.type == scrollViewCtrl.type) {
// The view of the dragging block is the scrolling view of this ghost block
@ -119,9 +116,6 @@
if (!isRelative) {
// Show start hour and set the vertical position
scope.block.startHour = getStartTime(start);
wasOtherBlock = parseInt(iElement.css('top')) === 0;
if (wasOtherBlock)
iElement.addClass('sg-event--notransition');
// Set the height
if (Calendar.$view.quarterHeight) {
iElement.css('top', (start * Calendar.$view.quarterHeight) + 'px');
@ -129,8 +123,6 @@
}
else
iElement.css('top', Calendar.$view.topOffset + 'px');
if (wasOtherBlock)
$timeout(enableTransition);
}
iElement.removeClass('fg-folder' + scope.block.component.pid);
iElement.removeClass('sg-event--ghost--last');
@ -149,15 +141,10 @@
// The dragging event overlaps this current ghost's day
showGhost = true;
if (!isRelative) {
wasOtherBlock = parseInt(iElement.css('top')) !== 0;
if (wasOtherBlock)
iElement.addClass('sg-event--notransition');
iElement.css('top', Calendar.$view.topOffset + 'px');
// Set the height
if (Calendar.$view.quarterHeight)
iElement.css('height', (duration * Calendar.$view.quarterHeight) + 'px');
if (wasOtherBlock)
$timeout(enableTransition);
}
iElement.removeClass('sg-event--ghost--first');
iElement.removeClass('sg-event--ghost--last');

View File

@ -265,10 +265,6 @@ $quarter_height: 10px;
$i: $i + 1;
}
&--notransition {
transition: none;
}
&--ghost {
opacity: 1;
left: $block_margin;