Permalink
Browse files

Add minified version and ie fixes

  • Loading branch information...
1 parent d7ebd74 commit 4fb7569b746e00e7ac6c54773b93ba308da49368 Andy committed Aug 6, 2012
View
@@ -30,6 +30,15 @@
height: 17px;
margin: 6px 6px 0 0;
position: relative;
+ position: absolute\9;
+ /*ie*/
+
+ top: 0\9;
+ /*ie*/
+
+ right: 0\9;
+ /*ie*/
+
width: 17px;
z-index: 10001;
}
@@ -40,6 +49,7 @@
-ms-box-shadow: 1px 1px 2px #1a1a1a;
-o-box-shadow: 1px 1px 2px #1a1a1a;
box-shadow: 1px 1px 2px #1a1a1a;
+ border: 1px solid #000 \9;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
@@ -110,11 +120,11 @@
}
#fade {
background: #000000;
- display: none;
+ display: block;
height: 100%;
left: 0;
- opacity: 0.75;
- filter: alpha(opacity=75);
+ opacity: 0;
+ filter: alpha(opacity=0);
position: fixed;
top: 0;
width: 100%;
@@ -124,6 +134,9 @@
#confirm-lbox {
bottom: 5px;
height: 23px;
+ height: 25px\9;
+ /*ie*/
+
left: 0;
overflow: hidden;
position: absolute;
@@ -159,6 +172,14 @@
margin: 0 auto;
width: 75%;
}
+/*IE7*/
+#input-prompt-lbox-parent {
+ margin: 0 auto;
+ width: 75%;
+}
+#input-prompt-lbox-parent #input-prompt-lbox {
+ width: 100%;
+}
/*title*/
.lbox-title {
font-size: 14px;
View
@@ -112,12 +112,16 @@
height:17px;
margin: 6px 6px 0 0;
position: relative;
+ position:absolute\9; /*ie*/
+ top:0\9;/*ie*/
+ right:0\9;/*ie*/
width: 17px;
z-index: 10001;
}
.lbox {
background: @white;
.box-shadow(1px 1px 2px lighten(@black, 10%));
+ border:1px solid #000 \9;
.border-radius(3px);
display:none;
font-size: @fontSize;
@@ -163,10 +167,10 @@
#fade {
background: @black;
- display: none;
+ display: block;
height: 100%;
left: 0;
- .opacity(75);
+ .opacity(0);
position: fixed;
top: 0;
width: 100%;
@@ -177,6 +181,7 @@
#confirm-lbox{
bottom: 5px;
height: 23px;
+ height: 25px\9;/*ie*/
left:0;
overflow: hidden;
position: absolute;
@@ -208,6 +213,12 @@
margin:0 auto;
width: 75%;
}
+/*IE7*/
+#input-prompt-lbox-parent{
+ margin:0 auto;
+ width: 75%;
+ #input-prompt-lbox{width:100%}
+}
/*title*/
.lbox-title{

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -61,7 +61,7 @@ <h2>A super simple jQuery lite box</h2>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.0.min.js"><\/script>')</script>
<!-- lBox JS -->
-<script src="js/libs/jquery.dreamyLiteBox.js"></script>
+<script src="js/libs/jquery.dreamyLiteBox.min.js"></script>
<!-- Script with the examples for the messages -->
<script>
@@ -74,7 +74,7 @@
var modal = [
'<a id="close-lbox" class="icon-cross">Close</a>',
'<div class="lbox-content">',
- '<input type="text" id="input-prompt-lbox" />',
+ '<input type="text" id="input-prompt-lbox">',
'<div id="confirm-lbox">',
'<button type="button" id="btn-accept" class="btn">Accept</button>',
'<button type="button" id="btn-cancel" class="btn">Cancel</button>',
@@ -92,7 +92,7 @@
modal[5] = (data.opts.useDefaultBtns)?modal[5]:'';
- //Fade in the Popup and add close button
+ //Create the lite box and show it
switch(data.opts.type){
case 'alert':
// Set the modal content
@@ -122,6 +122,9 @@
case 'prompt':
// Set the modal content
lbox.html(modal[0] + modal[7] + modal[1] + msg + modal[6] + modal[2] + modal[3] + modal[4] + modal[5] + modal[6]);
+ if($.browser.msie && $.browser.version < 8){
+ $('#input-prompt-lbox').wrap('<div id="input-prompt-lbox-parent" />')
+ }
// Set the size
$('#confirm-lbox .btn').click(function(){
if($(this).text()=='Accept'){
@@ -151,7 +154,7 @@
if(typeof data.opts.buttons === 'object' && data.opts.buttons !== null){
$.each(data.opts.buttons, function(name, props) {
- props = { click: props, text: name };
+ props = {click: props, text: name};
$('<button type="button" class="btn" id="'+props.text.replace(/\s/g, '')+'">'+props.text+'</button>')
.click(function() {
props.click.apply($this, arguments);
@@ -174,7 +177,7 @@
$('body').append('<div id="fade" />');
$this.bg = $('#fade');
//Fade in the fade layer
- $this.bg.css('background',(data.opts.bg)?data.opts.bgColor:'transparent').fadeIn();
+ $this.bg.css('background',data.opts.bgColor).animate({opacity:(data.opts.bg)?.75:.001});
if(data.opts.type != 'wait'){
bindEvents($this);
}
@@ -253,15 +256,15 @@
})},
//type,message,bg,callback,width,height
- open: function(msg){ return this.each(function() {
+ open: function(msg){return this.each(function() {
var $this = $(this),
data = $this.data(DREAMY_LITE_BOX),
lbox = data.lbox;
data.opts.msg = (msg)?msg:data.opts.msg;
if($.isFunction(data.opts.callbackBeforeOpen))data.opts.callbackBeforeOpen();
openlBox($this, data, lbox);
})},
- close: function(){ return this.each(function() {
+ close: function(){return this.each(function() {
var $this = $(this);
var data = $this.data(DREAMY_LITE_BOX);
var lbox = data.lbox;

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 4fb7569

Please sign in to comment.