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 */ /* @control dialog */
#gollum-dialog-dialog { #gollum-dialog-dialog {
display: none; display: block;
top: 50%;
left: 50%;
overflow: visible; overflow: visible;
position: absolute; position: absolute;
z-index: 1000; top: 50%;
left: 50%;
} }
#gollum-dialog-dialog.active { #gollum-dialog-dialog.active {
@@ -14,14 +13,12 @@
} }
#gollum-dialog-dialog-inner { #gollum-dialog-dialog-inner {
background: transparent;
margin: 0 0 0 -225px; margin: 0 0 0 -225px;
position: relative; position: relative;
width: 450px; width: 450px;
z-index: 1000;
border: 7px solid #999; 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; border-radius: 5px;
-moz-border-radius: 5px; -moz-border-radius: 5px;
-webkit-border-radius: 5px; -webkit-border-radius: 5px;
@@ -32,7 +29,6 @@
overflow: hidden; overflow: hidden;
padding: 1em; 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: -webkit-gradient(linear, left top, left bottom, from(#f7f7f7), to(#ffffff));
background: -moz-linear-gradient(top, #f7f7f7, #ffffff); background: -moz-linear-gradient(top, #f7f7f7, #ffffff);
} }
@@ -53,8 +49,10 @@
} }
#gollum-dialog-dialog-body fieldset { #gollum-dialog-dialog-body fieldset {
display: block;
border: 0; border: 0;
margin: 0; margin: 0;
overflow: hidden;
padding: 0; padding: 0;
} }
+30 -18
View File
@@ -81,6 +81,7 @@
'class="minibutton">Cancel</a>' + 'class="minibutton">Cancel</a>' +
'<a href="#" title="OK" id="gollum-dialog-action-ok" '+ '<a href="#" title="OK" id="gollum-dialog-action-ok" '+
'class="minibutton">OK</a>' + 'class="minibutton">OK</a>' +
'</div>' +
'</div>' + '</div>' +
'</div>' + '</div>' +
'</div>'; '</div>';
@@ -110,12 +111,17 @@
}, },
hide: function() { hide: function() {
$('#gollum-dialog-dialog').animate({ opacity: 0 }, { if ( $.browser.msie ) {
duration: 200, $('#gollum-dialog-dialog').hide().removeClass('active');
complete: function() { $('select').css('visibility', 'visible');
$('#gollum-dialog-dialog').removeClass('active'); } else {
} $('#gollum-dialog-dialog').animate({ opacity: 0 }, {
}); duration: 200,
complete: function() {
$('#gollum-dialog-dialog').removeClass('active');
}
});
}
}, },
init: function( argObject ) { init: function( argObject ) {
@@ -159,16 +165,23 @@
debug('Dialog: No markup to show. Please use init first.'); debug('Dialog: No markup to show. Please use init first.');
} else { } else {
debug('Showing dialog'); debug('Showing dialog');
$('#gollum-dialog-dialog').animate({ opacity: 0 }, { if ( $.browser.msie ) {
duration: 1, $('#gollum-dialog.dialog').addClass('active');
complete: function() { Dialog.position();
$('#gollum-dialog-dialog').addClass('active'); $('select').css('visibility', 'hidden');
Dialog.position(); // position this thing } else {
$('#gollum-dialog-dialog').animate({ opacity: 1 }, { $('#gollum-dialog.dialog').css('display', 'none');
duration: 500 $('#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) { var debug = function(m) {
if ( Dialog.debugOn if ( Dialog.debugOn
&& typeof console != 'undefined' && typeof console != 'undefined' ) {
&& typeof console.log == 'function' ) {
console.log( m ); console.log( m );
} }
}; };