]> source.dussan.org Git - jquery-ui.git/commitdiff
draggable,droppable: implemented cssNamespace option, if set to false/null, it won...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Mon, 28 Jul 2008 21:06:04 +0000 (21:06 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Mon, 28 Jul 2008 21:06:04 +0000 (21:06 +0000)
ui/ui.draggable.js
ui/ui.droppable.js

index d72e24685f1ac3aab12009115226eca0cbc11507..87e89bd1f5bfc346ed5e2907cd415b7bbc33aea3 100644 (file)
@@ -17,7 +17,8 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
                
                if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
                        this.element[0].style.position = 'relative';
-
+               
+               (this.options.cssNamespace && this.element.addClass(this.options.cssNamespace+"-draggable"));
                (this.options.disabled && this.element.addClass('ui-draggable-disabled'));
                
                this.mouseInit();
@@ -268,7 +269,8 @@ $.extend($.ui.draggable, {
                delay: 0,
                distance: 1,
                helper: "original",
-               scope: "default"
+               scope: "default",
+               cssNamespace: "ui"
        }
 });
 
index 4e77ecf67174d9eb9b28d93c5efe1b126cb4461f..c792e8e63e87e5efc35d0ae8b5ec9edaa89c8dcd 100644 (file)
@@ -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];