From f2265bf9e6c2bde7402d5dfef1d1f223e9a4de2e Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Mon, 28 Jul 2008 21:06:04 +0000 Subject: draggable,droppable: implemented cssNamespace option, if set to false/null, it won't add a class to the element --- ui/ui.droppable.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ui/ui.droppable.js') diff --git a/ui/ui.droppable.js b/ui/ui.droppable.js index 4e77ecf67..c792e8e63 100644 --- a/ui/ui.droppable.js +++ b/ui/ui.droppable.js @@ -30,6 +30,8 @@ $.widget("ui.droppable", { $.ui.ddmanager.droppables[this.options.scope] = $.ui.ddmanager.droppables[this.options.scope] || []; $.ui.ddmanager.droppables[this.options.scope].push(this); + (this.options.cssNamespace && this.element.addClass(this.options.cssNamespace+"-droppable")); + }, plugins: {}, ui: function(c) { @@ -118,7 +120,8 @@ $.extend($.ui.droppable, { defaults: { disabled: false, tolerance: 'intersect', - scope: 'default' + scope: 'default', + cssNamespace: 'ui' } }); @@ -169,7 +172,7 @@ $.ui.intersect = function(draggable, droppable, toleranceMode) { */ $.ui.ddmanager = { current: null, - droppables: { default: [] }, + droppables: { 'default': [] }, prepareOffsets: function(t, e) { var m = $.ui.ddmanager.droppables[t.options.scope]; -- cgit v1.2.3