diff options
author | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-10-18 14:02:16 +0300 |
---|---|---|
committer | Stanislau Wolski <stanislau.wolski@gmail.com> | 2013-10-18 14:02:16 +0300 |
commit | c2e1fd58b0c848118cf8554de50f788199d609e2 (patch) | |
tree | bd30b3b7de59b34120705465e8628a740cdb513d /codebase/ext/dhtmlxscheduler_outerdrag.js | |
download | scheduler-c2e1fd58b0c848118cf8554de50f788199d609e2.zip scheduler-c2e1fd58b0c848118cf8554de50f788199d609e2.tar.gz scheduler-c2e1fd58b0c848118cf8554de50f788199d609e2.tar.bz2 |
[add] version 4.0v4.0.0
Diffstat (limited to 'codebase/ext/dhtmlxscheduler_outerdrag.js')
-rw-r--r-- | codebase/ext/dhtmlxscheduler_outerdrag.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/codebase/ext/dhtmlxscheduler_outerdrag.js b/codebase/ext/dhtmlxscheduler_outerdrag.js new file mode 100644 index 0000000..9330c60 --- /dev/null +++ b/codebase/ext/dhtmlxscheduler_outerdrag.js @@ -0,0 +1,7 @@ +/* +This software is allowed to use under GPL or you need to obtain Commercial or Enterise License +to use it in non-GPL project. Please contact sales@dhtmlx.com for details +*/ +scheduler.attachEvent("onTemplatesReady",function(){var c=new dhtmlDragAndDropObject,f=c.stopDrag,d;c.stopDrag=function(b){d=b||event;return f.apply(this,arguments)};c.addDragLanding(scheduler._els.dhx_cal_data[0],{_drag:function(b,c,f,h){if(!scheduler.checkEvent("onBeforeExternalDragIn")||scheduler.callEvent("onBeforeExternalDragIn",[b,c,f,h,d])){var i=scheduler.attachEvent("onEventCreated",function(a){if(!scheduler.callEvent("onExternalDragIn",[a,b,d]))this._drag_mode=this._drag_id=null,this.deleteEvent(a)}), +g=scheduler.getActionData(d),a={start_date:new Date(g.date)};if(scheduler.matrix&&scheduler.matrix[scheduler._mode]){var e=scheduler.matrix[scheduler._mode];a[e.y_property]=g.section;var j=scheduler._locate_cell_timeline(d);a.start_date=e._trace_x[j.x];a.end_date=scheduler.date.add(a.start_date,e.x_step,e.x_unit)}if(scheduler._props&&scheduler._props[scheduler._mode])a[scheduler._props[scheduler._mode].map_to]=g.section;scheduler.addEventNow(a);scheduler.detachEvent(i)}},_dragIn:function(b){return b}, +_dragOut:function(){return this}})}); |