Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/core/DraggableList.js
Show First 20 Lines • Show All 414 Lines • ▼ Show 20 Lines | _ondrop : function(e) { | ||||
if (!this.invoke('didEndDrag', dragging).getPrevented()) { | if (!this.invoke('didEndDrag', dragging).getPrevented()) { | ||||
JX.DOM.alterClass(dragging, 'drag-dragging', false); | JX.DOM.alterClass(dragging, 'drag-dragging', false); | ||||
} | } | ||||
e.kill(); | e.kill(); | ||||
}, | }, | ||||
lock : function() { | lock : function() { | ||||
for (var ii = 0; ii < this._group.length; ii++) { | |||||
this._group[ii]._lock(); | |||||
} | |||||
return this; | |||||
}, | |||||
_lock : function() { | |||||
this._locked++; | this._locked++; | ||||
if (this._locked === 1) { | if (this._locked === 1) { | ||||
this.invoke('didLock'); | this.invoke('didLock'); | ||||
} | } | ||||
return this; | return this; | ||||
}, | }, | ||||
unlock : function() { | unlock: function() { | ||||
for (var ii = 0; ii < this._group.length; ii++) { | |||||
this._group[ii]._unlock(); | |||||
} | |||||
return this; | |||||
}, | |||||
_unlock : function() { | |||||
if (__DEV__) { | if (__DEV__) { | ||||
if (!this._locked) { | if (!this._locked) { | ||||
JX.$E("JX.Draggable.unlock(): Draggable is not locked!"); | JX.$E("JX.Draggable.unlock(): Draggable is not locked!"); | ||||
} | } | ||||
} | } | ||||
this._locked--; | this._locked--; | ||||
if (!this._locked) { | if (!this._locked) { | ||||
this.invoke('didUnlock'); | this.invoke('didUnlock'); | ||||
} | } | ||||
return this; | return this; | ||||
} | } | ||||
} | } | ||||
}); | }); |