Get dialogs working in IE

This commit is contained in:
Eston Bond
2010-12-07 14:04:06 -08:00
parent 5cb54e0a36
commit 2c932cee5d
2 changed files with 36 additions and 26 deletions
+6 -8
View File
@@ -1,12 +1,11 @@
/* @control dialog */
#gollum-dialog-dialog {
display: none;
top: 50%;
left: 50%;
display: block;
overflow: visible;
position: absolute;
z-index: 1000;
top: 50%;
left: 50%;
}
#gollum-dialog-dialog.active {
@@ -14,14 +13,12 @@
}
#gollum-dialog-dialog-inner {
background: transparent;
margin: 0 0 0 -225px;
position: relative;
width: 450px;
z-index: 1000;
border: 7px solid #999;
border: 7px solid rgba(0, 0, 0, 0.3);
border: 7px solid rgba(0, 0, 0, 0.3);
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
@@ -32,7 +29,6 @@
overflow: hidden;
padding: 1em;
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#f7f7f7', endColorstr='#ffffff');
background: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#ffffff));
background: -moz-linear-gradient(top, #f7f7f7, #ffffff);
}
@@ -53,8 +49,10 @@
}
#gollum-dialog-dialog-body fieldset {
display: block;
border: 0;
margin: 0;
overflow: hidden;
padding: 0;
}
+30 -18
View File
@@ -81,6 +81,7 @@
'class="minibutton">Cancel</a>' +
'<a href="#" title="OK" id="gollum-dialog-action-ok" '+
'class="minibutton">OK</a>' +
'</div>' +
'</div>' +
'</div>' +
'</div>';
@@ -110,12 +111,17 @@
},
hide: function() {
$('#gollum-dialog-dialog').animate({ opacity: 0 }, {
duration: 200,
complete: function() {
$('#gollum-dialog-dialog').removeClass('active');
}
});
if ( $.browser.msie ) {
$('#gollum-dialog-dialog').hide().removeClass('active');
$('select').css('visibility', 'visible');
} else {
$('#gollum-dialog-dialog').animate({ opacity: 0 }, {
duration: 200,
complete: function() {
$('#gollum-dialog-dialog').removeClass('active');
}
});
}
},
init: function( argObject ) {
@@ -159,16 +165,23 @@
debug('Dialog: No markup to show. Please use init first.');
} else {
debug('Showing dialog');
$('#gollum-dialog-dialog').animate({ opacity: 0 }, {
duration: 1,
complete: function() {
$('#gollum-dialog-dialog').addClass('active');
Dialog.position(); // position this thing
$('#gollum-dialog-dialog').animate({ opacity: 1 }, {
duration: 500
});
}
});
if ( $.browser.msie ) {
$('#gollum-dialog.dialog').addClass('active');
Dialog.position();
$('select').css('visibility', 'hidden');
} else {
$('#gollum-dialog.dialog').css('display', 'none');
$('#gollum-dialog-dialog').animate({ opacity: 0 }, {
duration: 0,
complete: function() {
$('#gollum-dialog-dialog').css('display', 'block');
Dialog.position(); // position this thing
$('#gollum-dialog-dialog').animate({ opacity: 1 }, {
duration: 500
});
}
});
}
}
},
@@ -183,8 +196,7 @@
var debug = function(m) {
if ( Dialog.debugOn
&& typeof console != 'undefined'
&& typeof console.log == 'function' ) {
&& typeof console != 'undefined' ) {
console.log( m );
}
};