*/
dropNotAllowed : "x-dd-drop-nodrop",
/**
- * @cfg {boolean} success
+ * @cfg {boolean|String} success true/false or string (add/sub/ok/nodrop)
* set this after drop listener..
*/
success : false,
if(this.overClass){
this.el.addClass(this.overClass);
}
- return this.valid ? this.dropAllowed : this.dropNotAllowed;
+ return typeof(this.valid) == 'string' ? 'x-dd-drop-' + this.valid : (
+ this.valid ? this.dropAllowed : this.dropNotAllowed
+ );
},
/**
notifyOver : function(dd, e, data){
this.valid = true;
this.fireEvent('over', this, dd, e, data);
- return this.valid ? this.dropAllowed : this.dropNotAllowed;
+ return typeof(this.valid) == 'string' ? 'x-dd-drop-' + this.valid : (
+ this.valid ? this.dropAllowed : this.dropNotAllowed
+ );
},
/**
notifyDrop : function(dd, e, data){
this.success = false;
this.fireEvent('drop', this, dd, e, data);
- return this.success;
+ return typeof(this.valid) == 'string' ? this.valid=='ok' : this.valid;
+ );
}
});
\ No newline at end of file