(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) { 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);