diff --git a/tests/visual/addClass/addClass_queue.html b/tests/visual/addClass/addClass_queue.html
deleted file mode 100644
index 27c3848a7d5..00000000000
--- a/tests/visual/addClass/addClass_queue.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/tests/visual/all.html b/tests/visual/all.html
index c50465a477b..4bbd323b0bf 100644
--- a/tests/visual/all.html
+++ b/tests/visual/all.html
@@ -11,7 +11,6 @@
-
diff --git a/tests/visual/autocomplete/autocomplete.html b/tests/visual/autocomplete/autocomplete.html
index 199451e9c03..9b0ba66f689 100644
--- a/tests/visual/autocomplete/autocomplete.html
+++ b/tests/visual/autocomplete/autocomplete.html
@@ -9,7 +9,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/visual/compound/widgets_in_dialog.html b/tests/visual/compound/widgets_in_dialog.html
index 809ee5656f3..11120ea2481 100644
--- a/tests/visual/compound/widgets_in_dialog.html
+++ b/tests/visual/compound/widgets_in_dialog.html
@@ -13,18 +13,15 @@
-
+
-
@@ -79,11 +76,11 @@
@@ -42,19 +41,9 @@
Widgets
Button
Datepicker
Dialog
-
- Menu
-
-
Progressbar
Slider
-
Spinner
Tabs
-
Tooltip
diff --git a/tests/visual/menu/contextmenu.html b/tests/visual/menu/contextmenu.html
index d3fdc4e7c29..eb328abf065 100644
--- a/tests/visual/menu/contextmenu.html
+++ b/tests/visual/menu/contextmenu.html
@@ -8,7 +8,7 @@
-
+
-
-
+
-
+
+
-
-
-
-
-
-
-
-
-
diff --git a/tests/visual/menu/nested.html b/tests/visual/menu/nested.html
index 2508c55c4d4..c7f9a09143a 100644
--- a/tests/visual/menu/nested.html
+++ b/tests/visual/menu/nested.html
@@ -8,8 +8,8 @@
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
Basic with event callbacks:
-
-
\ No newline at end of file
diff --git a/tests/visual/tooltip/ajaxcontent.php b/tests/visual/tooltip/ajaxcontent.php
deleted file mode 100644
index a689a734dc4..00000000000
--- a/tests/visual/tooltip/ajaxcontent.php
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
Hello world!
\ No newline at end of file
diff --git a/tests/visual/tooltip/callout.html b/tests/visual/tooltip/callout.html
deleted file mode 100644
index 3ef6949874b..00000000000
--- a/tests/visual/tooltip/callout.html
+++ /dev/null
@@ -1,213 +0,0 @@
-
-
-
-
Tooltip Visual Test: Default
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- collision detection should kick in around here
-
-
-
-
-
-
-
- right aligned with custom position
-
-
-
- gets its content via ajax
-
-
-
-
span
-
- div
- nested span
-
-
-
-
-
-
-
-
Toggle disabled
-
Toggle widget
-
-
-
-
-
diff --git a/tests/visual/tooltip/tooltip.html b/tests/visual/tooltip/tooltip.html
deleted file mode 100644
index fb2690a54d8..00000000000
--- a/tests/visual/tooltip/tooltip.html
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-
-
Tooltip Visual Test: Default
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- collision detection should kick in around here
-
-
-
-
-
- right aligned with custom position
-
-
-
- gets its content via ajax
-
-
- gets its content via ajax, caches the response
-
-
-
-
span
-
- div
- nested span
-
-
-
-
- Text in bold .
-
-
-
-
-
- Button Label
- Button with Icon
- Icon Only Button 1
- Icon Only Button 2
-
-
-
-
-
-
Toggle disabled
-
Toggle widget
-
-
-
-
-
-
diff --git a/themes/base/jquery.ui.accordion.css b/themes/base/jquery.ui.accordion.css
index 23446e1f64e..80a80c82c06 100644
--- a/themes/base/jquery.ui.accordion.css
+++ b/themes/base/jquery.ui.accordion.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Accordion @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.all.css b/themes/base/jquery.ui.all.css
index 0302dfb961e..96b15aa515b 100644
--- a/themes/base/jquery.ui.all.css
+++ b/themes/base/jquery.ui.all.css
@@ -1,7 +1,7 @@
/*
* jQuery UI CSS Framework @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.autocomplete.css b/themes/base/jquery.ui.autocomplete.css
index aab7e8d636c..0d30d77a561 100644
--- a/themes/base/jquery.ui.autocomplete.css
+++ b/themes/base/jquery.ui.autocomplete.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Autocomplete @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -11,3 +11,43 @@
/* workarounds */
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+}
diff --git a/themes/base/jquery.ui.base.css b/themes/base/jquery.ui.base.css
index 733cb755e5a..21703833e06 100644
--- a/themes/base/jquery.ui.base.css
+++ b/themes/base/jquery.ui.base.css
@@ -1,7 +1,7 @@
/*
* jQuery UI CSS Framework @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -14,11 +14,8 @@
@import url("jquery.ui.button.css");
@import url("jquery.ui.datepicker.css");
@import url("jquery.ui.dialog.css");
-@import url("jquery.ui.menu.css");
@import url("jquery.ui.progressbar.css");
@import url("jquery.ui.resizable.css");
@import url("jquery.ui.selectable.css");
@import url("jquery.ui.slider.css");
-@import url("jquery.ui.spinner.css");
@import url("jquery.ui.tabs.css");
-@import url("jquery.ui.tooltip.css");
diff --git a/themes/base/jquery.ui.button.css b/themes/base/jquery.ui.button.css
index 00c2b3b1598..0d11065f4de 100644
--- a/themes/base/jquery.ui.button.css
+++ b/themes/base/jquery.ui.button.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Button @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.core.css b/themes/base/jquery.ui.core.css
index 5cb485cd1c5..59e14d572b3 100644
--- a/themes/base/jquery.ui.core.css
+++ b/themes/base/jquery.ui.core.css
@@ -1,7 +1,7 @@
/*
* jQuery UI CSS Framework @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.datepicker.css b/themes/base/jquery.ui.datepicker.css
index f9098e3a7f3..f457800f4b0 100644
--- a/themes/base/jquery.ui.datepicker.css
+++ b/themes/base/jquery.ui.datepicker.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Datepicker @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.dialog.css b/themes/base/jquery.ui.dialog.css
index 0354644473f..12609ed1923 100644
--- a/themes/base/jquery.ui.dialog.css
+++ b/themes/base/jquery.ui.dialog.css
@@ -1,15 +1,15 @@
/*
* jQuery UI Dialog @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Dialog#theming
*/
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
-.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
diff --git a/themes/base/jquery.ui.menu.css b/themes/base/jquery.ui.menu.css
deleted file mode 100644
index 667518bffca..00000000000
--- a/themes/base/jquery.ui.menu.css
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * jQuery UI Menu @VERSION
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- */
-.ui-menu {
- list-style:none;
- padding: 2px;
- margin: 0;
- display:block;
-}
-.ui-menu .ui-menu {
- margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
- margin:0;
- padding: 0;
- zoom: 1;
- width: 100%;
-}
-.ui-menu .ui-menu-item a {
- text-decoration:none;
- display:block;
- padding:.2em .4em;
- line-height:1.5;
- zoom:1;
-}
-.ui-menu .ui-menu-item a {
- font-weight: normal;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: -1px;
-}
diff --git a/themes/base/jquery.ui.progressbar.css b/themes/base/jquery.ui.progressbar.css
index 50fe84a6f4a..38364fafa22 100644
--- a/themes/base/jquery.ui.progressbar.css
+++ b/themes/base/jquery.ui.progressbar.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Progressbar @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.resizable.css b/themes/base/jquery.ui.resizable.css
index 3b86c7c3a33..eeb547b9f6f 100644
--- a/themes/base/jquery.ui.resizable.css
+++ b/themes/base/jquery.ui.resizable.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Resizable @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.selectable.css b/themes/base/jquery.ui.selectable.css
index de2f7f3b64f..5177f6b1f32 100644
--- a/themes/base/jquery.ui.selectable.css
+++ b/themes/base/jquery.ui.selectable.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Selectable @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.slider.css b/themes/base/jquery.ui.slider.css
index 0b1d31e94aa..8d9b403a90b 100644
--- a/themes/base/jquery.ui.slider.css
+++ b/themes/base/jquery.ui.slider.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Slider @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.spinner.css b/themes/base/jquery.ui.spinner.css
deleted file mode 100644
index cd195ee47ec..00000000000
--- a/themes/base/jquery.ui.spinner.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Spinner
-----------------------------------*/
-.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; }
-.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; }
-.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; z-index: 100; text-align: center; vertical-align: middle; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; }
-.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */
-.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */
-.ui-spinner-up { top: 0; }
-.ui-spinner-down { bottom: 0; }
-
-/* TR overrides */
-span.ui-spinner { background: none; }
-.ui-spinner .ui-icon-triangle-1-s {
- /* need to fix icons sprite */
- background-position:-65px -16px;
-}
diff --git a/themes/base/jquery.ui.tabs.css b/themes/base/jquery.ui.tabs.css
index 5b3b58e81e8..12666facd59 100644
--- a/themes/base/jquery.ui.tabs.css
+++ b/themes/base/jquery.ui.tabs.css
@@ -1,7 +1,7 @@
/*
* jQuery UI Tabs @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.theme.css b/themes/base/jquery.ui.theme.css
index 92205438451..7d4398465c8 100644
--- a/themes/base/jquery.ui.theme.css
+++ b/themes/base/jquery.ui.theme.css
@@ -1,7 +1,7 @@
/*
* jQuery UI CSS Framework @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/themes/base/jquery.ui.tooltip.css b/themes/base/jquery.ui.tooltip.css
deleted file mode 100644
index 145b079d2b8..00000000000
--- a/themes/base/jquery.ui.tooltip.css
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Tooltip
-----------------------------------*/
-.ui-tooltip {
- padding:8px;
- position:absolute;
- z-index:9999;
- -o-box-shadow: 0 0 5px #aaa;
- -moz-box-shadow: 0 0 5px #aaa;
- -webkit-box-shadow: 0 0 5px #aaa;
- box-shadow: 0 0 5px #aaa;
-}
-/* Fades and background-images don't work well together in IE6, drop the image */
-* html .ui-tooltip {
- background-image: none;
-}
-body .ui-tooltip { border-width:2px; }
diff --git a/ui/i18n/jquery.ui.datepicker-ar-DZ.js b/ui/i18n/jquery.ui.datepicker-ar-DZ.js
new file mode 100644
index 00000000000..e0e1685d845
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-ar-DZ.js
@@ -0,0 +1,23 @@
+/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
+/* Mohamed Cherif BOUCHELAGHEM -- cherifbouchelaghem@yahoo.fr */
+
+jQuery(function($){
+ $.datepicker.regional['ar-DZ'] = {
+ closeText: 'إغلاق',
+ prevText: '<السابق',
+ nextText: 'التالي>',
+ currentText: 'اليوم',
+ monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
+ 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ weekHeader: 'أسبوع',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
+});
diff --git a/ui/i18n/jquery.ui.datepicker-en-AU.js b/ui/i18n/jquery.ui.datepicker-en-AU.js
new file mode 100644
index 00000000000..c1a1020a140
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-en-AU.js
@@ -0,0 +1,23 @@
+/* English/Australia initialisation for the jQuery UI date picker plugin. */
+/* Based on the en-GB initialisation. */
+jQuery(function($){
+ $.datepicker.regional['en-AU'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-AU']);
+});
diff --git a/ui/i18n/jquery.ui.datepicker-en-NZ.js b/ui/i18n/jquery.ui.datepicker-en-NZ.js
new file mode 100644
index 00000000000..7819df05286
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-en-NZ.js
@@ -0,0 +1,23 @@
+/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
+/* Based on the en-GB initialisation. */
+jQuery(function($){
+ $.datepicker.regional['en-NZ'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-NZ']);
+});
diff --git a/ui/i18n/jquery.ui.datepicker-hu.js b/ui/i18n/jquery.ui.datepicker-hu.js
index 249e7b0ef4f..46e63f59b2a 100644
--- a/ui/i18n/jquery.ui.datepicker-hu.js
+++ b/ui/i18n/jquery.ui.datepicker-hu.js
@@ -17,7 +17,7 @@ jQuery(function($){
dateFormat: 'yy-mm-dd',
firstDay: 1,
isRTL: false,
- showMonthAfterYear: false,
+ showMonthAfterYear: true,
yearSuffix: ''};
$.datepicker.setDefaults($.datepicker.regional['hu']);
});
diff --git a/ui/i18n/jquery.ui.datepicker-ml.js b/ui/i18n/jquery.ui.datepicker-ml.js
new file mode 100644
index 00000000000..753dba411d1
--- /dev/null
+++ b/ui/i18n/jquery.ui.datepicker-ml.js
@@ -0,0 +1,23 @@
+/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Saji Nediyanchath (saji89@gmail.com). */
+jQuery(function($){
+ $.datepicker.regional['ml'] = {
+ closeText: 'ശരി',
+ prevText: 'മുന്നത്തെ',
+ nextText: 'അടുത്തത് ',
+ currentText: 'ഇന്ന്',
+ monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
+ 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
+ monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
+ 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
+ dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
+ dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
+ dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
+ weekHeader: 'ആ',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ml']);
+});
diff --git a/ui/i18n/jquery.ui.datepicker-no.js b/ui/i18n/jquery.ui.datepicker-no.js
index 6b3a498be55..2507043a3f2 100644
--- a/ui/i18n/jquery.ui.datepicker-no.js
+++ b/ui/i18n/jquery.ui.datepicker-no.js
@@ -1,23 +1,23 @@
/* Norwegian initialisation for the jQuery UI date picker plugin. */
/* Written by Naimdjon Takhirov (naimdjon@gmail.com). */
+
jQuery(function($){
- $.datepicker.regional['no'] = {
- closeText: 'Lukk',
- prevText: '«Forrige',
- nextText: 'Neste»',
- currentText: 'I dag',
- monthNames: ['Januar','Februar','Mars','April','Mai','Juni',
- 'Juli','August','September','Oktober','November','Desember'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun',
- 'Jul','Aug','Sep','Okt','Nov','Des'],
- dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
- dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
- dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
- weekHeader: 'Uke',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['no']);
+ $.datepicker.regional['no'] = {
+ closeText: 'Lukk',
+ prevText: '«Forrige',
+ nextText: 'Neste»',
+ currentText: 'I dag',
+ monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
+ monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
+ dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
+ dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
+ dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
+ weekHeader: 'Uke',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''
+ };
+ $.datepicker.setDefaults($.datepicker.regional['no']);
});
diff --git a/ui/i18n/jquery.ui.datepicker-ru.js b/ui/i18n/jquery.ui.datepicker-ru.js
index 50a4613523c..b8091f9eccd 100644
--- a/ui/i18n/jquery.ui.datepicker-ru.js
+++ b/ui/i18n/jquery.ui.datepicker-ru.js
@@ -13,7 +13,7 @@ jQuery(function($){
dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
- weekHeader: 'Нед',
+ weekHeader: 'Не',
dateFormat: 'dd.mm.yy',
firstDay: 1,
isRTL: false,
diff --git a/ui/jquery.effects.blind.js b/ui/jquery.effects.blind.js
index 44f398a556f..f1b823533f5 100644
--- a/ui/jquery.effects.blind.js
+++ b/ui/jquery.effects.blind.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Blind @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.bounce.js b/ui/jquery.effects.bounce.js
index ec4a77ec418..055b4759679 100644
--- a/ui/jquery.effects.bounce.js
+++ b/ui/jquery.effects.bounce.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Bounce @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.clip.js b/ui/jquery.effects.clip.js
index 9fa8df94ae7..c0fe450c98f 100644
--- a/ui/jquery.effects.clip.js
+++ b/ui/jquery.effects.clip.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Clip @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js
index bb88dcf19f6..ae9a328ea1f 100644
--- a/ui/jquery.effects.core.js
+++ b/ui/jquery.effects.core.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -19,7 +19,7 @@ $.effects = {};
// override the animation for color styles
$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
- 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
+ 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'],
function(i, attr) {
$.fx.step[attr] = function(fx) {
if (!fx.colorInit) {
@@ -462,29 +462,15 @@ function standardSpeed( speed ) {
$.fn.extend({
effect: function(effect, options, speed, callback) {
var args = _normalizeArguments.apply(this, arguments),
- // TODO: make effects take actual parameters instead of a hash
+ // TODO: make effects takes actual parameters instead of a hash
args2 = {
options: args[1],
duration: args[2],
callback: args[3]
},
- mode = args2.options.mode,
effectMethod = $.effects[effect];
- if ( $.fx.off || !effectMethod ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args2.duration, args2.callback );
- } else {
- return this.each(function() {
- if ( args2.callback ) {
- args2.callback.call( this );
- }
- });
- }
- }
-
- return effectMethod.call(this, args2);
+ return effectMethod && !$.fx.off ? effectMethod.call(this, args2) : this;
},
_show: $.fn.show,
diff --git a/ui/jquery.effects.drop.js b/ui/jquery.effects.drop.js
index 941508b2ecc..f13dda856c9 100644
--- a/ui/jquery.effects.drop.js
+++ b/ui/jquery.effects.drop.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Drop @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.explode.js b/ui/jquery.effects.explode.js
index 05d9bcd3945..80e12770fb2 100644
--- a/ui/jquery.effects.explode.js
+++ b/ui/jquery.effects.explode.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Explode @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.fade.js b/ui/jquery.effects.fade.js
index 40483ee0c6a..9fa8a79c412 100644
--- a/ui/jquery.effects.fade.js
+++ b/ui/jquery.effects.fade.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Fade @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.fold.js b/ui/jquery.effects.fold.js
index f19ae1bf2ff..fa98ee2dd45 100644
--- a/ui/jquery.effects.fold.js
+++ b/ui/jquery.effects.fold.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Fold @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.highlight.js b/ui/jquery.effects.highlight.js
index bd6d21b2528..9a3edc5bcfe 100644
--- a/ui/jquery.effects.highlight.js
+++ b/ui/jquery.effects.highlight.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Highlight @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js
index 4d325c4e112..8eb9990176c 100644
--- a/ui/jquery.effects.pulsate.js
+++ b/ui/jquery.effects.pulsate.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Pulsate @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.scale.js b/ui/jquery.effects.scale.js
index d980882db5b..281021380fb 100644
--- a/ui/jquery.effects.scale.js
+++ b/ui/jquery.effects.scale.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Scale @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.shake.js b/ui/jquery.effects.shake.js
index b94e5a5abf2..14c94180936 100644
--- a/ui/jquery.effects.shake.js
+++ b/ui/jquery.effects.shake.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Shake @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js
index 59f6dc578e6..35a584fd98e 100644
--- a/ui/jquery.effects.slide.js
+++ b/ui/jquery.effects.slide.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Slide @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.effects.transfer.js b/ui/jquery.effects.transfer.js
index 2741e9d4b4c..4b4c4105076 100644
--- a/ui/jquery.effects.transfer.js
+++ b/ui/jquery.effects.transfer.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Effects Transfer @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 955030ccca0..894174caa5a 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Accordion @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -17,11 +17,12 @@ $.widget( "ui.accordion", {
options: {
active: 0,
animated: "slide",
+ autoHeight: true,
+ clearStyle: false,
collapsible: false,
event: "click",
+ fillSpace: false,
header: "> li > :first-child,> :not(li):even",
- // TODO: set to "auto" in 2.0 (#5868, #5872)
- heightStyle: null, // "auto"
icons: {
header: "ui-icon-triangle-1-e",
headerSelected: "ui-icon-triangle-1-s"
@@ -164,7 +165,7 @@ $.widget( "ui.accordion", {
.css( "display", "" )
.removeAttr( "role" )
.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled" );
- if ( options.heightStyle !== "content" ) {
+ if ( options.autoHeight || options.fillHeight ) {
contents.css( "height", "" );
}
@@ -173,7 +174,7 @@ $.widget( "ui.accordion", {
_setOption: function( key, value ) {
$.Widget.prototype._setOption.apply( this, arguments );
-
+
if ( key == "active" ) {
this.activate( value );
}
@@ -187,7 +188,8 @@ $.widget( "ui.accordion", {
// so we need to add the disabled class to the headers and panels
if ( key == "disabled" ) {
this.headers.add(this.headers.next())
- .toggleClass( "ui-accordion-disabled ui-state-disabled", !!value );
+ [ value ? "addClass" : "removeClass" ](
+ "ui-accordion-disabled ui-state-disabled" );
}
},
@@ -230,21 +232,12 @@ $.widget( "ui.accordion", {
var options = this.options,
maxHeight;
- if ( options.heightStyle === "fill" ) {
+ if ( options.fillSpace ) {
if ( $.browser.msie ) {
var defOverflow = this.element.parent().css( "overflow" );
this.element.parent().css( "overflow", "hidden");
}
maxHeight = this.element.parent().height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
if ($.browser.msie) {
this.element.parent().css( "overflow", defOverflow );
}
@@ -259,7 +252,7 @@ $.widget( "ui.accordion", {
$( this ).innerHeight() + $( this ).height() ) );
})
.css( "overflow", "auto" );
- } else if ( options.heightStyle === "auto" ) {
+ } else if ( options.autoHeight ) {
maxHeight = 0;
this.headers.next()
.each(function() {
@@ -338,8 +331,26 @@ $.widget( "ui.accordion", {
return;
}
+ // find elements to show and hide
+ var active = this.active,
+ toShow = clicked.next(),
+ toHide = this.active.next(),
+ data = {
+ options: options,
+ newHeader: clickedIsActive && options.collapsible ? $([]) : clicked,
+ oldHeader: this.active,
+ newContent: clickedIsActive && options.collapsible ? $([]) : toShow,
+ oldContent: toHide
+ },
+ down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
+
+ // when the call to ._toggle() comes after the class changes
+ // it causes a very odd bug in IE 8 (see #6720)
+ this.active = clickedIsActive ? $([]) : clicked;
+ this._toggle( toShow, toHide, data, clickedIsActive, down );
+
// switch classes
- this.active
+ active
.removeClass( "ui-state-active ui-corner-top" )
.addClass( "ui-state-default ui-corner-all" )
.children( ".ui-icon" )
@@ -357,21 +368,6 @@ $.widget( "ui.accordion", {
.addClass( "ui-accordion-content-active" );
}
- // find elements to show and hide
- var toShow = clicked.next(),
- toHide = this.active.next(),
- data = {
- options: options,
- newHeader: clickedIsActive && options.collapsible ? $([]) : clicked,
- oldHeader: this.active,
- newContent: clickedIsActive && options.collapsible ? $([]) : toShow,
- oldContent: toHide
- },
- down = this.headers.index( this.active[0] ) > this.headers.index( clicked[0] );
-
- this.active = clickedIsActive ? $([]) : clicked;
- this._toggle( toShow, toHide, data, clickedIsActive, down );
-
return;
},
@@ -405,7 +401,7 @@ $.widget( "ui.accordion", {
toHide: toHide,
complete: complete,
down: down,
- autoHeight: options.heightStyle !== "content"
+ autoHeight: options.autoHeight || options.fillSpace
};
} else {
animOptions = {
@@ -413,7 +409,7 @@ $.widget( "ui.accordion", {
toHide: toHide,
complete: complete,
down: down,
- autoHeight: options.heightStyle !== "content"
+ autoHeight: options.autoHeight || options.fillSpace
};
}
@@ -482,7 +478,7 @@ $.widget( "ui.accordion", {
return;
}
- if ( this.options.heightStyle === "content" ) {
+ if ( this.options.clearStyle ) {
this.toShow.add( this.toHide ).css({
height: "",
overflow: ""
@@ -491,6 +487,10 @@ $.widget( "ui.accordion", {
// other classes are removed before the animation; this one needs to stay until completed
this.toHide.removeClass( "ui-accordion-content-active" );
+ // Work around for rendering bug in IE (#5421)
+ if ( this.toHide.length ) {
+ this.toHide.parent()[0].className = this.toHide.parent()[0].className;
+ }
this._trigger( "change", null, this.data );
}
@@ -599,7 +599,7 @@ $.extend( $.ui.accordion, {
return this.href.toLowerCase() === location.href.toLowerCase();
}
});
-
+
var _create = prototype._create;
prototype._create = function() {
if ( this.options.navigation ) {
@@ -621,48 +621,6 @@ $.extend( $.ui.accordion, {
}
_create.call( this );
};
-}( jQuery, jQuery.ui.accordion.prototype ) );
-
-(function( $, prototype ) {
- $.extend( prototype.options, {
- autoHeight: true, // use heightStyle: "auto"
- clearStyle: false, // use heightStyle: "content"
- fillSpace: false // use heightStyle: "fill"
- });
-
- var _create = prototype._create,
- _setOption = prototype._setOption;
-
- $.extend( prototype, {
- _create: function() {
- this.options.heightStyle = this.options.heightStyle ||
- this._mergeHeightStyle();
- _create.call( this );
- },
-
- _setOption: function( key, value ) {
- if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) {
- this.options.heightStyle = this._mergeHeightStyle();
- }
- _setOption.apply( this, arguments );
- },
-
- _mergeHeightStyle: function() {
- var options = this.options;
-
- if ( options.fillSpace ) {
- return "fill";
- }
-
- if ( options.clearStyle ) {
- return "content";
- }
-
- if ( options.autoHeight ) {
- return "auto";
- }
- }
- });
-}( jQuery, jQuery.ui.accordion.prototype ) );
+}( jQuery, jQuery.ui.accordion.prototype ));
})( jQuery );
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index f48dc032afd..98950a0d4a9 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Autocomplete @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -11,10 +11,12 @@
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.position.js
- * jquery.ui.menu.js
*/
(function( $, undefined ) {
+// used to prevent race conditions with remote data sources
+var requestIndex = 0;
+
$.widget( "ui.autocomplete", {
options: {
appendTo: "body",
@@ -32,9 +34,7 @@ $.widget( "ui.autocomplete", {
_create: function() {
var self = this,
- doc = this.element[ 0 ].ownerDocument,
- suppressKeyPress;
-
+ doc = this.element[ 0 ].ownerDocument;
this.element
.addClass( "ui-autocomplete-input" )
.attr( "autocomplete", "off" )
@@ -45,11 +45,10 @@ $.widget( "ui.autocomplete", {
"aria-haspopup": "true"
})
.bind( "keydown.autocomplete", function( event ) {
- if ( self.options.disabled || self.element.attr( "readonly" ) ) {
+ if ( self.options.disabled ) {
return;
}
- suppressKeyPress = false;
var keyCode = $.ui.keyCode;
switch( event.keyCode ) {
case keyCode.PAGE_UP:
@@ -72,9 +71,6 @@ $.widget( "ui.autocomplete", {
case keyCode.NUMPAD_ENTER:
// when menu is open and has focus
if ( self.menu.active ) {
- // #6055 - Opera still allows the keypress to occur
- // which causes forms to submit
- suppressKeyPress = true;
event.preventDefault();
}
//passthrough - ENTER and TAB both select the current element
@@ -101,12 +97,6 @@ $.widget( "ui.autocomplete", {
break;
}
})
- .bind( "keypress.autocomplete", function( event ) {
- if ( suppressKeyPress ) {
- suppressKeyPress = false;
- event.preventDefault();
- }
- })
.bind( "focus.autocomplete", function() {
if ( self.options.disabled ) {
return;
@@ -159,18 +149,16 @@ $.widget( "ui.autocomplete", {
}, 13);
})
.menu({
- // custom key handling for now
- input: $(),
focus: function( event, ui ) {
var item = ui.item.data( "item.autocomplete" );
- if ( false !== self._trigger( "focus", event, { item: item } ) ) {
+ if ( false !== self._trigger( "focus", null, { item: item } ) ) {
// use value to match what will end up in the input, if it was a key event
if ( /^key/.test(event.originalEvent.type) ) {
self.element.val( item.value );
}
}
},
- select: function( event, ui ) {
+ selected: function( event, ui ) {
var item = ui.item.data( "item.autocomplete" ),
previous = self.previous;
@@ -257,17 +245,16 @@ $.widget( "ui.autocomplete", {
url: url,
data: request,
dataType: "json",
- success: function( data, status, xhr ) {
- if ( xhr === self.xhr ) {
+ autocompleteRequest: ++requestIndex,
+ success: function( data, status ) {
+ if ( this.autocompleteRequest === requestIndex ) {
response( data );
}
- self.xhr = null;
},
- error: function( xhr ) {
- if ( xhr === self.xhr ) {
+ error: function() {
+ if ( this.autocompleteRequest === requestIndex ) {
response( [] );
}
- self.xhr = null;
}
});
};
@@ -287,7 +274,7 @@ $.widget( "ui.autocomplete", {
}
clearTimeout( this.closing );
- if ( this._trigger( "search", event ) === false ) {
+ if ( this._trigger("search") === false ) {
return;
}
@@ -420,3 +407,187 @@ $.extend( $.ui.autocomplete, {
});
}( jQuery ));
+
+/*
+ * jQuery UI Menu (not officially released)
+ *
+ * This widget isn't yet finished and the API is subject to change. We plan to finish
+ * it for the next release. You're welcome to give it a try anyway and give us feedback,
+ * as long as you're okay with migrating your code later on. We can help with that, too.
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu
+ *
+ * Depends:
+ * jquery.ui.core.js
+ * jquery.ui.widget.js
+ */
+(function($) {
+
+$.widget("ui.menu", {
+ _create: function() {
+ var self = this;
+ this.element
+ .addClass("ui-menu ui-widget ui-widget-content ui-corner-all")
+ .attr({
+ role: "listbox",
+ "aria-activedescendant": "ui-active-menuitem"
+ })
+ .click(function( event ) {
+ if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) {
+ return;
+ }
+ // temporary
+ event.preventDefault();
+ self.select( event );
+ });
+ this.refresh();
+ },
+
+ refresh: function() {
+ var self = this;
+
+ // don't refresh list items that are already adapted
+ var items = this.element.children("li:not(.ui-menu-item):has(a)")
+ .addClass("ui-menu-item")
+ .attr("role", "menuitem");
+
+ items.children("a")
+ .addClass("ui-corner-all")
+ .attr("tabindex", -1)
+ // mouseenter doesn't work with event delegation
+ .mouseenter(function( event ) {
+ self.activate( event, $(this).parent() );
+ })
+ .mouseleave(function() {
+ self.deactivate();
+ });
+ },
+
+ activate: function( event, item ) {
+ this.deactivate();
+ if (this.hasScroll()) {
+ var offset = item.offset().top - this.element.offset().top,
+ scroll = this.element.attr("scrollTop"),
+ elementHeight = this.element.height();
+ if (offset < 0) {
+ this.element.attr("scrollTop", scroll + offset);
+ } else if (offset >= elementHeight) {
+ this.element.attr("scrollTop", scroll + offset - elementHeight + item.height());
+ }
+ }
+ this.active = item.eq(0)
+ .children("a")
+ .addClass("ui-state-hover")
+ .attr("id", "ui-active-menuitem")
+ .end();
+ this._trigger("focus", event, { item: item });
+ },
+
+ deactivate: function() {
+ if (!this.active) { return; }
+
+ this.active.children("a")
+ .removeClass("ui-state-hover")
+ .removeAttr("id");
+ this._trigger("blur");
+ this.active = null;
+ },
+
+ next: function(event) {
+ this.move("next", ".ui-menu-item:first", event);
+ },
+
+ previous: function(event) {
+ this.move("prev", ".ui-menu-item:last", event);
+ },
+
+ first: function() {
+ return this.active && !this.active.prevAll(".ui-menu-item").length;
+ },
+
+ last: function() {
+ return this.active && !this.active.nextAll(".ui-menu-item").length;
+ },
+
+ move: function(direction, edge, event) {
+ if (!this.active) {
+ this.activate(event, this.element.children(edge));
+ return;
+ }
+ var next = this.active[direction + "All"](".ui-menu-item").eq(0);
+ if (next.length) {
+ this.activate(event, next);
+ } else {
+ this.activate(event, this.element.children(edge));
+ }
+ },
+
+ // TODO merge with previousPage
+ nextPage: function(event) {
+ if (this.hasScroll()) {
+ // TODO merge with no-scroll-else
+ if (!this.active || this.last()) {
+ this.activate(event, this.element.children(".ui-menu-item:first"));
+ return;
+ }
+ var base = this.active.offset().top,
+ height = this.element.height(),
+ result = this.element.children(".ui-menu-item").filter(function() {
+ var close = $(this).offset().top - base - height + $(this).height();
+ // TODO improve approximation
+ return close < 10 && close > -10;
+ });
+
+ // TODO try to catch this earlier when scrollTop indicates the last page anyway
+ if (!result.length) {
+ result = this.element.children(".ui-menu-item:last");
+ }
+ this.activate(event, result);
+ } else {
+ this.activate(event, this.element.children(".ui-menu-item")
+ .filter(!this.active || this.last() ? ":first" : ":last"));
+ }
+ },
+
+ // TODO merge with nextPage
+ previousPage: function(event) {
+ if (this.hasScroll()) {
+ // TODO merge with no-scroll-else
+ if (!this.active || this.first()) {
+ this.activate(event, this.element.children(".ui-menu-item:last"));
+ return;
+ }
+
+ var base = this.active.offset().top,
+ height = this.element.height();
+ result = this.element.children(".ui-menu-item").filter(function() {
+ var close = $(this).offset().top - base + height - $(this).height();
+ // TODO improve approximation
+ return close < 10 && close > -10;
+ });
+
+ // TODO try to catch this earlier when scrollTop indicates the last page anyway
+ if (!result.length) {
+ result = this.element.children(".ui-menu-item:first");
+ }
+ this.activate(event, result);
+ } else {
+ this.activate(event, this.element.children(".ui-menu-item")
+ .filter(!this.active || this.first() ? ":last" : ":first"));
+ }
+ },
+
+ hasScroll: function() {
+ return this.element.height() < this.element.attr("scrollHeight");
+ },
+
+ select: function( event ) {
+ this._trigger("selected", event, { item: this.active });
+ }
+});
+
+}(jQuery));
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js
index 78134e30866..27696e04bb9 100644
--- a/ui/jquery.ui.button.js
+++ b/ui/jquery.ui.button.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Button @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -290,27 +290,32 @@ $.widget( "ui.button", {
.appendTo( buttonElement.empty() )
.text(),
icons = this.options.icons,
- multipleIcons = icons.primary && icons.secondary;
+ multipleIcons = icons.primary && icons.secondary,
+ buttonClasses = [];
+
if ( icons.primary || icons.secondary ) {
- buttonElement.addClass( "ui-button-text-icon" +
- ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
+ buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
+
if ( icons.primary ) {
buttonElement.prepend( "
" );
}
+
if ( icons.secondary ) {
buttonElement.append( "
" );
}
+
if ( !this.options.text ) {
- buttonElement
- .addClass( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" )
- .removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" );
+ buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
+ buttonElement.removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" );
+
if ( !this.hasTitle ) {
buttonElement.attr( "title", buttonText );
}
}
} else {
- buttonElement.addClass( "ui-button-text-only" );
+ buttonClasses.push( "ui-button-text-only" );
}
+ buttonElement.addClass( buttonClasses.join( " " ) );
}
});
@@ -321,6 +326,7 @@ $.widget( "ui.buttonset", {
_create: function() {
this.element.addClass( "ui-buttonset" );
+ this._init();
},
_init: function() {
diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js
index d41654b2957..a13bdc60156 100644
--- a/ui/jquery.ui.core.js
+++ b/ui/jquery.ui.core.js
@@ -1,7 +1,7 @@
/*!
* jQuery UI @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -105,8 +105,8 @@ $.fn.extend({
// other browsers return a string
// we ignore the case of nested elements with an explicit value of 0
//
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
+ value = parseInt( elem.css( "zIndex" ) );
+ if ( !isNaN( value ) && value != 0 ) {
return value;
}
}
@@ -116,9 +116,9 @@ $.fn.extend({
return 0;
},
-
+
disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+ return this.bind( $.support.selectstart ? "selectstart" : "mousedown" +
".ui-disableSelection", function( event ) {
event.preventDefault();
});
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index abcb3706719..0bd51365106 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Datepicker @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -167,7 +167,7 @@ $.extend(Datepicker.prototype, {
/* Create a new instance object. */
_newInst: function(target, inline) {
- var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
+ var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\$1'); // escape jQuery meta chars
return {id: id, input: target, // associated target
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
drawMonth: 0, drawYear: 0, // month being drawn
@@ -700,7 +700,9 @@ $.extend(Datepicker.prototype, {
inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
'Class']('ui-datepicker-rtl');
if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
- inst.input.is(':visible') && !inst.input.is(':disabled'))
+ // #6694 - don't focus the input if it's already focused
+ // this breaks the change event in IE
+ inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
inst.input.focus();
// deffered render of the years select (to avoid flashes on Firefox)
if( inst.yearshtml ){
@@ -752,7 +754,7 @@ $.extend(Datepicker.prototype, {
_findPos: function(obj) {
var inst = this._getInst(obj);
var isRTL = this._get(inst, 'isRTL');
- while (obj && (obj.type == 'hidden' || obj.nodeType != 1)) {
+ while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
}
var position = $(obj).offset();
@@ -966,6 +968,8 @@ $.extend(Datepicker.prototype, {
if (value == '')
return null;
var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
+ shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
+ new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
@@ -1652,7 +1656,7 @@ $.extend(Datepicker.prototype, {
/* Find the number of days in a given month. */
_getDaysInMonth: function(year, month) {
- return 32 - new Date(year, month, 32).getDate();
+ return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
},
/* Find the day of the week of the first of a month. */
@@ -1722,7 +1726,12 @@ function isArray(a) {
Object - settings for attaching new datepicker functionality
@return jQuery object */
$.fn.datepicker = function(options){
-
+
+ /* Verify an empty collection wasn't passed - Fixes #6976 */
+ if ( !this.length ) {
+ return this;
+ }
+
/* Initialise the date picker. */
if (!$.datepicker.initialized) {
$(document).mousedown($.datepicker._checkExternalClick).
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index 501772eb57b..c403354b2bd 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Dialog @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -18,7 +18,11 @@
*/
(function( $, undefined ) {
-var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
+var uiDialogClasses =
+ 'ui-dialog ' +
+ 'ui-widget ' +
+ 'ui-widget-content ' +
+ 'ui-corner-all ',
sizeRelatedOptions = {
buttons: true,
height: true,
@@ -40,39 +44,39 @@ $.widget("ui.dialog", {
autoOpen: true,
buttons: {},
closeOnEscape: true,
- closeText: "close",
- dialogClass: "",
+ closeText: 'close',
+ dialogClass: '',
draggable: true,
hide: null,
- height: "auto",
+ height: 'auto',
maxHeight: false,
maxWidth: false,
minHeight: 150,
minWidth: 150,
modal: false,
position: {
- my: "center",
- at: "center",
+ my: 'center',
+ at: 'center',
of: window,
- collision: "fit",
+ collision: 'fit',
// ensure that the titlebar is never outside the document
- using: function( pos ) {
- var topOffset = $( this ).css( pos ).offset().top;
- if ( topOffset < 0 ) {
- $( this ).css( "top", pos.top - topOffset );
+ using: function(pos) {
+ var topOffset = $(this).css(pos).offset().top;
+ if (topOffset < 0) {
+ $(this).css('top', pos.top - topOffset);
}
}
},
resizable: true,
show: null,
stack: true,
- title: "",
+ title: '',
width: 300,
zIndex: 1000
},
_create: function() {
- this.originalTitle = this.element.attr( "title" );
+ this.originalTitle = this.element.attr('title');
// #5742 - .attr() might return a DOMElement
if ( typeof this.originalTitle !== "string" ) {
this.originalTitle = "";
@@ -82,93 +86,104 @@ $.widget("ui.dialog", {
var self = this,
options = self.options,
- title = options.title || " ",
- titleId = $.ui.dialog.getTitleId( self.element ),
+ title = options.title || ' ',
+ titleId = $.ui.dialog.getTitleId(self.element),
- uiDialog = ( self.uiDialog = $( "
" ) )
- .appendTo( document.body )
+ uiDialog = (self.uiDialog = $('
'))
+ .appendTo("body")
.hide()
- .addClass( uiDialogClasses + options.dialogClass )
+ .addClass(uiDialogClasses + options.dialogClass)
.css({
zIndex: options.zIndex
})
// setting tabIndex makes the div focusable
- .attr( "tabIndex", -1)
- // TODO: move to stylesheet
- .css( "outline", 0 )
- .keydown(function( event ) {
- if ( options.closeOnEscape && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
- self.close( event );
+ // setting outline to 0 prevents a border on focus in Mozilla
+ .attr('tabIndex', -1).css('outline', 0).keydown(function(event) {
+ if (options.closeOnEscape && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE) {
+
+ self.close(event);
event.preventDefault();
}
})
.attr({
- role: "dialog",
- "aria-labelledby": titleId
+ role: 'dialog',
+ 'aria-labelledby': titleId
})
- .mousedown(function( event ) {
- self.moveToTop( false, event );
+ .mousedown(function(event) {
+ self.moveToTop(false, event);
}),
uiDialogContent = self.element
.show()
- .removeAttr( "title" )
- .addClass( "ui-dialog-content ui-widget-content" )
- .appendTo( uiDialog ),
-
- uiDialogTitlebar = ( self.uiDialogTitlebar = $( "
" ) )
- .addClass( "ui-dialog-titlebar ui-widget-header " +
- "ui-corner-all ui-helper-clearfix" )
- .prependTo( uiDialog ),
-
- uiDialogTitlebarClose = $( "
" )
- .addClass( "ui-dialog-titlebar-close ui-corner-all" )
- .attr( "role", "button" )
+ .removeAttr('title')
+ .addClass(
+ 'ui-dialog-content ' +
+ 'ui-widget-content')
+ .appendTo(uiDialog),
+
+ uiDialogTitlebar = (self.uiDialogTitlebar = $('
'))
+ .addClass(
+ 'ui-dialog-titlebar ' +
+ 'ui-widget-header ' +
+ 'ui-corner-all ' +
+ 'ui-helper-clearfix'
+ )
+ .prependTo(uiDialog),
+
+ uiDialogTitlebarClose = $(' ')
+ .addClass(
+ 'ui-dialog-titlebar-close ' +
+ 'ui-corner-all'
+ )
+ .attr('role', 'button')
.hover(
function() {
- uiDialogTitlebarClose.addClass( "ui-state-hover" );
+ uiDialogTitlebarClose.addClass('ui-state-hover');
},
function() {
- uiDialogTitlebarClose.removeClass( "ui-state-hover" );
+ uiDialogTitlebarClose.removeClass('ui-state-hover');
}
)
.focus(function() {
- uiDialogTitlebarClose.addClass( "ui-state-focus" );
+ uiDialogTitlebarClose.addClass('ui-state-focus');
})
.blur(function() {
- uiDialogTitlebarClose.removeClass( "ui-state-focus" );
+ uiDialogTitlebarClose.removeClass('ui-state-focus');
})
- .click(function( event ) {
- event.preventDefault();
- self.close( event );
+ .click(function(event) {
+ self.close(event);
+ return false;
})
- .appendTo( uiDialogTitlebar ),
+ .appendTo(uiDialogTitlebar),
- uiDialogTitlebarCloseText = ( self.uiDialogTitlebarCloseText = $( "
" ) )
- .addClass( "ui-icon ui-icon-closethick" )
- .text( options.closeText )
- .appendTo( uiDialogTitlebarClose ),
+ uiDialogTitlebarCloseText = (self.uiDialogTitlebarCloseText = $(' '))
+ .addClass(
+ 'ui-icon ' +
+ 'ui-icon-closethick'
+ )
+ .text(options.closeText)
+ .appendTo(uiDialogTitlebarClose),
- uiDialogTitle = $( "" )
- .addClass( "ui-dialog-title" )
- .attr( "id", titleId )
- .html( title )
- .prependTo( uiDialogTitlebar );
+ uiDialogTitle = $(' ')
+ .addClass('ui-dialog-title')
+ .attr('id', titleId)
+ .html(title)
+ .prependTo(uiDialogTitlebar);
- uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
+ uiDialogTitlebar.find("*").add(uiDialogTitlebar).disableSelection();
- if ( options.draggable && $.fn.draggable ) {
+ if (options.draggable && $.fn.draggable) {
self._makeDraggable();
}
- if ( options.resizable && $.fn.resizable ) {
+ if (options.resizable && $.fn.resizable) {
self._makeResizable();
}
- self._createButtons( options.buttons );
+ self._createButtons(options.buttons);
self._isOpen = false;
- if ( $.fn.bgiframe ) {
+ if ($.fn.bgiframe) {
uiDialog.bgiframe();
}
},
@@ -182,21 +197,21 @@ $.widget("ui.dialog", {
destroy: function() {
var self = this;
- if ( self.overlay ) {
+ if (self.overlay) {
self.overlay.destroy();
}
self.uiDialog.hide();
self.element
- .removeClass( "ui-dialog-content ui-widget-content" )
- .hide()
- .appendTo( "body" );
+ .unbind('.dialog')
+ .removeData('dialog')
+ .removeClass('ui-dialog-content ui-widget-content')
+ .hide().appendTo(document.forms[0]);
self.uiDialog.remove();
- if ( self.originalTitle ) {
- self.element.attr( "title", self.originalTitle );
+ if (self.originalTitle) {
+ self.element.attr('title', self.originalTitle);
}
- $.Widget.prototype.destroy.call( this );
return self;
},
@@ -204,45 +219,49 @@ $.widget("ui.dialog", {
return this.uiDialog;
},
- close: function( event ) {
+ close: function(event) {
var self = this,
maxZ, thisZ;
- if ( false === self._trigger( "beforeClose", event ) ) {
+ if (false === self._trigger('beforeClose', event)) {
return;
}
- if ( self.overlay ) {
+ if (self.overlay) {
self.overlay.destroy();
}
- self.uiDialog.unbind( "keypress.ui-dialog" );
+ self.uiDialog.unbind('keypress.ui-dialog');
self._isOpen = false;
- if ( self.options.hide ) {
- self.uiDialog.hide( self.options.hide, function() {
- self._trigger( "close", event );
+ if (self.options.hide) {
+ self.uiDialog.hide(self.options.hide, function() {
+ self._trigger('close', event);
});
} else {
self.uiDialog.hide();
- self._trigger( "close", event );
+ self._trigger('close', event);
}
$.ui.dialog.overlay.resize();
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
- if ( self.options.modal ) {
+ if (self.options.modal) {
maxZ = 0;
- $( ".ui-dialog" ).each(function() {
- if ( this !== self.uiDialog[0] ) {
- thisZ = $( this ).css( "z-index" );
- if ( !isNaN( thisZ ) ) {
- maxZ = Math.max( maxZ, thisZ );
+ $('.ui-dialog').each(function() {
+ if (this !== self.uiDialog[0]) {
+ thisZ = $(this).css('z-index');
+ if(!isNaN(thisZ)) {
+ maxZ = Math.max(maxZ, thisZ);
}
}
});
$.ui.dialog.maxZ = maxZ;
}
+
+ if ( $(".ui-dialog:visible").not(self.uiDialog).length === 0) {
+ $(document.body).css("overflow","auto");
+ }
return self;
},
@@ -253,71 +272,69 @@ $.widget("ui.dialog", {
// the force parameter allows us to move modal dialogs to their correct
// position on open
- moveToTop: function( force, event ) {
+ moveToTop: function(force, event) {
var self = this,
options = self.options,
saveScroll;
- if ( ( options.modal && !force ) ||
- ( !options.stack && !options.modal ) ) {
- return self._trigger( "focus", event );
+ if ((options.modal && !force) ||
+ (!options.stack && !options.modal)) {
+ return self._trigger('focus', event);
}
- if ( options.zIndex > $.ui.dialog.maxZ ) {
+ if (options.zIndex > $.ui.dialog.maxZ) {
$.ui.dialog.maxZ = options.zIndex;
}
- if ( self.overlay ) {
+ if (self.overlay) {
$.ui.dialog.maxZ += 1;
- $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
- self.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ );
+ self.overlay.$el.css('z-index', $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ);
}
- // Save and then restore scroll
- // Opera 9.5+ resets when parent z-index is changed.
- // http://bugs.jqueryui.com/ticket/3193
- saveScroll = {
- scrollTop: self.element.attr( "scrollTop" ),
- scrollLeft: self.element.attr( "scrollLeft" )
- };
+ //Save and then restore scroll since Opera 9.5+ resets when parent z-Index is changed.
+ // http://ui.jquery.com/bugs/ticket/3193
+ saveScroll = { scrollTop: self.element.attr('scrollTop'), scrollLeft: self.element.attr('scrollLeft') };
$.ui.dialog.maxZ += 1;
- self.uiDialog.css( "z-index", $.ui.dialog.maxZ );
- self.element.attr( saveScroll );
- self._trigger( "focus", event );
+ self.uiDialog.css('z-index', $.ui.dialog.maxZ);
+ self.element.attr(saveScroll);
+ self._trigger('focus', event);
return self;
},
open: function() {
- if ( this._isOpen ) {
- return;
- }
+ if (this._isOpen) { return; }
+
+ $(document.body).css("overflow","hidden");
var self = this,
options = self.options,
uiDialog = self.uiDialog;
- self.overlay = options.modal ? new $.ui.dialog.overlay( self ) : null;
+ self.overlay = options.modal ? new $.ui.dialog.overlay(self) : null;
+ if (uiDialog.next().length) {
+ uiDialog.appendTo(document.forms[0]);
+ }
self._size();
- self._position( options.position );
- uiDialog.show( options.show );
- self.moveToTop( true );
+ self._position(options.position);
+ uiDialog.show(options.show);
+ self.moveToTop(true);
// prevent tabbing out of modal dialogs
- if ( options.modal ) {
- uiDialog.bind( "keypress.ui-dialog", function( event ) {
- if ( event.keyCode !== $.ui.keyCode.TAB ) {
+ if (options.modal) {
+ uiDialog.bind('keypress.ui-dialog', function(event) {
+ if (event.keyCode !== $.ui.keyCode.TAB) {
return;
}
- var tabbables = $( ":tabbable", this ),
- first = tabbables.filter( ":first" ),
- last = tabbables.filter( ":last" );
+ var tabbables = $(':tabbable', this),
+ first = tabbables.filter(':first'),
+ last = tabbables.filter(':last');
- if ( event.target === last[0] && !event.shiftKey ) {
- first.focus( 1 );
+ if (event.target === last[0] && !event.shiftKey) {
+ first.focus(1);
return false;
- } else if ( event.target === first[0] && event.shiftKey ) {
- last.focus( 1 );
+ } else if (event.target === first[0] && event.shiftKey) {
+ last.focus(1);
return false;
}
});
@@ -325,60 +342,63 @@ $.widget("ui.dialog", {
// set focus to the first tabbable element in the content area or the first button
// if there are no tabbable elements, set focus on the dialog itself
- $( self.element.find( ":tabbable" ).get().concat(
- uiDialog.find( ".ui-dialog-buttonpane :tabbable" ).get().concat(
- uiDialog.get() ) ) ).eq( 0 ).focus();
+ $(self.element.find(':tabbable').get().concat(
+ uiDialog.find('.ui-dialog-buttonpane :tabbable').get().concat(
+ uiDialog.get()))).eq(0).focus();
self._isOpen = true;
- self._trigger( "open" );
+ self._trigger('open');
return self;
},
- _createButtons: function( buttons ) {
+ _createButtons: function(buttons) {
var self = this,
hasButtons = false,
- uiDialogButtonPane = $( "" )
- .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ),
- uiButtonSet = $( "
" )
+ uiDialogButtonPane = $('
')
+ .addClass(
+ 'ui-dialog-buttonpane ' +
+ 'ui-widget-content ' +
+ 'ui-helper-clearfix'
+ ),
+ uiButtonSet = $( "
" )
.addClass( "ui-dialog-buttonset" )
.appendTo( uiDialogButtonPane );
// if we already have a button pane, remove it
- self.uiDialog.find( ".ui-dialog-buttonpane" ).remove();
+ self.uiDialog.find('.ui-dialog-buttonpane').remove();
- if ( typeof buttons === "object" && buttons !== null ) {
- $.each( buttons, function() {
+ if (typeof buttons === 'object' && buttons !== null) {
+ $.each(buttons, function() {
return !(hasButtons = true);
});
}
- if ( hasButtons ) {
- $.each( buttons, function( name, props ) {
+ if (hasButtons) {
+ $.each(buttons, function(name, props) {
props = $.isFunction( props ) ?
{ click: props, text: name } :
props;
- var button = $( "
" )
- .attr( props, true )
- .unbind( "click" )
+ var button = $(' ', props)
+ .unbind('click')
.click(function() {
- props.click.apply( self.element[0], arguments );
+ props.click.apply(self.element[0], arguments);
})
- .appendTo( uiButtonSet );
- if ( $.fn.button ) {
+ .appendTo(uiButtonSet);
+ if ($.fn.button) {
button.button();
}
});
- uiDialogButtonPane.appendTo( self.uiDialog );
+ uiDialogButtonPane.appendTo(self.uiDialog);
}
},
_makeDraggable: function() {
var self = this,
options = self.options,
- doc = $( document ),
+ doc = $(document),
heightBeforeDrag;
- function filteredUi( ui ) {
+ function filteredUi(ui) {
return {
position: ui.position,
offset: ui.offset
@@ -386,45 +406,40 @@ $.widget("ui.dialog", {
}
self.uiDialog.draggable({
- cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
- handle: ".ui-dialog-titlebar",
- containment: "document",
- start: function( event, ui ) {
- heightBeforeDrag = options.height === "auto" ? "auto" : $( this ).height();
- $( this )
- .height( $( this ).height() )
- .addClass( "ui-dialog-dragging" );
- self._trigger( "dragStart", event, filteredUi( ui ) );
+ cancel: '.ui-dialog-content, .ui-dialog-titlebar-close',
+ handle: '.ui-dialog-titlebar',
+ containment: 'document',
+ start: function(event, ui) {
+ heightBeforeDrag = options.height === "auto" ? "auto" : $(this).height();
+ $(this).height($(this).height()).addClass("ui-dialog-dragging");
+ self._trigger('dragStart', event, filteredUi(ui));
},
- drag: function( event, ui ) {
- self._trigger( "drag", event, filteredUi( ui ) );
+ drag: function(event, ui) {
+ self._trigger('drag', event, filteredUi(ui));
},
- stop: function( event, ui ) {
- options.position = [
- ui.position.left - doc.scrollLeft(),
- ui.position.top - doc.scrollTop()
- ];
- $( this )
- .removeClass( "ui-dialog-dragging" )
- .height( heightBeforeDrag );
- self._trigger( "dragStop", event, filteredUi( ui ) );
+ stop: function(event, ui) {
+ options.position = [ui.position.left - doc.scrollLeft(),
+ ui.position.top - doc.scrollTop()];
+ $(this).removeClass("ui-dialog-dragging").height(heightBeforeDrag);
+ self._trigger('dragStop', event, filteredUi(ui));
$.ui.dialog.overlay.resize();
}
});
},
- _makeResizable: function( handles ) {
+ _makeResizable: function(handles) {
handles = (handles === undefined ? this.options.resizable : handles);
var self = this,
options = self.options,
// .ui-resizable has position: relative defined in the stylesheet
// but dialogs have to use absolute or fixed positioning
- position = self.uiDialog.css( "position" ),
- resizeHandles = typeof handles === 'string' ?
+ position = self.uiDialog.css('position'),
+ resizeHandles = (typeof handles === 'string' ?
handles :
- "n,e,s,w,se,sw,ne,nw";
+ 'n,e,s,w,se,sw,ne,nw'
+ );
- function filteredUi( ui ) {
+ function filteredUi(ui) {
return {
originalPosition: ui.originalPosition,
originalSize: ui.originalSize,
@@ -434,86 +449,85 @@ $.widget("ui.dialog", {
}
self.uiDialog.resizable({
- cancel: ".ui-dialog-content",
- containment: "document",
+ cancel: '.ui-dialog-content',
+ containment: 'document',
alsoResize: self.element,
maxWidth: options.maxWidth,
maxHeight: options.maxHeight,
minWidth: options.minWidth,
minHeight: self._minHeight(),
handles: resizeHandles,
- start: function( event, ui ) {
- $( this ).addClass( "ui-dialog-resizing" );
- self._trigger( "resizeStart", event, filteredUi( ui ) );
+ start: function(event, ui) {
+ $(this).addClass("ui-dialog-resizing");
+ self._trigger('resizeStart', event, filteredUi(ui));
},
- resize: function( event, ui ) {
- self._trigger( "resize", event, filteredUi( ui ) );
+ resize: function(event, ui) {
+ self._trigger('resize', event, filteredUi(ui));
},
- stop: function( event, ui ) {
- $( this ).removeClass( "ui-dialog-resizing" );
- options.height = $( this ).height();
- options.width = $( this ).width();
- self._trigger( "resizeStop", event, filteredUi( ui ) );
+ stop: function(event, ui) {
+ $(this).removeClass("ui-dialog-resizing");
+ options.height = $(this).height();
+ options.width = $(this).width();
+ self._trigger('resizeStop', event, filteredUi(ui));
$.ui.dialog.overlay.resize();
}
})
- .css( "position", position )
- .find( ".ui-resizable-se" )
- .addClass( "ui-icon ui-icon-grip-diagonal-se" );
+ .css('position', position)
+ .find('.ui-resizable-se').addClass('ui-icon ui-icon-grip-diagonal-se');
},
_minHeight: function() {
var options = this.options;
- if ( options.height === "auto" ) {
+ if (options.height === 'auto') {
return options.minHeight;
} else {
- return Math.min( options.minHeight, options.height );
+ return Math.min(options.minHeight, options.height);
}
},
- _position: function( position ) {
+ _position: function(position) {
var myAt = [],
- offset = [ 0, 0 ],
+ offset = [0, 0],
isVisible;
- if ( position ) {
+ if (position) {
// deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
// if (typeof position == 'string' || $.isArray(position)) {
// myAt = $.isArray(position) ? position : position.split(' ');
- if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
- myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ];
- if ( myAt.length === 1 ) {
- myAt[ 1 ] = myAt[ 0 ];
+ if (typeof position === 'string' || (typeof position === 'object' && '0' in position)) {
+ myAt = position.split ? position.split(' ') : [position[0], position[1]];
+ if (myAt.length === 1) {
+ myAt[1] = myAt[0];
}
- $.each( [ "left", "top" ], function( i, offsetPosition ) {
- if ( +myAt[ i ] === myAt[ i ] ) {
- offset[ i ] = myAt[ i ];
- myAt[ i ] = offsetPosition;
+ $.each(['left', 'top'], function(i, offsetPosition) {
+ if (+myAt[i] === myAt[i]) {
+ offset[i] = myAt[i];
+ myAt[i] = offsetPosition;
}
});
position = {
- my: myAt.join( " " ),
- at: myAt.join( " " ),
- offset: offset.join( " " )
+ my: myAt.join(" "),
+ at: myAt.join(" "),
+ offset: offset.join(" ")
};
}
- position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
+ position = $.extend({}, $.ui.dialog.prototype.options.position, position);
} else {
position = $.ui.dialog.prototype.options.position;
}
// need to show the dialog to get the actual offset in the position plugin
- isVisible = this.uiDialog.is( ":visible" );
- if ( !isVisible ) {
+ isVisible = this.uiDialog.is(':visible');
+ if (!isVisible) {
this.uiDialog.show();
}
- this.uiDialog.position( position );
- if ( !isVisible ) {
+ this.uiDialog.position(position);
+ if (!isVisible) {
this.uiDialog.hide();
}
},
@@ -542,28 +556,28 @@ $.widget("ui.dialog", {
}
},
- _setOption: function( key, value ) {
+ _setOption: function(key, value){
var self = this,
uiDialog = self.uiDialog;
- switch ( key ) {
+ switch (key) {
case "buttons":
- self._createButtons( value );
+ self._createButtons(value);
break;
case "closeText":
// ensure that we always pass a string
- self.uiDialogTitlebarCloseText.text( "" + value );
+ self.uiDialogTitlebarCloseText.text("" + value);
break;
case "dialogClass":
uiDialog
- .removeClass( self.options.dialogClass )
- .addClass( uiDialogClasses + value );
+ .removeClass(self.options.dialogClass)
+ .addClass(uiDialogClasses + value);
break;
case "disabled":
- if ( value ) {
- uiDialog.addClass( "ui-dialog-disabled" );
+ if (value) {
+ uiDialog.addClass('ui-dialog-disabled');
} else {
- uiDialog.removeClass( "ui-dialog-disabled" );
+ uiDialog.removeClass('ui-dialog-disabled');
}
break;
case "draggable":
@@ -577,33 +591,32 @@ $.widget("ui.dialog", {
}
break;
case "position":
- self._position( value );
+ self._position(value);
break;
case "resizable":
// currently resizable, becoming non-resizable
var isResizable = uiDialog.is( ":data(resizable)" );
- if ( isResizable && !value ) {
- uiDialog.resizable( "destroy" );
+ if (isResizable && !value) {
+ uiDialog.resizable('destroy');
}
// currently resizable, changing handles
- if ( isResizable && typeof value === "string" ) {
- uiDialog.resizable( "option", "handles", value );
+ if (isResizable && typeof value === 'string') {
+ uiDialog.resizable('option', 'handles', value);
}
// currently non-resizable, becoming resizable
- if ( !isResizable && value !== false ) {
- self._makeResizable( value );
+ if (!isResizable && value !== false) {
+ self._makeResizable(value);
}
break;
case "title":
// convert whatever was passed in o a string, for html() to not throw up
- $( ".ui-dialog-title", self.uiDialogTitlebar )
- .html( "" + ( value || " " ) );
+ $(".ui-dialog-title", self.uiDialogTitlebar).html("" + (value || ' '));
break;
}
- $.Widget.prototype._setOption.apply( self, arguments );
+ $.Widget.prototype._setOption.apply(self, arguments);
},
_size: function() {
@@ -616,20 +629,21 @@ $.widget("ui.dialog", {
isVisible = this.uiDialog.is( ":visible" );
// reset content sizing
- this.element.show().css({
- width: "auto",
+ // hide for non content measurement because height: 0 doesn't work in IE quirks mode (see #4350)
+ this.element.css({
+ width: 'auto',
minHeight: 0,
height: 0
});
- if ( options.minWidth > options.width ) {
+ if (options.minWidth > options.width) {
options.width = options.minWidth;
}
// reset wrapper sizing
// determine the height of all the non-content elements
nonContentHeight = this.uiDialog.css({
- height: "auto",
+ height: 'auto',
width: options.width
})
.height();
@@ -654,8 +668,19 @@ $.widget("ui.dialog", {
this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
}
- if (this.uiDialog.is( ":data(resizable)" ) ) {
- this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
+ this.element
+ .css(options.height === 'auto' ? {
+ minHeight: Math.max(options.minHeight - nonContentHeight, 0),
+ height: $.support.minHeight ? 'auto' :
+ Math.max(options.minHeight - nonContentHeight, 0)
+ } : {
+ minHeight: 0,
+ height: Math.max(options.height - nonContentHeight, 0)
+ })
+ .show();
+
+ if (this.uiDialog.is(':data(resizable)')) {
+ this.uiDialog.resizable('option', 'minHeight', this._minHeight());
}
}
});
@@ -667,93 +692,89 @@ $.extend($.ui.dialog, {
maxZ: 0,
getTitleId: function($el) {
- var id = $el.attr( "id" );
- if ( !id ) {
+ var id = $el.attr('id');
+ if (!id) {
this.uuid += 1;
id = this.uuid;
}
- return "ui-dialog-title-" + id;
+ return 'ui-dialog-title-' + id;
},
- overlay: function( dialog ) {
- this.$el = $.ui.dialog.overlay.create( dialog );
+ overlay: function(dialog) {
+ this.$el = $.ui.dialog.overlay.create(dialog);
}
});
-$.extend( $.ui.dialog.overlay, {
+$.extend($.ui.dialog.overlay, {
instances: [],
// reuse old instances due to IE memory leak with alpha transparency (see #5185)
oldInstances: [],
maxZ: 0,
- events: $.map(
- "focus,mousedown,mouseup,keydown,keypress,click".split( "," ),
- function( event ) {
- return event + ".dialog-overlay";
- }
- ).join( " " ),
- create: function( dialog ) {
- if ( this.instances.length === 0 ) {
+ events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
+ function(event) { return event + '.dialog-overlay'; }).join(' '),
+ create: function(dialog) {
+ if (this.instances.length === 0) {
// prevent use of anchors and inputs
// we use a setTimeout in case the overlay is created from an
// event that we're going to be cancelling (see #2804)
setTimeout(function() {
// handle $(el).dialog().dialog('close') (see #4065)
- if ( $.ui.dialog.overlay.instances.length ) {
- $( document ).bind( $.ui.dialog.overlay.events, function( event ) {
+ if ($.ui.dialog.overlay.instances.length) {
+ $(document).bind($.ui.dialog.overlay.events, function(event) {
// stop events if the z-index of the target is < the z-index of the overlay
// we cannot return true when we don't want to cancel the event (#3523)
- if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) {
+ if ($(event.target).zIndex() < $.ui.dialog.overlay.maxZ) {
return false;
}
});
}
- }, 1 );
+ }, 1);
// allow closing by pressing the escape key
- $( document ).bind( "keydown.dialog-overlay", function( event ) {
- if ( dialog.options.closeOnEscape && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
+ $(document).bind('keydown.dialog-overlay', function(event) {
+ if (dialog.options.closeOnEscape && event.keyCode &&
+ event.keyCode === $.ui.keyCode.ESCAPE) {
- dialog.close( event );
+ dialog.close(event);
event.preventDefault();
}
});
// handle window resize
- $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
+ $(window).bind('resize.dialog-overlay', $.ui.dialog.overlay.resize);
}
- var $el = ( this.oldInstances.pop() || $( "" ).addClass( "ui-widget-overlay" ) )
- .appendTo( document.body )
+ var $el = (this.oldInstances.pop() || $('
').addClass('ui-widget-overlay'))
+ .appendTo(document.body)
.css({
width: this.width(),
height: this.height()
});
- if ( $.fn.bgiframe ) {
+ if ($.fn.bgiframe) {
$el.bgiframe();
}
- this.instances.push( $el );
+ this.instances.push($el);
return $el;
},
- destroy: function( $el ) {
- var indexOf = $.inArray( $el, this.instances );
- if ( indexOf !== -1 ) {
- this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] );
+ destroy: function($el) {
+ var indexOf = $.inArray($el, this.instances);
+ if (indexOf != -1){
+ this.oldInstances.push(this.instances.splice(indexOf, 1)[0]);
}
- if ( this.instances.length === 0 ) {
- $( [ document, window ] ).unbind( ".dialog-overlay" );
+ if (this.instances.length === 0) {
+ $([document, window]).unbind('.dialog-overlay');
}
$el.remove();
-
+
// adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
var maxZ = 0;
- $.each( this.instances, function() {
- maxZ = Math.max( maxZ, this.css( "z-index" ) );
+ $.each(this.instances, function() {
+ maxZ = Math.max(maxZ, this.css('z-index'));
});
this.maxZ = maxZ;
},
@@ -762,7 +783,7 @@ $.extend( $.ui.dialog.overlay, {
var scrollHeight,
offsetHeight;
// handle IE 6
- if ( $.browser.msie && $.browser.version < 7 ) {
+ if ($.browser.msie && $.browser.version < 7) {
scrollHeight = Math.max(
document.documentElement.scrollHeight,
document.body.scrollHeight
@@ -772,14 +793,14 @@ $.extend( $.ui.dialog.overlay, {
document.body.offsetHeight
);
- if ( scrollHeight < offsetHeight ) {
- return $( window ).height() + "px";
+ if (scrollHeight < offsetHeight) {
+ return $(window).height() + 'px';
} else {
- return scrollHeight + "px";
+ return scrollHeight + 'px';
}
// handle "good" browsers
} else {
- return $( document ).height() + "px";
+ return $(document).height() + 'px';
}
},
@@ -787,7 +808,7 @@ $.extend( $.ui.dialog.overlay, {
var scrollWidth,
offsetWidth;
// handle IE 6
- if ( $.browser.msie && $.browser.version < 7 ) {
+ if ($.browser.msie && $.browser.version < 7) {
scrollWidth = Math.max(
document.documentElement.scrollWidth,
document.body.scrollWidth
@@ -797,14 +818,14 @@ $.extend( $.ui.dialog.overlay, {
document.body.offsetWidth
);
- if ( scrollWidth < offsetWidth ) {
- return $( window ).width() + "px";
+ if (scrollWidth < offsetWidth) {
+ return $(window).width() + 'px';
} else {
- return scrollWidth + "px";
+ return scrollWidth + 'px';
}
// handle "good" browsers
} else {
- return $( document ).width() + "px";
+ return $(document).width() + 'px';
}
},
@@ -817,9 +838,9 @@ $.extend( $.ui.dialog.overlay, {
* This is handled by shrinking the overlay before setting it
* to the full document size.
*/
- var $overlays = $( [] );
- $.each( $.ui.dialog.overlay.instances, function() {
- $overlays = $overlays.add( this );
+ var $overlays = $([]);
+ $.each($.ui.dialog.overlay.instances, function() {
+ $overlays = $overlays.add(this);
});
$overlays.css({
@@ -832,10 +853,10 @@ $.extend( $.ui.dialog.overlay, {
}
});
-$.extend( $.ui.dialog.overlay.prototype, {
+$.extend($.ui.dialog.overlay.prototype, {
destroy: function() {
- $.ui.dialog.overlay.destroy( this.$el );
+ $.ui.dialog.overlay.destroy(this.$el);
}
});
-}( jQuery ) );
+}(jQuery));
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index 2d4947145ca..be0a6459a69 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Draggable @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -175,6 +175,10 @@ $.widget("ui.draggable", $.ui.mouse, {
if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
+
+ if(this.options.gridCallback) {
+ this.options.gridCallback();
+ }
return false;
},
@@ -192,8 +196,8 @@ $.widget("ui.draggable", $.ui.mouse, {
this.dropped = false;
}
- //if the original element is removed, don't bother to continue
- if(!this.element[0] || !this.element[0].parentNode)
+ //if the original element is removed, don't bother to continue if helper is set to "original"
+ if((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original")
return false;
if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
diff --git a/ui/jquery.ui.droppable.js b/ui/jquery.ui.droppable.js
index 084f845c786..decdc1712a8 100644
--- a/ui/jquery.ui.droppable.js
+++ b/ui/jquery.ui.droppable.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Droppable @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js
deleted file mode 100644
index 6381bedbc74..00000000000
--- a/ui/jquery.ui.menu.js
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * jQuery UI Menu @VERSION
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu
- *
- * Depends:
- * jquery.ui.core.js
- * jquery.ui.widget.js
- */
-(function($) {
-
-var idIncrement = 0;
-
-$.widget("ui.menu", {
- _create: function() {
- var self = this;
- this.menuId = this.element.attr( "id" ) || "ui-menu-" + idIncrement++;
- this.element
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .attr({
- id: this.menuId,
- role: "listbox"
- })
- .bind( "click.menu", function( event ) {
- if ( self.options.disabled ) {
- return false;
- }
- if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) {
- return;
- }
- // temporary
- event.preventDefault();
- self.select( event );
- })
- .bind( "mouseover.menu", function( event ) {
- if ( self.options.disabled ) {
- return;
- }
- var target = $( event.target ).closest( ".ui-menu-item" );
- if ( target.length && target.parent()[0] === self.element[0] ) {
- self.activate( event, target );
- }
- })
- .bind("mouseout.menu", function( event ) {
- if ( self.options.disabled ) {
- return;
- }
- var target = $( event.target ).closest( ".ui-menu-item" );
- if ( target.length && target.parent()[0] === self.element[0] ) {
- self.deactivate( event );
- }
- });
- this.refresh();
-
- if ( !this.options.input ) {
- this.options.input = this.element.attr( "tabIndex", 0 );
- }
- this.options.input.bind( "keydown.menu", function( event ) {
- if ( self.options.disabled ) {
- return;
- }
- switch ( event.keyCode ) {
- case $.ui.keyCode.PAGE_UP:
- self.previousPage();
- event.preventDefault();
- event.stopImmediatePropagation();
- break;
- case $.ui.keyCode.PAGE_DOWN:
- self.nextPage();
- event.preventDefault();
- event.stopImmediatePropagation();
- break;
- case $.ui.keyCode.UP:
- self.previous();
- event.preventDefault();
- event.stopImmediatePropagation();
- break;
- case $.ui.keyCode.DOWN:
- self.next();
- event.preventDefault();
- event.stopImmediatePropagation();
- break;
- case $.ui.keyCode.ENTER:
- self.select();
- event.preventDefault();
- event.stopImmediatePropagation();
- break;
- }
- });
- },
-
- destroy: function() {
- $.Widget.prototype.destroy.apply( this, arguments );
-
- this.element
- .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .removeAttr( "tabIndex" )
- .removeAttr( "role" )
- .removeAttr( "aria-activedescendant" );
-
- this.element.children( ".ui-menu-item" )
- .removeClass( "ui-menu-item" )
- .removeAttr( "role" )
- .children( "a" )
- .removeClass( "ui-corner-all" )
- .removeAttr( "tabIndex" )
- .unbind( ".menu" );
- },
-
- refresh: function() {
- // don't refresh list items that are already adapted
- var items = this.element.children( "li:not(.ui-menu-item):has(a)" )
- .addClass( "ui-menu-item" )
- .attr( "role", "menuitem" );
-
- items.children( "a" )
- .addClass( "ui-corner-all" )
- .attr( "tabIndex", -1 );
- },
-
- activate: function( event, item ) {
- var self = this;
- this.deactivate();
- if ( this._hasScroll() ) {
- var borderTop = parseFloat( $.curCSS( this.element[0], "borderTopWidth", true) ) || 0,
- paddingtop = parseFloat( $.curCSS( this.element[0], "paddingTop", true) ) || 0,
- offset = item.offset().top - this.element.offset().top - borderTop - paddingtop,
- scroll = this.element.attr( "scrollTop" ),
- elementHeight = this.element.height(),
- itemHeight = item.height();
- if ( offset < 0 ) {
- this.element.attr( "scrollTop", scroll + offset );
- } else if ( offset + itemHeight > elementHeight ) {
- this.element.attr( "scrollTop", scroll + offset - elementHeight + itemHeight );
- }
- }
- this.active = item.first()
- .children( "a" )
- .addClass( "ui-state-hover" )
- .attr( "id", function(index, id) {
- return (self.itemId = id || self.menuId + "-activedescendant");
- })
- .end();
- // need to remove the attribute before adding it for the screenreader to pick up the change
- // see http://groups.google.com/group/jquery-a11y/msg/929e0c1e8c5efc8f
- this.element.removeAttr("aria-activedescenant").attr("aria-activedescenant", self.itemId);
- this._trigger( "focus", event, { item: item } );
- },
-
- deactivate: function(event) {
- if (!this.active) {
- return;
- }
-
- var self = this;
- this.active.children( "a" ).removeClass( "ui-state-hover" );
- // remove only generated id
- $( "#" + self.menuId + "-activedescendant" ).removeAttr( "id" );
- this.element.removeAttr( "aria-activedescenant" );
- this._trigger( "blur", event );
- this.active = null;
- },
-
- next: function(event) {
- this._move( "next", ".ui-menu-item", "first", event );
- },
-
- previous: function(event) {
- this._move( "prev", ".ui-menu-item", "last", event );
- },
-
- first: function() {
- return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
- },
-
- last: function() {
- return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
- },
-
- _move: function(direction, edge, filter, event) {
- if ( !this.active ) {
- this.activate( event, this.element.children(edge)[filter]() );
- return;
- }
- var next = this.active[ direction + "All" ]( ".ui-menu-item" ).eq( 0 );
- if ( next.length ) {
- this.activate( event, next );
- } else {
- this.activate( event, this.element.children(edge)[filter]() );
- }
- },
-
- nextPage: function( event ) {
- if ( this._hasScroll() ) {
- if ( !this.active || this.last() ) {
- this.activate( event, this.element.children( ".ui-menu-item" ).first() );
- return;
- }
- var base = this.active.offset().top,
- height = this.element.height(),
- result;
- this.active.nextAll( ".ui-menu-item" ).each( function() {
- result = $( this );
- return $( this ).offset().top - base - height < 0;
- });
-
- this.activate( event, result );
- } else {
- this.activate( event, this.element.children( ".ui-menu-item" )
- [ !this.active || this.last() ? "first" : "last" ]() );
- }
- },
-
- previousPage: function( event ) {
- if ( this._hasScroll() ) {
- if ( !this.active || this.first() ) {
- this.activate( event, this.element.children( ".ui-menu-item" ).last() );
- return;
- }
-
- var base = this.active.offset().top,
- height = this.element.height(),
- result;
- this.active.prevAll( ".ui-menu-item" ).each( function() {
- result = $( this );
- return $(this).offset().top - base + height > 0;
- });
-
- this.activate( event, result );
- } else {
- this.activate( event, this.element.children( ".ui-menu-item" )
- [ !this.active || this.first() ? ":last" : ":first" ]() );
- }
- },
-
- _hasScroll: function() {
- return this.element.height() < this.element.attr( "scrollHeight" );
- },
-
- select: function( event ) {
- this._trigger( "select", event, { item: this.active } );
- }
-});
-
-}( jQuery ));
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index bfe8640a2a3..5d5dfa1811e 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -1,7 +1,7 @@
/*!
* jQuery UI Mouse @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -86,14 +86,18 @@ $.widget("ui.mouse", {
.bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
.bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
- event.preventDefault();
+ // preventDefault() is used to prevent the selection of text here -
+ // however, in Safari, this causes select boxes not to be selectable
+ // anymore, so this fix is needed
+ ($.browser.safari || event.preventDefault());
+
event.originalEvent.mouseHandled = true;
return true;
},
_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
- if ($.browser.msie && !(document.documentMode >= 9) && !event.button) {
+ if ($.browser.msie && !event.button) {
return this._mouseUp(event);
}
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index 3992e1c63a1..8bdc462dd59 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Position @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -82,7 +82,7 @@ $.fn.position = function( options ) {
if ( options.at[0] === "right" ) {
basePosition.left += targetWidth;
- } else if (options.at[0] === center ) {
+ } else if ( options.at[0] === center ) {
basePosition.left += targetWidth / 2;
}
@@ -102,9 +102,9 @@ $.fn.position = function( options ) {
marginLeft = parseInt( $.curCSS( this, "marginLeft", true ) ) || 0,
marginTop = parseInt( $.curCSS( this, "marginTop", true ) ) || 0,
collisionWidth = elemWidth + marginLeft +
- parseInt( $.curCSS( this, "marginRight", true ) ) || 0,
+ ( parseInt( $.curCSS( this, "marginRight", true ) ) || 0 ),
collisionHeight = elemHeight + marginTop +
- parseInt( $.curCSS( this, "marginBottom", true ) ) || 0,
+ ( parseInt( $.curCSS( this, "marginBottom", true ) ) || 0 ),
position = $.extend( {}, basePosition ),
collisionPosition;
diff --git a/ui/jquery.ui.progressbar.js b/ui/jquery.ui.progressbar.js
index 009049d275c..70c6e025c91 100644
--- a/ui/jquery.ui.progressbar.js
+++ b/ui/jquery.ui.progressbar.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Progressbar @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.ui.resizable.js b/ui/jquery.ui.resizable.js
index a835ef9a869..1e1706a9dfd 100644
--- a/ui/jquery.ui.resizable.js
+++ b/ui/jquery.ui.resizable.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Resizable @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -322,10 +322,10 @@ $.widget("ui.resizable", $.ui.mouse, {
if(this._helper) {
var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
- soffsetw = ista ? 0 : self.sizeDiff.width;
+ soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : self.sizeDiff.height,
+ soffsetw = ista ? 0 : self.sizeDiff.width;
- var s = { width: (self.size.width - soffsetw), height: (self.size.height - soffseth) },
+ var s = { width: (self.helper.width() - soffsetw), height: (self.helper.height() - soffseth) },
left = (parseInt(self.element.css('left'), 10) + (self.position.left - self.originalPosition.left)) || null,
top = (parseInt(self.element.css('top'), 10) + (self.position.top - self.originalPosition.top)) || null;
diff --git a/ui/jquery.ui.selectable.js b/ui/jquery.ui.selectable.js
index e776e483ddc..fa7d011229c 100644
--- a/ui/jquery.ui.selectable.js
+++ b/ui/jquery.ui.selectable.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Selectable @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index d3b4744e3dc..f6bc570256f 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Slider @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index 32757d41c4b..7f9de5b264f 100644
--- a/ui/jquery.ui.sortable.js
+++ b/ui/jquery.ui.sortable.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Sortable @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -77,7 +77,8 @@ $.widget("ui.sortable", $.ui.mouse, {
if ( key === "disabled" ) {
this.options[ key ] = value;
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
+ this.widget()
+ [ value ? "addClass" : "removeClass"]( "ui-sortable-disabled" );
} else {
// Don't call widget base _setOption for disable as it adds ui-state-disabled class
$.Widget.prototype._setOption.apply(this, arguments);
@@ -359,7 +360,7 @@ $.widget("ui.sortable", $.ui.mouse, {
if(this.dragging) {
- this._mouseUp();
+ this._mouseUp({ target: null });
if(this.options.helper == "original")
this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
@@ -377,21 +378,23 @@ $.widget("ui.sortable", $.ui.mouse, {
}
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
+ if (this.placeholder) {
+ //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+ if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+ if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
+ $.extend(this, {
+ helper: null,
+ dragging: false,
+ reverting: false,
+ _noFinalSort: null
+ });
+
+ if(this.domPosition.prev) {
+ $(this.domPosition.prev).after(this.currentItem);
+ } else {
+ $(this.domPosition.parent).prepend(this.currentItem);
+ }
}
return this;
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
deleted file mode 100644
index 39a498359cc..00000000000
--- a/ui/jquery.ui.spinner.js
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * jQuery UI Spinner @VERSION
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Spinner
- *
- * Depends:
- * jquery.ui.core.js
- * jquery.ui.widget.js
- */
-(function($) {
-
-$.widget('ui.spinner', {
- options: {
- incremental: true,
- max: null,
- min: null,
- numberformat: null,
- page: 10,
- step: null,
- value: null
- },
-
- _create: function() {
- this._draw();
- this._markupOptions();
- this._mousewheel();
- this._aria();
- },
-
- _markupOptions: function() {
- var _this = this;
- $.each({
- min: -Number.MAX_VALUE,
- max: Number.MAX_VALUE,
- step: 1
- }, function(attr, defaultValue) {
- if (_this.options[attr] === null) {
- var value = _this.element.attr(attr);
- _this.options[attr] = typeof value == "string" && value.length > 0 ? _this._parse(value) : defaultValue;
- }
- });
- this.value(this.options.value !== null ? this.options.value : this.element.val() || 0);
- },
-
- _draw: function() {
- var self = this,
- options = self.options;
-
- var uiSpinner = this.uiSpinner = self.element
- .addClass('ui-spinner-input')
- .attr('autocomplete', 'off')
- .wrap(self._uiSpinnerHtml())
- .parent()
- // add buttons
- .append(self._buttonHtml())
- // add behaviours
- .hover(function() {
- if (!options.disabled) {
- $(this).addClass('ui-state-hover');
- }
- self.hovered = true;
- }, function() {
- $(this).removeClass('ui-state-hover');
- self.hovered = false;
- });
-
- this.element
- .bind('keydown.spinner', function(event) {
- if (self.options.disabled) {
- return;
- }
- if (self._start(event)) {
- return self._keydown(event);
- }
- return true;
- })
- .bind('keyup.spinner', function(event) {
- if (self.options.disabled) {
- return;
- }
- if (self.spinning) {
- self._stop(event);
- self._change(event);
- }
- })
- .bind('focus.spinner', function() {
- uiSpinner.addClass('ui-state-active');
- self.focused = true;
- })
- .bind('blur.spinner', function(event) {
- self.value(self.element.val());
- if (!self.hovered) {
- uiSpinner.removeClass('ui-state-active');
- }
- self.focused = false;
- });
-
- // button bindings
- this.buttons = uiSpinner.find('.ui-spinner-button')
- .attr("tabIndex", -1)
- .button()
- .removeClass("ui-corner-all")
- .bind('mousedown', function(event) {
- if (self.options.disabled) {
- return;
- }
- if (self._start(event) === false) {
- return false;
- }
- self._repeat(null, $(this).hasClass('ui-spinner-up') ? 1 : -1, event);
- })
- .bind('mouseup', function(event) {
- if (self.options.disabled) {
- return;
- }
- if (self.spinning) {
- self._stop(event);
- self._change(event);
- }
- })
- .bind("mouseenter", function() {
- if (self.options.disabled) {
- return;
- }
- // button will add ui-state-active if mouse was down while mouseleave and kept down
- if ($(this).hasClass("ui-state-active")) {
- if (self._start(event) === false) {
- return false;
- }
- self._repeat(null, $(this).hasClass('ui-spinner-up') ? 1 : -1, event);
- }
- })
- .bind("mouseleave", function() {
- if (self.spinning) {
- self._stop(event);
- self._change(event);
- }
- });
-
- // disable spinner if element was already disabled
- if (options.disabled) {
- this.disable();
- }
- },
-
- _keydown: function(event) {
- var o = this.options,
- KEYS = $.ui.keyCode;
-
- switch (event.keyCode) {
- case KEYS.UP:
- this._repeat(null, 1, event);
- return false;
- case KEYS.DOWN:
- this._repeat(null, -1, event);
- return false;
- case KEYS.PAGE_UP:
- this._repeat(null, this.options.page, event);
- return false;
- case KEYS.PAGE_DOWN:
- this._repeat(null, -this.options.page, event);
- return false;
-
- case KEYS.ENTER:
- this.value(this.element.val());
- }
-
- return true;
- },
-
- _mousewheel: function() {
- // need the delta normalization that mousewheel plugin provides
- if (!$.fn.mousewheel) {
- return;
- }
- var self = this;
- this.element.bind("mousewheel.spinner", function(event, delta) {
- if (self.options.disabled) {
- return;
- }
- if (!self.spinning && !self._start(event)) {
- return false;
- }
- self._spin((delta > 0 ? 1 : -1) * self.options.step, event);
- clearTimeout(self.timeout);
- self.timeout = setTimeout(function() {
- if (self.spinning) {
- self._stop(event);
- self._change(event);
- }
- }, 100);
- event.preventDefault();
- });
- },
-
- _uiSpinnerHtml: function() {
- return '
';
- },
-
- _buttonHtml: function() {
- return '
▲ ' +
- '
▼ ';
- },
-
- _start: function(event) {
- if (!this.spinning && this._trigger('start', event) !== false) {
- if (!this.counter) {
- this.counter = 1;
- }
- this.spinning = true;
- return true;
- }
- return false;
- },
-
- _repeat: function(i, steps, event) {
- var self = this;
- i = i || 500;
-
- clearTimeout(this.timer);
- this.timer = setTimeout(function() {
- self._repeat(40, steps, event);
- }, i);
-
- self._spin(steps * self.options.step, event);
- },
-
- _spin: function(step, event) {
- if (!this.counter) {
- this.counter = 1;
- }
-
- // TODO refactor, maybe figure out some non-linear math
- var newVal = this.value() + step * (this.options.incremental &&
- this.counter > 20
- ? this.counter > 100
- ? this.counter > 200
- ? 100
- : 10
- : 2
- : 1);
-
- if (this._trigger('spin', event, { value: newVal }) !== false) {
- this.value(newVal);
- this.counter++;
- }
- },
-
- _stop: function(event) {
- this.counter = 0;
- if (this.timer) {
- window.clearTimeout(this.timer);
- }
- this.element[0].focus();
- this.spinning = false;
- this._trigger('stop', event);
- },
-
- _change: function(event) {
- this._trigger('change', event);
- },
-
- _setOption: function(key, value) {
- if (key == 'value') {
- value = this._parse(value);
- if (value < this.options.min) {
- value = this.options.min;
- }
- if (value > this.options.max) {
- value = this.options.max;
- }
- }
- if (key == 'disabled') {
- if (value) {
- this.element.attr("disabled", true);
- this.buttons.button("disable");
- } else {
- this.element.removeAttr("disabled");
- this.buttons.button("enable");
- }
- }
- $.Widget.prototype._setOption.call( this, key, value );
- },
-
- _setOptions: function( options ) {
- $.Widget.prototype._setOptions.call( this, options );
- if ( "value" in options ) {
- this._format( this.options.value );
- }
- this._aria();
- },
-
- _aria: function() {
- this.element
- .attr('aria-valuemin', this.options.min)
- .attr('aria-valuemax', this.options.max)
- .attr('aria-valuenow', this.options.value);
- },
-
- _parse: function(val) {
- var input = val;
- if (typeof val == 'string') {
- // special case for currency formatting until Globalization handles currencies
- if (this.options.numberformat == "C" && window.Globalization) {
- // parseFloat should accept number format, including currency
- var culture = Globalization.culture || Globalization.cultures['default'];
- val = val.replace(culture.numberFormat.currency.symbol, "");
- }
- val = window.Globalization && this.options.numberformat ? Globalization.parseFloat(val) : +val;
- }
- return isNaN(val) ? null : val;
- },
-
- _format: function(num) {
- var num = this.options.value;
- this.element.val( window.Globalization && this.options.numberformat ? Globalization.format(num, this.options.numberformat) : num );
- },
-
- destroy: function() {
- this.element
- .removeClass('ui-spinner-input')
- .removeAttr('disabled')
- .removeAttr('autocomplete');
- $.Widget.prototype.destroy.call( this );
- this.uiSpinner.replaceWith(this.element);
- },
-
- stepUp: function(steps) {
- this._spin((steps || 1) * this.options.step);
- },
-
- stepDown: function(steps) {
- this._spin((steps || 1) * -this.options.step);
- },
-
- pageUp: function(pages) {
- this.stepUp((pages || 1) * this.options.page);
- },
-
- pageDown: function(pages) {
- this.stepDown((pages || 1) * this.options.page);
- },
-
- value: function(newVal) {
- if (!arguments.length) {
- return this._parse(this.element.val());
- }
- this.option('value', newVal);
- },
-
- widget: function() {
- return this.uiSpinner;
- }
-});
-
-})(jQuery);
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
old mode 100755
new mode 100644
index 82da51d5bd5..5dcb8485280
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -1,7 +1,7 @@
/*
* jQuery UI Tabs @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -216,7 +216,7 @@ $.widget( "ui.tabs", {
// seems to be expected behavior that the show callback is fired
self.element.queue( "tabs", function() {
self._trigger( "show", null,
- self._ui( self.anchors[ o.selected ], self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) ) ) );
+ self._ui( self.anchors[ o.selected ], self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) )[ 0 ] ) );
});
this.load( o.selected );
@@ -233,7 +233,9 @@ $.widget( "ui.tabs", {
o.selected = this.lis.index( this.lis.filter( ".ui-tabs-selected" ) );
}
- this.element.toggleClass( "ui-tabs-collapsible", o.collapsible );
+ // update collapsible
+ // TODO: use .toggleClass()
+ this.element[ o.collapsible ? "addClass" : "removeClass" ]( "ui-tabs-collapsible" );
// set or update cookie after init and add/remove respectively
if ( o.cookie ) {
@@ -242,8 +244,9 @@ $.widget( "ui.tabs", {
// disable tabs
for ( var i = 0, li; ( li = this.lis[ i ] ); i++ ) {
- $( li ).toggleClass( "ui-state-disabled",
- $.inArray( i, o.disabled ) != -1 && !$( li ).hasClass( "ui-tabs-selected" ) );
+ $( li )[ $.inArray( i, o.disabled ) != -1 &&
+ // TODO: use .toggleClass()
+ !$( li ).hasClass( "ui-tabs-selected" ) ? "addClass" : "removeClass" ]( "ui-state-disabled" );
}
// reset cache if switching from cached to not cached
@@ -330,8 +333,7 @@ $.widget( "ui.tabs", {
};
// attach tab event handler, unbind to avoid duplicates from former tabifying...
- this.anchors.bind( o.event + ".tabs", function( event ) {
- event.preventDefault();
+ this.anchors.bind( o.event + ".tabs", function() {
var el = this,
$li = $(el).closest( "li" ),
$hide = self.panels.filter( ":not(.ui-tabs-hide)" ),
@@ -347,7 +349,7 @@ $.widget( "ui.tabs", {
self.panels.filter( ":animated" ).length ||
self._trigger( "select", null, self._ui( this, $show[ 0 ] ) ) === false ) {
this.blur();
- return;
+ return false;
}
o.selected = self.anchors.index( this );
@@ -368,7 +370,7 @@ $.widget( "ui.tabs", {
}).dequeue( "tabs" );
this.blur();
- return;
+ return false;
} else if ( !$hide.length ) {
if ( o.cookie ) {
self._cookie( o.selected, o.cookie );
@@ -382,7 +384,7 @@ $.widget( "ui.tabs", {
self.load( self.anchors.index( this ) );
this.blur();
- return;
+ return false;
}
}
@@ -416,8 +418,8 @@ $.widget( "ui.tabs", {
});
// disable click in any case
- this.anchors.bind( "click.tabs", function( event ){
- event.preventDefault();
+ this.anchors.bind( "click.tabs", function(){
+ return false;
});
},
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
deleted file mode 100644
index ea3cde3395c..00000000000
--- a/ui/jquery.ui.tooltip.js
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * jQuery UI Tooltip @VERSION
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Tooltip
- *
- * Depends:
- * jquery.ui.core.js
- * jquery.ui.widget.js
- * jquery.ui.position.js
- */
-(function($) {
-
-var increments = 0;
-
-$.widget("ui.tooltip", {
- options: {
- items: "[title]",
- content: function() {
- return $(this).attr("title");
- },
- position: {
- my: "left center",
- at: "right center",
- offset: "15 0"
- }
- },
- _create: function() {
- var self = this;
- this.tooltip = $("
")
- .attr("id", "ui-tooltip-" + increments++)
- .attr("role", "tooltip")
- .attr("aria-hidden", "true")
- .addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content")
- .appendTo(document.body)
- .hide();
- this.tooltipContent = $("
")
- .addClass("ui-tooltip-content")
- .appendTo(this.tooltip);
- this.opacity = this.tooltip.css("opacity");
- this.element
- .bind("focus.tooltip mouseover.tooltip", function(event) {
- self.open( event );
- })
- .bind("blur.tooltip mouseout.tooltip", function(event) {
- self.close( event );
- });
- },
-
- enable: function() {
- this.options.disabled = false;
- },
-
- disable: function() {
- this.options.disabled = true;
- },
-
- destroy: function() {
- this.tooltip.remove();
- $.Widget.prototype.destroy.apply(this, arguments);
- },
-
- widget: function() {
- return this.element.pushStack(this.tooltip.get());
- },
-
- open: function(event) {
- var target = $(event && event.target || this.element).closest(this.options.items);
- // already visible? possible when both focus and mouseover events occur
- if (this.current && this.current[0] == target[0])
- return;
- var self = this;
- this.current = target;
- this.currentTitle = target.attr("title");
- var content = this.options.content.call(target[0], function(response) {
- // IE may instantly serve a cached response, need to give it a chance to finish with _show before that
- setTimeout(function() {
- // ignore async responses that come in after the tooltip is already hidden
- if (self.current == target)
- self._show(event, target, response);
- }, 13);
- });
- if (content) {
- self._show(event, target, content);
- }
- },
-
- _show: function(event, target, content) {
- if (!content)
- return;
-
- target.attr("title", "");
-
- if (this.options.disabled)
- return;
-
- this.tooltipContent.html(content);
- this.tooltip.css({
- top: 0,
- left: 0
- }).show().position( $.extend({
- of: target
- }, this.options.position )).hide();
-
- this.tooltip.attr("aria-hidden", "false");
- target.attr("aria-describedby", this.tooltip.attr("id"));
-
- this.tooltip.stop(false, true).fadeIn();
-
- this._trigger( "open", event );
- },
-
- close: function(event) {
- if (!this.current)
- return;
-
- var current = this.current;
- this.current = null;
- current.attr("title", this.currentTitle);
-
- if (this.options.disabled)
- return;
-
- current.removeAttr("aria-describedby");
- this.tooltip.attr("aria-hidden", "true");
-
- this.tooltip.stop(false, true).fadeOut();
-
- this._trigger( "close", event );
- }
-
-});
-
-})(jQuery);
\ No newline at end of file
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index b5fb600d949..53920bbe828 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -1,7 +1,7 @@
/*!
* jQuery UI Widget @VERSION
*
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
@@ -80,6 +80,12 @@ $.widget = function( name, base, prototype ) {
$.widget.bridge = function( name, object ) {
$.fn[ name ] = function( options ) {
+
+ // fixes flash z-index bug
+ if (arguments.length > 0) {
+ jQueryToggleFlashVisibility(arguments)
+ };
+
var isMethodCall = typeof options === "string",
args = Array.prototype.slice.call( arguments, 1 ),
returnValue = this;
@@ -212,7 +218,9 @@ $.Widget.prototype = {
if ( key === "disabled" ) {
this.widget()
- .toggleClass( this.widgetBaseClass + "-disabled ui-state-disabled", !!value )
+ [ value ? "addClass" : "removeClass"](
+ this.widgetBaseClass + "-disabled" + " " +
+ "ui-state-disabled" )
.attr( "aria-disabled", value );
}
diff --git a/version.txt b/version.txt
index 13c1a737145..b0473625e4a 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-1.9pre
+1.8.11pre