Skip to content
Permalink
Browse files

replacing bgiframe with ui.stackfix, updated dialog and its demos acc…

…ordingly
  • Loading branch information
jzaefferer committed Jul 9, 2009
1 parent f51cdf2 commit a2899b145feecfae98b2338e5b8f5e0415efa76b
@@ -7,14 +7,14 @@
<script type="text/javascript" src="../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.stackfix.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
<script type="text/javascript" src="../../ui/effects.core.js"></script>
<script type="text/javascript" src="../../ui/effects.blind.js"></script>
<script type="text/javascript" src="../../ui/effects.explode.js"></script>
<script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$.ui.dialog.defaults.bgiframe = true;
$.ui.dialog.defaults.stackfix = true;
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function() {
@@ -8,10 +8,9 @@
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
<script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$.ui.dialog.defaults.bgiframe = true;
$.ui.dialog.defaults.stackfix = true;
$(function() {
$("#dialog").dialog();
});
@@ -7,13 +7,13 @@
<script type="text/javascript" src="../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.stackfix.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
<script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#dialog").dialog({
bgiframe: true,
stackfix: true,
resizable: false,
height:140,
modal: true,
@@ -7,10 +7,10 @@
<script type="text/javascript" src="../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.stackfix.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
<script type="text/javascript" src="../../ui/effects.core.js"></script>
<script type="text/javascript" src="../../ui/effects.highlight.js"></script>
<script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<style type="text/css">
body { font-size: 62.5%; }
@@ -64,7 +64,7 @@
}

$("#dialog").dialog({
bgiframe: true,
stackfix: true,
autoOpen: false,
height: 300,
modal: true,
@@ -7,13 +7,13 @@
<script type="text/javascript" src="../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.stackfix.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
<script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#dialog").dialog({
bgiframe: true,
stackfix: true,
modal: true,
buttons: {
Ok: function() {
@@ -7,13 +7,13 @@
<script type="text/javascript" src="../../ui/ui.core.js"></script>
<script type="text/javascript" src="../../ui/ui.draggable.js"></script>
<script type="text/javascript" src="../../ui/ui.resizable.js"></script>
<script type="text/javascript" src="../../ui/ui.stackfix.js"></script>
<script type="text/javascript" src="../../ui/ui.dialog.js"></script>
<script type="text/javascript" src="../../external/jquery.bgiframe-2.1.1.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<script type="text/javascript">
$(function() {
$("#dialog").dialog({
bgiframe: true,
stackfix: true,
height: 140,
modal: true
});
@@ -6,8 +6,8 @@
<link type="text/css" href="../themes/base/ui.all.css" rel="stylesheet" />
<link type="text/css" href="demos.css" rel="stylesheet" />
<script type="text/javascript" src="../jquery-1.3.2.js"></script>
<script type="text/javascript" src="../external/jquery.bgiframe-2.1.1.js"></script>
<script type="text/javascript" src="../ui/ui.core.js"></script>
<script type="text/javascript" src="../ui/ui.stackfix.js"></script>
<script type="text/javascript" src="../ui/ui.accordion.js"></script>
<script type="text/javascript" src="../ui/ui.datepicker.js"></script>
<script type="text/javascript" src="../ui/ui.dialog.js"></script>

This file was deleted.

@@ -134,7 +134,7 @@ $.widget("ui.dialog", {
self._createButtons(options.buttons);
self._isOpen = false;

(options.bgiframe && $.fn.bgiframe && uiDialog.bgiframe());
(options.stackfix && $.fn.stackfix && uiDialog.stackfix());
(options.autoOpen && self.open());
},

@@ -526,7 +526,7 @@ $.extend($.ui.dialog, {
version: "@VERSION",
defaults: {
autoOpen: true,
bgiframe: false,
stackfix: false,
buttons: {},
closeOnEscape: true,
closeText: 'close',
@@ -596,7 +596,7 @@ $.extend($.ui.dialog.overlay, {
height: this.height()
});

(dialog.options.bgiframe && $.fn.bgiframe && $el.bgiframe());
(dialog.options.stackfix && $.fn.stackfix && $el.stackfix());

this.instances.push($el);
return $el;
@@ -0,0 +1,46 @@
/*
* jQuery UI Stackfix @VERSION
*
* Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
* to be replaced with...?
* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
*
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/Plugins/bgiframe
* to be moved to...?
* http://docs.jquery.com/UI/Stackfix
*
*/

(function($){

// This is only for IE6
$.fn.stackfix = $.browser.msie && /6.0/.test(navigator.userAgent) ? function(s) {
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 prop = function(n){return n&&n.constructor==Number?n+'px':n;},
html = '<iframe class="ui-stackfix"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 ( $('> iframe.ui-stackfix', this).length == 0 )
this.insertBefore( document.createElement(html), this.firstChild );
});
} : function() {
return this;
};

})(jQuery);

0 comments on commit a2899b1

Please sign in to comment.
You can’t perform that action at this time.