(css) Cleanup transition of event DnD ghosts
This commit is contained in:
parent
21e0cd8711
commit
23185273a6
|
@ -83,13 +83,10 @@
|
||||||
|
|
||||||
function updateGhost() {
|
function updateGhost() {
|
||||||
// From SOGoEventDragGhostController._updateGhosts
|
// From SOGoEventDragGhostController._updateGhosts
|
||||||
var showGhost, isRelative, currentDay, wasOtherBlock,
|
var showGhost, isRelative, currentDay,
|
||||||
start, duration, durationLeft, maxDuration, enableTransition;
|
start, duration, durationLeft, maxDuration;
|
||||||
|
|
||||||
showGhost = false;
|
showGhost = false;
|
||||||
enableTransition = function() {
|
|
||||||
iElement.removeClass('sg-event--notransition');
|
|
||||||
};
|
|
||||||
|
|
||||||
if (Calendar.$view && Calendar.$view.type == scrollViewCtrl.type) {
|
if (Calendar.$view && Calendar.$view.type == scrollViewCtrl.type) {
|
||||||
// The view of the dragging block is the scrolling view of this ghost block
|
// The view of the dragging block is the scrolling view of this ghost block
|
||||||
|
@ -119,9 +116,6 @@
|
||||||
if (!isRelative) {
|
if (!isRelative) {
|
||||||
// Show start hour and set the vertical position
|
// Show start hour and set the vertical position
|
||||||
scope.block.startHour = getStartTime(start);
|
scope.block.startHour = getStartTime(start);
|
||||||
wasOtherBlock = parseInt(iElement.css('top')) === 0;
|
|
||||||
if (wasOtherBlock)
|
|
||||||
iElement.addClass('sg-event--notransition');
|
|
||||||
// Set the height
|
// Set the height
|
||||||
if (Calendar.$view.quarterHeight) {
|
if (Calendar.$view.quarterHeight) {
|
||||||
iElement.css('top', (start * Calendar.$view.quarterHeight) + 'px');
|
iElement.css('top', (start * Calendar.$view.quarterHeight) + 'px');
|
||||||
|
@ -129,8 +123,6 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
iElement.css('top', Calendar.$view.topOffset + 'px');
|
iElement.css('top', Calendar.$view.topOffset + 'px');
|
||||||
if (wasOtherBlock)
|
|
||||||
$timeout(enableTransition);
|
|
||||||
}
|
}
|
||||||
iElement.removeClass('fg-folder' + scope.block.component.pid);
|
iElement.removeClass('fg-folder' + scope.block.component.pid);
|
||||||
iElement.removeClass('sg-event--ghost--last');
|
iElement.removeClass('sg-event--ghost--last');
|
||||||
|
@ -149,15 +141,10 @@
|
||||||
// The dragging event overlaps this current ghost's day
|
// The dragging event overlaps this current ghost's day
|
||||||
showGhost = true;
|
showGhost = true;
|
||||||
if (!isRelative) {
|
if (!isRelative) {
|
||||||
wasOtherBlock = parseInt(iElement.css('top')) !== 0;
|
|
||||||
if (wasOtherBlock)
|
|
||||||
iElement.addClass('sg-event--notransition');
|
|
||||||
iElement.css('top', Calendar.$view.topOffset + 'px');
|
iElement.css('top', Calendar.$view.topOffset + 'px');
|
||||||
// Set the height
|
// Set the height
|
||||||
if (Calendar.$view.quarterHeight)
|
if (Calendar.$view.quarterHeight)
|
||||||
iElement.css('height', (duration * Calendar.$view.quarterHeight) + 'px');
|
iElement.css('height', (duration * Calendar.$view.quarterHeight) + 'px');
|
||||||
if (wasOtherBlock)
|
|
||||||
$timeout(enableTransition);
|
|
||||||
}
|
}
|
||||||
iElement.removeClass('sg-event--ghost--first');
|
iElement.removeClass('sg-event--ghost--first');
|
||||||
iElement.removeClass('sg-event--ghost--last');
|
iElement.removeClass('sg-event--ghost--last');
|
||||||
|
|
|
@ -265,10 +265,6 @@ $quarter_height: 10px;
|
||||||
$i: $i + 1;
|
$i: $i + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--notransition {
|
|
||||||
transition: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--ghost {
|
&--ghost {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
left: $block_margin;
|
left: $block_margin;
|
||||||
|
|
Loading…
Reference in a new issue