Don't even start the drag if you do not have edit permission

This commit is contained in:
Nathan Gray 2015-11-11 16:54:00 +00:00
parent cfb341137f
commit ddd82175d2
2 changed files with 7 additions and 3 deletions

View File

@ -291,8 +291,10 @@ var et2_calendar_planner = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResize
}); });
// Customize and override some draggable settings // Customize and override some draggable settings
this.div.on('dragcreate','.calendar_calEvent:not(.rowNoEdit)', function(event,ui) { this.div.on('dragcreate','.calendar_calEvent', function(event, ui) {
$j(this).draggable('option','cursorAt',false); $j(this).draggable('option','cancel','.rowNoEdit');
// Act like you clicked the header, makes it easier to position
$j(this).draggable('option','cursorAt', {top: 5, left: 5});
}) })
.on('dragstart', '.calendar_calEvent', function(event,ui) { .on('dragstart', '.calendar_calEvent', function(event,ui) {
$j('.calendar_calEvent',ui.helper).width($j(this).width()) $j('.calendar_calEvent',ui.helper).width($j(this).width())

View File

@ -285,7 +285,9 @@ var et2_calendar_timegrid = et2_valueWidget.extend([et2_IDetachedDOM, et2_IResiz
}); });
// Customize and override some draggable settings // Customize and override some draggable settings
this.div.on('dragcreate','.calendar_calEvent:not(.rowNoEdit)', function(event,ui) { this.div
.on('dragcreate','.calendar_calEvent', function(event, ui) {
$j(this).draggable('option','cancel','.rowNoEdit');
// Act like you clicked the header, makes it easier to position // Act like you clicked the header, makes it easier to position
$j(this).draggable('option','cursorAt', {top: 5, left: 5}); $j(this).draggable('option','cursorAt', {top: 5, left: 5});
}) })