1
0
mirror of http://git.whoc.org.uk/git/password-manager.git synced 2024-11-01 15:27:17 +01:00
password-manager-mirror/frontend/beta/js/YUI-extensions/dd/DropTarget.js

46 lines
1.1 KiB
JavaScript
Raw Normal View History

// kill drag drop dependency
if(YAHOO.util.DragDrop){
YAHOO.ext.dd.DropTarget = function(el, config){
this.el = getEl(el);
YAHOO.ext.util.Config.apply(this, config);
if(this.containerScroll){
YAHOO.ext.dd.ScrollManager.register(this.el);
}
YAHOO.ext.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group,
{isTarget: true});
};
YAHOO.extendX(YAHOO.ext.dd.DropTarget, YAHOO.util.DDTarget, {
isTarget : true,
isNotifyTarget : true,
dropAllowed : 'ydd-drop-ok',
dropNotAllowed : 'ydd-drop-nodrop',
notifyEnter : function(dd, e, data){
if(this.overClass){
this.el.addClass(this.overClass);
}
return this.dropAllowed;
},
notifyOver : function(dd, e, data){
return this.dropAllowed;
},
notifyOut : function(dd, e, data){
if(this.overClass){
this.el.removeClass(this.overClass);
}
},
notifyDrop : function(dd, e, data){
return false;
}
});
}