});
test('baseStructure', function() {
- expect( 59 );
+ expect( 58 );
var header, title, table, thead, week, panel, inl, child,
inp = init('#inp').focus(),
- dp = $('#ui-datepicker-div'),
- iframe = ($.ui.ie6);
+ dp = $('#ui-datepicker-div');
ok(dp.is(':visible'), 'Structure - datepicker visible');
ok(!dp.is('.ui-datepicker-rtl'), 'Structure - not right-to-left');
ok(!dp.is('.ui-datepicker-multi'), 'Structure - not multi-month');
- equal(dp.children().length, 2 + (iframe ? 1 : 0), 'Structure - child count');
+ equal(dp.children().length, 2, 'Structure - child count');
header = dp.children(':first');
ok(header.is('div.ui-datepicker-header'), 'Structure - header division');
equal(week.children().length, 7, 'Structure - week child count');
ok(week.children(':first').is('td.ui-datepicker-week-end'), 'Structure - month table first day cell');
ok(week.children(':last').is('td.ui-datepicker-week-end'), 'Structure - month table second day cell');
- ok(dp.children('iframe').length === (iframe ? 1 : 0), 'Structure - iframe');
inp.datepicker('hide').datepicker('destroy');
// Editable month/year and button panel
inp = init('#inp', {numberOfMonths: 2});
inp.focus();
ok(dp.is('.ui-datepicker-multi'), 'Structure multi [2] - multi-month');
- equal(dp.children().length, 3 + (iframe ? 1 : 0), 'Structure multi [2] - child count');
+ equal(dp.children().length, 3, 'Structure multi [2] - child count');
child = dp.children(':first');
ok(child.is('div.ui-datepicker-group') && child.is('div.ui-datepicker-group-first'), 'Structure multi [2] - first month division');
child = dp.children(':eq(1)');
inp = init('#inp', {numberOfMonths: [2, 2]});
inp.focus();
ok(dp.is('.ui-datepicker-multi'), 'Structure multi - multi-month');
- equal(dp.children().length, 6 + (iframe ? 1 : 0), 'Structure multi [2,2] - child count');
+ equal(dp.children().length, 6, 'Structure multi [2,2] - child count');
child = dp.children(':first');
ok(child.is('div.ui-datepicker-group') && child.is('div.ui-datepicker-group-first'), 'Structure multi [2,2] - first month division');
child = dp.children(':eq(1)');
inl = init('#inl', {numberOfMonths: 2});
dp = inl.children();
ok(dp.is('.ui-datepicker-inline') && dp.is('.ui-datepicker-multi'), 'Structure inline multi - main div');
- equal(dp.children().length, 3 + (iframe ? 1 : 0), 'Structure inline multi - child count');
+ equal(dp.children().length, 3, 'Structure inline multi - child count');
child = dp.children(':first');
ok(child.is('div.ui-datepicker-group') && child.is('div.ui-datepicker-group-first'), 'Structure inline multi - first month division');
child = dp.children(':eq(1)');
test('customStructure', function() {
expect( 20 );
- var iframe, header, panel, title, thead,
+ var header, panel, title, thead,
dp = $('#ui-datepicker-div'),
// Check right-to-left localisation
inp = init('#inp', $.datepicker.regional.he);
inp.data('showButtonPanel.datepicker',true);
inp.focus();
- iframe = ($.ui.ie6);
ok(dp.is('.ui-datepicker-rtl'), 'Structure RTL - right-to-left');
header = dp.children(':first');
ok(header.is('div.ui-datepicker-header'), 'Structure RTL - header division');
if (!inst.inline) {
var showAnim = $.datepicker._get(inst, 'showAnim');
var duration = $.datepicker._get(inst, 'duration');
- var postProcess = function() {
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
- if( !! cover.length ){
- var borders = $.datepicker._getBorders(inst.dpDiv);
- cover.css({left: -borders[0], top: -borders[1],
- width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
- }
- };
inst.dpDiv.zIndex($(input).zIndex()+1);
$.datepicker._datepickerShowing = true;
if ( $.effects && $.effects.effect[ showAnim ] )
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
+ inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration);
else
- inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
- if (!showAnim || !duration)
- postProcess();
+ inst.dpDiv[showAnim || 'show'](showAnim ? duration : null);
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
inst.input.focus();
$.datepicker._curInst = inst;
instActive = inst; // for delegate hover events
inst.dpDiv.empty().append(this._generateHTML(inst));
this._attachHandlers(inst);
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
- if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
- cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
- }
inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
var numMonths = this._getNumberOfMonths(inst);
var cols = numMonths[1];
}
html += group;
}
- html += buttonPanel + ($.ui.ie6 && !inst.inline ?
- '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
+ html += buttonPanel;
inst._keyEvent = false;
return html;
},