From 548bdb12a116771b34a99ba97769ddef22f7d156 Mon Sep 17 00:00:00 2001 From: awgy Date: Sat, 5 Feb 2011 02:13:55 -0600 Subject: Mouse: Reset click event suppression on next mousedown. Fixes #6946 - Mouse: click event suppressed after drag in Gecko --- ui/jquery.ui.mouse.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ui') diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index f5e8b58c0..bfe4a7578 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -75,6 +75,11 @@ $.widget("ui.mouse", { } } + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) { + $.removeData(event.target, this.widgetName + '.preventClickEvent'); + } + // these delegates are required to keep context this._mouseMoveDelegate = function(event) { return self._mouseMove(event); -- cgit v1.2.3 From 5c6afa8e7bcf0b7111245ad703d28cfcefc1d59f Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Wed, 2 Mar 2011 21:27:09 -0500 Subject: Datepicker i18n: corrected arabic month name for May. Fixed #7055 - Datepicker: arabic month name has March in place of May --- ui/i18n/jquery.ui.datepicker-ar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/i18n/jquery.ui.datepicker-ar.js b/ui/i18n/jquery.ui.datepicker-ar.js index e02160d66..db5773558 100644 --- a/ui/i18n/jquery.ui.datepicker-ar.js +++ b/ui/i18n/jquery.ui.datepicker-ar.js @@ -7,7 +7,7 @@ jQuery(function($){ prevText: '<السابق', nextText: 'التالي>', currentText: 'اليوم', - monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران', + monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'], -- cgit v1.2.3 From 15c97e0b76b4576d0c7bee9d54dc4662c23502b9 Mon Sep 17 00:00:00 2001 From: Douglas Neiner Date: Wed, 2 Mar 2011 12:52:21 -0500 Subject: Dialog: Added a class to dialog wrapper when it is currently displaying buttons, includes unit tests for changes. Fixed #7057 - An extra class is needed on the dialog wrapper to specify when a buttonset is showing --- tests/unit/dialog/dialog_options.js | 10 +++++++++- ui/jquery.ui.dialog.js | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/tests/unit/dialog/dialog_options.js b/tests/unit/dialog/dialog_options.js index 82f28bf85..fb8dea775 100644 --- a/tests/unit/dialog/dialog_options.js +++ b/tests/unit/dialog/dialog_options.js @@ -18,7 +18,7 @@ test("autoOpen", function() { }); test("buttons", function() { - expect(17); + expect(21); var buttons = { "Ok": function(ev, ui) { @@ -44,6 +44,8 @@ test("buttons", function() { }); ok(btn.parent().hasClass('ui-dialog-buttonset'), "buttons in container"); + ok(el.parent().hasClass('ui-dialog-buttons'), "dialog wrapper adds class about having buttons"); + btn.trigger("click"); var newButtons = { @@ -67,6 +69,12 @@ test("buttons", function() { equals(btn.eq(i).text(), key, "text of button " + (i+1)); i += 1; }); + + el.dialog("option", "buttons", null); + btn = $("button", dlg()); + equals(btn.length, 0, "all buttons have been removed"); + equals(el.find(".ui-dialog-buttonset").length, 0, "buttonset has been removed"); + equals(el.parent().hasClass('ui-dialog-buttons'), false, "dialog wrapper removes class about having buttons"); el.remove(); }); diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 0183dd801..493783896 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -353,7 +353,10 @@ $.widget("ui.dialog", { button.button(); } }); + self.uiDialog.addClass( "ui-dialog-buttons" ); uiDialogButtonPane.appendTo( self.uiDialog ); + } else { + self.uiDialog.removeClass( "ui-dialog-buttons" ); } }, -- cgit v1.2.3 From f1d939bc589fd8d211e0dc540f7d92cfae94a411 Mon Sep 17 00:00:00 2001 From: michaelmwu Date: Fri, 4 Mar 2011 22:17:30 -0800 Subject: Sortable: Changed floating calculation to determine also whether items are being displayed horizontally. Helps fix odd sorting behavior for horizontal lists. Fixed #6702 - horizontal sortable not working (and solution) --- ui/jquery.ui.sortable.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 05cbf2132..8356eeb9f 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -49,8 +49,8 @@ $.widget("ui.sortable", $.ui.mouse, { //Get the items this.refresh(); - //Let's determine if the items are floating - this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false; + //Let's determine if the items are being displayed horizontally + this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false; //Let's determine the parent's offset this.offset = this.element.offset(); -- cgit v1.2.3 From 74b7c3f684f5d83effcee6d5099c6fffb020fdf9 Mon Sep 17 00:00:00 2001 From: Adam Parod Date: Thu, 17 Feb 2011 15:17:40 -0600 Subject: Datepicker: Reformat minDate/maxDate when dateFormat changes. Fixes #7009 - Reformat minDate/maxDate when dateFormat changes. --- ui/jquery.ui.datepicker.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ui') diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index c23984530..8dd9bf3dc 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -444,7 +444,14 @@ $.extend(Datepicker.prototype, { this._hideDatepicker(); } var date = this._getDateDatepicker(target, true); + var minDate = this._getMinMaxDate(inst, 'min'); + var maxDate = this._getMinMaxDate(inst, 'max'); extendRemove(inst.settings, settings); + // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided + if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined) + inst.settings.minDate = this._formatDate(inst, minDate); + if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined) + inst.settings.maxDate = this._formatDate(inst, maxDate); this._attachments($(target), inst); this._autoSize(inst); this._setDateDatepicker(target, date); -- cgit v1.2.3