From 0339770320d2a662652652844afea6bc8213378e Mon Sep 17 00:00:00 2001 From: Ca-Phun Ung Date: Mon, 22 Dec 2008 20:24:27 +0000 Subject: Datepicker #3647: Added RTL support to the datepicker theme and reverted markup changes for RTL in r1196 for better semantics. --- ui/ui.datepicker.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'ui') diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js index 026236093..1a64b0b5c 100644 --- a/ui/ui.datepicker.js +++ b/ui/ui.datepicker.js @@ -1343,8 +1343,8 @@ $.extend(Datepicker.prototype, { var thead = ''; for (var dow = 0; dow < 7; dow++) { // days of the week var day = (dow + firstDay) % 7; - thead = (isRTL ? '' : thead) + '= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' + - '' + dayNamesMin[day] + '' + (isRTL ? thead : ''); + thead += '= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' + + '' + dayNamesMin[day] + ''; } calender += thead + ''; var daysInMonth = this._getDaysInMonth(drawYear, drawMonth); @@ -1362,7 +1362,7 @@ $.extend(Datepicker.prototype, { var otherMonth = (printDate.getMonth() != drawMonth); var unselectable = otherMonth || !daySettings[0] || (minDate && printDate < minDate) || (maxDate && printDate > maxDate); - tbody = (isRTL ? '' : tbody) + '= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key @@ -1382,8 +1382,7 @@ $.extend(Datepicker.prototype, { (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') + (printDate.getTime() >= currentDate.getTime() && printDate.getTime() <= endDate.getTime() ? // in current range ' ui-state-active' : '') + // highlight selected day - '" href="#">' + printDate.getDate() + '')) + '' + // display for this month - (isRTL ? tbody : ''); + '" href="#">' + printDate.getDate() + '')) + ''; // display for this month printDate.setDate(printDate.getDate() + 1); printDate = this._daylightSavingAdjust(printDate); } @@ -1395,7 +1394,7 @@ $.extend(Datepicker.prototype, { drawYear++; } calender += '' + (isMultiMonth ? '' : ''); - group = (isRTL ? calender + group : group + calender ); + group += calender; } html += group; } -- cgit v1.2.3