Skip to content

Commit

Permalink
External: Updated bgiframe to 2.1.2. Fixes #6190 - Dialog demos don't…
Browse files Browse the repository at this point in the history
… work in IE9 because of bgiframe.
  • Loading branch information
scottgonzalez committed Oct 20, 2010
1 parent 72985fb commit 7d9d2b5
Show file tree
Hide file tree
Showing 22 changed files with 59 additions and 30 deletions.
2 changes: 1 addition & 1 deletion demos/dialog/animated.html
Expand Up @@ -5,7 +5,7 @@
<title>jQuery UI Dialog - Animation</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.4.2.js"></script>
<script src="../../external/jquery.bgiframe-2.1.1.js"></script>
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion demos/dialog/default.html
Expand Up @@ -5,7 +5,7 @@
<title>jQuery UI Dialog - Default functionality</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.4.2.js"></script>
<script src="../../external/jquery.bgiframe-2.1.1.js"></script>
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion demos/dialog/modal-confirmation.html
Expand Up @@ -5,7 +5,7 @@
<title>jQuery UI Dialog - Modal confirmation</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.4.2.js"></script>
<script src="../../external/jquery.bgiframe-2.1.1.js"></script>
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion demos/dialog/modal-form.html
Expand Up @@ -5,7 +5,7 @@
<title>jQuery UI Dialog - Modal form</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.4.2.js"></script>
<script src="../../external/jquery.bgiframe-2.1.1.js"></script>
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion demos/dialog/modal-message.html
Expand Up @@ -5,7 +5,7 @@
<title>jQuery UI Dialog - Modal message</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.4.2.js"></script>
<script src="../../external/jquery.bgiframe-2.1.1.js"></script>
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion demos/dialog/modal.html
Expand Up @@ -5,7 +5,7 @@
<title>jQuery UI Dialog - Basic modal</title>
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.4.2.js"></script>
<script src="../../external/jquery.bgiframe-2.1.1.js"></script>
<script src="../../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
<script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion demos/index.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="demos.css">
<script src="../jquery-1.4.2.js"></script>
<script src="../external/jquery.bgiframe-2.1.1.js"></script>
<script src="../external/jquery.bgiframe-2.1.2.js"></script>
<script src="../ui/jquery.ui.core.js"></script>
<script src="../ui/jquery.ui.widget.js"></script>
<script src="../ui/jquery.ui.mouse.js"></script>
Expand Down
10 changes: 0 additions & 10 deletions external/jquery.bgiframe-2.1.1.js

This file was deleted.

39 changes: 39 additions & 0 deletions external/jquery.bgiframe-2.1.2.js
@@ -0,0 +1,39 @@
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
* Licensed under the MIT License (LICENSE.txt).
*
* Version 2.1.2
*/

(function($){

$.fn.bgiframe = ($.browser.msie && /msie 6\.0/i.test(navigator.userAgent) ? function(s) {

This comment has been minimized.

Copy link
@psema4

psema4 Jun 2, 2011

Just wondering, is there a reason for using a regex on navigator.userAgent instead of using $.browser.version (as mentioned here)? For some time now (on the order of years) I've heard that navigator.userAgent is evil and an unreliable legacy property that should not be relied upon for anything.

This comment has been minimized.

Copy link
@scottgonzalez

scottgonzalez Jun 3, 2011

Author Member

I don't know why this is done, it's an external plugin. But to get to your real question, jQuery.browser isn't anything special, it parses navigator.userAgent.

This comment has been minimized.

Copy link
@psema4

psema4 Jun 4, 2011

Interesting, haven't read through the jQuery sources. Thanks for the info.

s = $.extend({
top : 'auto', // auto == .currentStyle.borderTopWidth
left : 'auto', // auto == .currentStyle.borderLeftWidth
width : 'auto', // auto == offsetWidth
height : 'auto', // auto == offsetHeight
opacity : true,
src : 'javascript:false;'
}, s);
var html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
'style="display:block;position:absolute;z-index:-1;'+
(s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
'"/>';
return this.each(function() {
if ( $(this).children('iframe.bgiframe').length === 0 )
this.insertBefore( document.createElement(html), this.firstChild );
});
} : function() { return this; });

// old alias
$.fn.bgIframe = $.fn.bgiframe;

function prop(n) {
return n && n.constructor === Number ? n + 'px' : n;
}

})(jQuery);
2 changes: 1 addition & 1 deletion tests/unit/dialog/dialog.html
Expand Up @@ -7,7 +7,7 @@
<link type="text/css" href="../../../themes/base/jquery.ui.dialog.css" rel="stylesheet" />

<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_on_page_with_large_dom.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_on_page_with_scrollbars.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_option_buttons_OK_Cancel.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_option_closeOnEscape_false.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_option_closeOnEscape_true.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_option_modal_false.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_option_modal_true.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_option_position_right_top.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_ticket_4350.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.mouse.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/dialog/dialog_ticket_4826.html
Expand Up @@ -6,7 +6,7 @@
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.4.2.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.draggable.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion tests/visual/menu/nested.html
Expand Up @@ -9,7 +9,7 @@
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.position.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.autocomplete.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../../../external/jquery.bgiframe-2.1.2.js"></script>
<script type="text/javascript" src="http://jqueryui.com/themeroller/themeswitchertool/"></script>
<script type="text/javascript">
$(function() {
Expand Down

0 comments on commit 7d9d2b5

Please sign in to comment.