aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-07-28 21:06:04 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-07-28 21:06:04 +0000
commitf2265bf9e6c2bde7402d5dfef1d1f223e9a4de2e (patch)
tree06da2cb7333eb7c60e6c599f143eeef551001b6b /ui
parentc2ef2553bcc6fc3f2fd08fcf7e2d597077b2ce7a (diff)
downloadjquery-ui-f2265bf9e6c2bde7402d5dfef1d1f223e9a4de2e.tar.gz
jquery-ui-f2265bf9e6c2bde7402d5dfef1d1f223e9a4de2e.zip
draggable,droppable: implemented cssNamespace option, if set to false/null, it won't add a class to the element
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.draggable.js6
-rw-r--r--ui/ui.droppable.js7
2 files changed, 9 insertions, 4 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js
index d72e24685..87e89bd1f 100644
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -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"
}
});
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];