aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2013-01-03 09:45:09 +0100
committerJörn Zaefferer <joern.zaefferer@gmail.com>2013-01-03 09:45:09 +0100
commitfb47fd03100aa36c344457c08410fdc43d7fd20d (patch)
tree52c9aeac0a14a62cc9e91cb54b0412bf5c2398f3
parentf244108d2876785d3045a4754bed80a9e5692b8f (diff)
parentf667d090a74ce3f9c0bacceab93ec542c6915e44 (diff)
downloadjquery-ui-fb47fd03100aa36c344457c08410fdc43d7fd20d.tar.gz
jquery-ui-fb47fd03100aa36c344457c08410fdc43d7fd20d.zip
Merge branch 'master' into selectmenu
-rw-r--r--tests/unit/datepicker/datepicker.html2
-rw-r--r--tests/unit/datepicker/datepicker_common.js7
-rw-r--r--tests/unit/datepicker/datepicker_defaults.js11
-rw-r--r--tests/unit/datepicker/datepicker_methods.js4
-rw-r--r--tests/unit/datepicker/datepicker_options.js6
-rw-r--r--tests/unit/datepicker/images/calendar.gifbin0 -> 269 bytes
-rw-r--r--tests/unit/draggable/draggable_common.js9
-rw-r--r--tests/unit/droppable/droppable_common.js11
-rw-r--r--tests/unit/resizable/resizable_common.js7
-rw-r--r--tests/unit/selectable/selectable_common.js12
-rw-r--r--tests/unit/slider/slider_common.js6
-rw-r--r--tests/unit/sortable/sortable.html2
-rw-r--r--tests/unit/sortable/sortable_common.js18
-rw-r--r--ui/jquery.ui.draggable.js7
-rw-r--r--ui/jquery.ui.droppable.js9
-rw-r--r--ui/jquery.ui.resizable.js7
-rw-r--r--ui/jquery.ui.selectable.js10
-rw-r--r--ui/jquery.ui.slider.js8
-rw-r--r--ui/jquery.ui.sortable.js16
19 files changed, 117 insertions, 35 deletions
diff --git a/tests/unit/datepicker/datepicker.html b/tests/unit/datepicker/datepicker.html
index 390d052c3..8ef2de5a4 100644
--- a/tests/unit/datepicker/datepicker.html
+++ b/tests/unit/datepicker/datepicker.html
@@ -22,8 +22,8 @@
});
</script>
+ <script src="datepicker_common.js"></script>
<script src="datepicker_core.js"></script>
- <script src="datepicker_defaults.js"></script>
<script src="datepicker_events.js"></script>
<script src="datepicker_methods.js"></script>
<script src="datepicker_options.js"></script>
diff --git a/tests/unit/datepicker/datepicker_common.js b/tests/unit/datepicker/datepicker_common.js
new file mode 100644
index 000000000..1eecc85cb
--- /dev/null
+++ b/tests/unit/datepicker/datepicker_common.js
@@ -0,0 +1,7 @@
+/*
+TestHelpers.commonWidgetTests( "datepicker", {
+ defaults: {
+ disabled: false
+ }
+});
+*/
diff --git a/tests/unit/datepicker/datepicker_defaults.js b/tests/unit/datepicker/datepicker_defaults.js
deleted file mode 100644
index 1e7d90852..000000000
--- a/tests/unit/datepicker/datepicker_defaults.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * datepicker_defaults.js
- */
-
-/*
-var datepicker_defaults = {
- disabled: false
-};
-
-TestHelpers.commonWidgetTests('datepicker', { defaults: datepicker_defaults });
-*/
diff --git a/tests/unit/datepicker/datepicker_methods.js b/tests/unit/datepicker/datepicker_methods.js
index 77217e449..e52e126d2 100644
--- a/tests/unit/datepicker/datepicker_methods.js
+++ b/tests/unit/datepicker/datepicker_methods.js
@@ -39,7 +39,7 @@ test("destroy", function() {
ok(inp.next().is("#alt"), "Append - append text removed");
// With both
inp= TestHelpers.datepicker.init("#inp", {showOn: "both", buttonImageOnly: true,
- buttonImage: "img/calendar.gif", appendText: "Testing"});
+ buttonImage: "images/calendar.gif", appendText: "Testing"});
ok(inp.is(".hasDatepicker"), "Both - marker class set");
ok($.data(inp[0], TestHelpers.datepicker.PROP_NAME), "Both - instance present");
ok(inp.next()[0].nodeName.toLowerCase() === "img", "Both - button added");
@@ -92,7 +92,7 @@ test("enableDisable", function() {
inp.datepicker("destroy");
// With an image button
inp = TestHelpers.datepicker.init("#inp", {showOn: "button", buttonImageOnly: true,
- buttonImage: "img/calendar.gif"});
+ buttonImage: "images/calendar.gif"});
ok(!inp.datepicker("isDisabled"), "Enable/disable image - initially marked as enabled");
ok(!inp[0].disabled, "Enable/disable image - field initially enabled");
ok(parseFloat(inp.next("img").css("opacity")) === 1, "Enable/disable image - image initially enabled");
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js
index 5603dc87b..e47235786 100644
--- a/tests/unit/datepicker/datepicker_options.js
+++ b/tests/unit/datepicker/datepicker_options.js
@@ -145,13 +145,13 @@ asyncTest("invocation", function() {
function step3() {
// On image button
inp = TestHelpers.datepicker.init("#inp", {showOn: "button", buttonImageOnly: true,
- buttonImage: "img/calendar.gif", buttonText: "Cal"});
+ buttonImage: "images/calendar.gif", buttonText: "Cal"});
ok(!dp.is(":visible"), "Image button - initially hidden");
button = inp.siblings("button");
ok(button.length === 0, "Image button - button absent");
image = inp.siblings("img");
ok(image.length === 1, "Image button - image present");
- equal(image.attr("src"), "img/calendar.gif", "Image button - image source");
+ equal(image.attr("src"), "images/calendar.gif", "Image button - image source");
equal(image.attr("title"), "Cal", "Image button - image text");
inp[0].focus();
setTimeout(function() {
@@ -168,7 +168,7 @@ asyncTest("invocation", function() {
function step4() {
// On both
- inp = TestHelpers.datepicker.init("#inp", {showOn: "both", buttonImage: "img/calendar.gif"});
+ inp = TestHelpers.datepicker.init("#inp", {showOn: "both", buttonImage: "images/calendar.gif"});
ok(!dp.is(":visible"), "Both - initially hidden");
button = inp.siblings("button");
ok(button.length === 1, "Both - button present");
diff --git a/tests/unit/datepicker/images/calendar.gif b/tests/unit/datepicker/images/calendar.gif
new file mode 100644
index 000000000..d0abaa7c0
--- /dev/null
+++ b/tests/unit/datepicker/images/calendar.gif
Binary files differ
diff --git a/tests/unit/draggable/draggable_common.js b/tests/unit/draggable/draggable_common.js
index 34fd20564..7c6961af2 100644
--- a/tests/unit/draggable/draggable_common.js
+++ b/tests/unit/draggable/draggable_common.js
@@ -6,7 +6,6 @@ TestHelpers.commonWidgetTests( "draggable", {
cancel: "input,textarea,button,select,option",
connectToSortable: false,
containment: false,
- create: null,
cursor: "auto",
cursorAt: false,
delay: 0,
@@ -28,6 +27,12 @@ TestHelpers.commonWidgetTests( "draggable", {
snapMode: "both",
snapTolerance: 20,
stack: false,
- zIndex: false
+ zIndex: false,
+
+ // callbacks
+ create: null,
+ drag: null,
+ start: null,
+ stop: null
}
});
diff --git a/tests/unit/droppable/droppable_common.js b/tests/unit/droppable/droppable_common.js
index d86afe3dd..c112def3c 100644
--- a/tests/unit/droppable/droppable_common.js
+++ b/tests/unit/droppable/droppable_common.js
@@ -3,11 +3,18 @@ TestHelpers.commonWidgetTests( "droppable", {
accept: "*",
activeClass: false,
addClasses: true,
- create: null,
disabled: false,
greedy: false,
hoverClass: false,
scope: "default",
- tolerance: "intersect"
+ tolerance: "intersect",
+
+ // callbacks
+ activate: null,
+ create: null,
+ deactivate: null,
+ drop: null,
+ out: null,
+ over: null
}
});
diff --git a/tests/unit/resizable/resizable_common.js b/tests/unit/resizable/resizable_common.js
index 6758214ad..c261ac5b9 100644
--- a/tests/unit/resizable/resizable_common.js
+++ b/tests/unit/resizable/resizable_common.js
@@ -1,4 +1,4 @@
-TestHelpers.commonWidgetTests("resizable", {
+TestHelpers.commonWidgetTests( "resizable", {
defaults: {
alsoResize: false,
animate: false,
@@ -22,6 +22,9 @@ TestHelpers.commonWidgetTests("resizable", {
zIndex: 90,
// callbacks
- create: null
+ create: null,
+ resize: null,
+ start: null,
+ stop: null
}
});
diff --git a/tests/unit/selectable/selectable_common.js b/tests/unit/selectable/selectable_common.js
index 00bbedc61..d00a47be5 100644
--- a/tests/unit/selectable/selectable_common.js
+++ b/tests/unit/selectable/selectable_common.js
@@ -3,11 +3,19 @@ TestHelpers.commonWidgetTests("selectable", {
appendTo: "body",
autoRefresh: true,
cancel: "input,textarea,button,select,option",
- create: null,
delay: 0,
disabled: false,
distance: 0,
filter: "*",
- tolerance: "touch"
+ tolerance: "touch",
+
+ // callbacks
+ create: null,
+ selected: null,
+ selecting: null,
+ start: null,
+ stop: null,
+ unselected: null,
+ unselecting: null
}
});
diff --git a/tests/unit/slider/slider_common.js b/tests/unit/slider/slider_common.js
index 48fd5e457..6d7278de6 100644
--- a/tests/unit/slider/slider_common.js
+++ b/tests/unit/slider/slider_common.js
@@ -14,6 +14,10 @@ TestHelpers.commonWidgetTests( "slider", {
values: null,
// callbacks
- create: null
+ create: null,
+ change: null,
+ slide: null,
+ start: null,
+ stop: null
}
});
diff --git a/tests/unit/sortable/sortable.html b/tests/unit/sortable/sortable.html
index 9736cf9ee..c23a15854 100644
--- a/tests/unit/sortable/sortable.html
+++ b/tests/unit/sortable/sortable.html
@@ -11,7 +11,7 @@
<script src="../testsuite.js"></script>
<script>
TestHelpers.loadResources({
- css: [ "ui.core", "ui.sortable" ],
+ css: [ "ui.core" ],
js: [
"ui/jquery.ui.core.js",
"ui/jquery.ui.widget.js",
diff --git a/tests/unit/sortable/sortable_common.js b/tests/unit/sortable/sortable_common.js
index 0a8e9f2b9..86850a658 100644
--- a/tests/unit/sortable/sortable_common.js
+++ b/tests/unit/sortable/sortable_common.js
@@ -5,7 +5,6 @@ TestHelpers.commonWidgetTests( "sortable", {
cancel: "input,textarea,button,select,option",
connectWith: false,
containment: false,
- create: null,
cursor: "auto",
cursorAt: false,
delay: 0,
@@ -26,6 +25,21 @@ TestHelpers.commonWidgetTests( "sortable", {
scrollSpeed: 20,
scope: "default",
tolerance: "intersect",
- zIndex: 1000
+ zIndex: 1000,
+
+ // callbacks
+ activate: null,
+ beforeStop: null,
+ change: null,
+ create: null,
+ deactivate: null,
+ out: null,
+ over: null,
+ receive: null,
+ remove: null,
+ sort: null,
+ start: null,
+ stop: null,
+ update: null
}
});
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 9e3267aed..ba81e9f22 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -42,7 +42,12 @@ $.widget("ui.draggable", $.ui.mouse, {
snapMode: "both",
snapTolerance: 20,
stack: false,
- zIndex: false
+ zIndex: false,
+
+ // callbacks
+ drag: null,
+ start: null,
+ stop: null
},
_create: function() {
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js
index 35a260151..0f75774a7 100644
--- a/ui/jquery.ui.droppable.js
+++ b/ui/jquery.ui.droppable.js
@@ -30,7 +30,14 @@ $.widget("ui.droppable", {
greedy: false,
hoverClass: false,
scope: "default",
- tolerance: "intersect"
+ tolerance: "intersect",
+
+ // callbacks
+ activate: null,
+ deactivate: null,
+ drop: null,
+ out: null,
+ over: null
},
_create: function() {
diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js
index ce3efeb9d..c255ccc5e 100644
--- a/ui/jquery.ui.resizable.js
+++ b/ui/jquery.ui.resizable.js
@@ -43,7 +43,12 @@ $.widget("ui.resizable", $.ui.mouse, {
minHeight: 10,
minWidth: 10,
// See #7960
- zIndex: 90
+ zIndex: 90,
+
+ // callbacks
+ resize: null,
+ start: null,
+ stop: null
},
_create: function() {
diff --git a/ui/jquery.ui.selectable.js b/ui/jquery.ui.selectable.js
index 8e6d03c1f..8a6db9007 100644
--- a/ui/jquery.ui.selectable.js
+++ b/ui/jquery.ui.selectable.js
@@ -22,7 +22,15 @@ $.widget("ui.selectable", $.ui.mouse, {
autoRefresh: true,
distance: 0,
filter: "*",
- tolerance: "touch"
+ tolerance: "touch",
+
+ // callbacks
+ selected: null,
+ selecting: null,
+ start: null,
+ stop: null,
+ unselected: null,
+ unselecting: null
},
_create: function() {
var selectees,
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index 712c6853d..46c8a83ae 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -32,7 +32,13 @@ $.widget( "ui.slider", $.ui.mouse, {
range: false,
step: 1,
value: 0,
- values: null
+ values: null,
+
+ // callbacks
+ change: null,
+ slide: null,
+ start: null,
+ stop: null
},
_create: function() {
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index f13a1d6bd..ccd293fbd 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -47,7 +47,21 @@ $.widget("ui.sortable", $.ui.mouse, {
scrollSpeed: 20,
scope: "default",
tolerance: "intersect",
- zIndex: 1000
+ zIndex: 1000,
+
+ // callbacks
+ activate: null,
+ beforeStop: null,
+ change: null,
+ deactivate: null,
+ out: null,
+ over: null,
+ receive: null,
+ remove: null,
+ sort: null,
+ start: null,
+ stop: null,
+ update: null
},
_create: function() {