(js) Remove draggable CSS class when not editable
This commit is contained in:
parent
20b3a98282
commit
49fb7b3487
|
@ -22,12 +22,15 @@
|
||||||
|
|
||||||
function link(scope, element, attrs, calendarDayCtrl) {
|
function link(scope, element, attrs, calendarDayCtrl) {
|
||||||
if (scope.block) {
|
if (scope.block) {
|
||||||
if (scope.block.component.editable)
|
if (scope.block.component.editable) {
|
||||||
// Add dragging grips to existing event block
|
// Add dragging grips to existing event block
|
||||||
initGrips();
|
initGrips();
|
||||||
else
|
}
|
||||||
|
else {
|
||||||
|
element.removeClass('sg-draggable-calendar-block');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Start dragging on mousedown
|
// Start dragging on mousedown
|
||||||
element.on('mousedown', onDragDetect);
|
element.on('mousedown', onDragDetect);
|
||||||
|
|
Loading…
Reference in a new issue