Show cool things you have done with our products


Post by praveen.shastri »

Hello Mats,

in event editor example, is it possible to disable dragging and editing of events dynamically?

My case is, System has two roles. Admin and user.

Admin should be able to add/modify and delete the events whereas user should only be able to view the events.

Is it possible?
Last edited by praveen.shastri on Sun Nov 07, 2010 7:44 am, edited 1 time in total.

Post by mats »

Of course it's possible :), use these three config properties:
var g = new Sch.SchedulerPanel({
            resizeHandles : 'none',
            enableEventDragDrop : false,
            enableDragCreation : false,
...

Post by praveen.shastri »

Mats, is it possible to put these restrictions at event level? i.e few events are readonly and few are editable based on user role.

and how to disable the double click action which opens event editor form?

Post by mats »

Yes it's possible (and easy) :). Look at some of the API and see which events are fired, such as 'beforednd' and 'beforeresize', if you return false from those handlers the drag process will not start. http://ext-scheduler.com/docs/?class=Sch.SchedulerPanel.
scheduler.on('beforednd', function() {
   return false; // prevent DnD
});

Post Reply