(js) Remove draggable CSS class when not editable

This commit is contained in:
Francis Lachapelle 2015-12-09 20:13:19 -05:00
parent 20b3a98282
commit 49fb7b3487

View file

@ -22,12 +22,15 @@
function link(scope, element, attrs, calendarDayCtrl) {
if (scope.block) {
if (scope.block.component.editable)
if (scope.block.component.editable) {
// Add dragging grips to existing event block
initGrips();
else
}
else {
element.removeClass('sg-draggable-calendar-block');
return;
}
}
// Start dragging on mousedown
element.on('mousedown', onDragDetect);