]> source.dussan.org Git - jquery-ui.git/commitdiff
All mouse-based plugins: Extend $.ui.mouse.defaults. Changed $.ui.mouse.defaults...
authorScott González <scott.gonzalez@gmail.com>
Tue, 9 Jun 2009 00:46:00 +0000 (00:46 +0000)
committerScott González <scott.gonzalez@gmail.com>
Tue, 9 Jun 2009 00:46:00 +0000 (00:46 +0000)
ui/ui.core.js
ui/ui.draggable.js
ui/ui.resizable.js
ui/ui.selectable.js
ui/ui.slider.js
ui/ui.sortable.js

index 4068f96308a80b2cd92816c7cd3143573359cba6..fe2d228e39ae216d41990e20c0808d3642d919ec 100644 (file)
@@ -519,7 +519,7 @@ $.ui.mouse = {
 };
 
 $.ui.mouse.defaults = {
-       cancel: null,
+       cancel: ':input,option',
        distance: 1,
        delay: 0
 };
index 4a11d3a61e0207ced7a6ce726975004f5045e9ff..6057cdfbd0a511932cbe071891c161cee5245711 100644 (file)
@@ -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", {
index 6e5691aeae10684ef3c63522c6098bc5d4a363b5..847337b08fa83116964d57f2f917e71824723ad4 100644 (file)
@@ -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
-       }
+       })
 });
 
 /*
index 93d0c8ca88a8406e8def03b198ab4be3874183e6..635f1260268bddfc404cb4fd2d2a15ac4321663d 100644 (file)
@@ -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);
index 30a6100595e2cd4286390e6ea3adb25b926b92d3..1b5a9c5ac9afd052322004f518dc5770bb1182ee 100644 (file)
@@ -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);
index 76cce9aa6a42c869055e2994160ac582c74ae0ec..12f18b6196da211fd9bc2f9794020d9dbe492653 100644 (file)
@@ -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);