diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-06-09 00:46:00 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-06-09 00:46:00 +0000 |
commit | 8634ba993ceec7c9bbd34b6e0e2a666494b385a4 (patch) | |
tree | 5033d6ec9e3b0bf57821b337b5d7a87b3e705936 /ui | |
parent | ce94b548d012b74862d35c80a235ecaa31717dc8 (diff) | |
download | jquery-ui-8634ba993ceec7c9bbd34b6e0e2a666494b385a4.tar.gz jquery-ui-8634ba993ceec7c9bbd34b6e0e2a666494b385a4.zip |
All mouse-based plugins: Extend $.ui.mouse.defaults. Changed $.ui.mouse.defaults.cancel to ":input,option" which is used by every plugin as its default. Fixes #4584 ($.ui.mouse.defaults never used).
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.core.js | 2 | ||||
-rw-r--r-- | ui/ui.draggable.js | 7 | ||||
-rw-r--r-- | ui/ui.resizable.js | 7 | ||||
-rw-r--r-- | ui/ui.selectable.js | 6 | ||||
-rw-r--r-- | ui/ui.slider.js | 5 | ||||
-rw-r--r-- | ui/ui.sortable.js | 7 |
6 files changed, 11 insertions, 23 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js index 4068f9630..fe2d228e3 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -519,7 +519,7 @@ $.ui.mouse = { }; $.ui.mouse.defaults = { - cancel: null, + cancel: ':input,option', distance: 1, delay: 0 }; diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index 4a11d3a61..6057cdfbd 100644 --- a/ui/ui.draggable.js +++ b/ui/ui.draggable.js @@ -404,17 +404,14 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { $.extend($.ui.draggable, { version: "@VERSION", eventPrefix: "drag", - defaults: { + defaults: $.extend({}, $.ui.mouse.defaults, { addClasses: true, appendTo: "parent", axis: false, - cancel: ":input,option", connectToSortable: false, containment: false, cursor: "auto", cursorAt: false, - delay: 0, - distance: 1, grid: false, handle: false, helper: "original", @@ -432,7 +429,7 @@ $.extend($.ui.draggable, { snapTolerance: 20, stack: false, zIndex: false - } + }) }); $.ui.plugin.add("draggable", "connectToSortable", { diff --git a/ui/ui.resizable.js b/ui/ui.resizable.js index 6e5691aea..847337b08 100644 --- a/ui/ui.resizable.js +++ b/ui/ui.resizable.js @@ -501,17 +501,14 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, { $.extend($.ui.resizable, { version: "@VERSION", eventPrefix: "resize", - defaults: { + defaults: $.extend({}, $.ui.mouse.defaults, { alsoResize: false, animate: false, animateDuration: "slow", animateEasing: "swing", aspectRatio: false, autoHide: false, - cancel: ":input,option", containment: false, - delay: 0, - distance: 1, ghost: false, grid: false, handles: "e,s,se", @@ -521,7 +518,7 @@ $.extend($.ui.resizable, { minHeight: 10, minWidth: 10, zIndex: 1000 - } + }) }); /* diff --git a/ui/ui.selectable.js b/ui/ui.selectable.js index 93d0c8ca8..635f12602 100644 --- a/ui/ui.selectable.js +++ b/ui/ui.selectable.js @@ -245,15 +245,13 @@ $.widget("ui.selectable", $.extend({}, $.ui.mouse, { $.extend($.ui.selectable, { version: "@VERSION", - defaults: { + defaults: $.extend({}, $.ui.mouse.defaults, { appendTo: 'body', autoRefresh: true, - cancel: ":input,option", - delay: 0, distance: 0, filter: '*', tolerance: 'touch' - } + }) }); })(jQuery); diff --git a/ui/ui.slider.js b/ui/ui.slider.js index 30a610059..1b5a9c5ac 100644 --- a/ui/ui.slider.js +++ b/ui/ui.slider.js @@ -541,9 +541,8 @@ $.widget("ui.slider", $.extend({}, $.ui.mouse, { $.extend($.ui.slider, { version: "@VERSION", eventPrefix: "slide", - defaults: { + defaults: $.extend({}, $.ui.mouse.defaults, { animate: false, - delay: 0, distance: 0, max: 100, min: 0, @@ -552,7 +551,7 @@ $.extend($.ui.slider, { step: 1, value: 0, values: null - } + }) }); })(jQuery); diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js index 76cce9aa6..12f18b619 100644 --- a/ui/ui.sortable.js +++ b/ui/ui.sortable.js @@ -990,16 +990,13 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { $.extend($.ui.sortable, { version: "@VERSION", eventPrefix: "sort", - defaults: { + defaults: $.extend({}, $.ui.mouse.defaults, { appendTo: "parent", axis: false, - cancel: ":input,option", connectWith: false, containment: false, cursor: 'auto', cursorAt: false, - delay: 0, - distance: 1, dropOnEmpty: true, forcePlaceholderSize: false, forceHelperSize: false, @@ -1016,7 +1013,7 @@ $.extend($.ui.sortable, { scope: "default", tolerance: "intersect", zIndex: 1000 - } + }) }); })(jQuery); |