mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Datepicker: Removed iframe cover for IE6.
This commit is contained in:
parent
d73edfff76
commit
5bd19650a3
@ -43,15 +43,14 @@ test("widget method", function() {
|
||||
});
|
||||
|
||||
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');
|
||||
@ -78,7 +77,6 @@ test('baseStructure', function() {
|
||||
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
|
||||
@ -100,7 +98,7 @@ test('baseStructure', function() {
|
||||
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)');
|
||||
@ -121,7 +119,7 @@ test('baseStructure', function() {
|
||||
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)');
|
||||
@ -156,7 +154,7 @@ test('baseStructure', function() {
|
||||
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)');
|
||||
@ -168,13 +166,12 @@ test('baseStructure', function() {
|
||||
|
||||
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');
|
||||
|
11
themes/base/jquery.ui.datepicker.css
vendored
11
themes/base/jquery.ui.datepicker.css
vendored
@ -54,14 +54,3 @@
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
21
ui/jquery.ui.datepicker.js
vendored
21
ui/jquery.ui.datepicker.js
vendored
@ -682,23 +682,13 @@ $.extend(Datepicker.prototype, {
|
||||
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;
|
||||
@ -712,10 +702,6 @@ $.extend(Datepicker.prototype, {
|
||||
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];
|
||||
@ -1604,8 +1590,7 @@ $.extend(Datepicker.prototype, {
|
||||
}
|
||||
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;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user