index.html
Código HTML:
Ver original
<!DOCTYPE html> <html> <head> <meta name='author' content='Eric Martin' /> <meta name='copyright' content='2010 - Eric Martin' /> <link type='text/css' href='css/demo.css' rel='stylesheet' media='screen' /> <link type='text/css' href='css/osx.css' rel='stylesheet' media='screen' /> <link type='text/css' href='css/estilos.css' rel='stylesheet' media='screen' /> </head> <body> <div id='container'> <div id='logo'> </div> <div id='content'> <div id='osx-modal'> </div> <div class="tabla osx" id="tabla"> <div class="fila osx"> </div> <div class="fila osx" id="fila1" onclick="setId(id)"> <div id="osx-modal-data"> </div> </div> <div class="fila osx" id="fila2"> <div id="osx-modal-data"> </div> </div> <div class="fila osx" id="fila3"> <div id="osx-modal-data"> </div> </div> <div class="fila osx" id="fila4"> <div id="osx-modal-data"> </div> </div> </div> </div> </div> </body> </html>
Los css:
estilos.css
Código CSS:
Ver original
div.tabla { clear: none; overflow: auto; } div.fila { clear: both; } div.col_titulo1 { float: left; padding: 5px; background: #F0E0A0; border-color: black; border-style: solid; border-right-width: 0px; border-left-width: 1px; border-top-width: 1px; border-bottom-width: 1px; } div.col_titulo2 { float: left; padding: 5px; background: #F0E0A0; border-color: black; border-style: solid; border-right-width: 0px; border-left-width: 1px; border-top-width: 1px; border-bottom-width: 1px; } div.col_titulo3 { float: left; padding: 5px; background: #F0E0A0; border-color: black; border-style: solid; border-right-width: 1px; border-left-width: 1px; border-top-width: 1px; border-bottom-width: 1px; } div.col1 { float: left; padding: 5px; border-color: #F0E0A0; border-style: solid; border-right-width: 0px; border-left-width: 1px; border-top-width: 0px; border-bottom-width: 1px; } div.col2 { float: left; padding: 5px; border-color: #F0E0A0; border-style: solid; border-right-width: 0px; border-left-width: 1px; border-top-width: 0px; border-bottom-width: 1px; } div.col3 { float: left; padding: 5px; border-color: #F0E0A0; border-style: solid; border-right-width: 1px; border-left-width: 1px; border-top-width: 0px; border-bottom-width: 1px; } .fila {font-size:12px; padding:0px 10px;}
demo.css
Código CSS:
Ver original
body {background:#fff; color:#333; font: 12px/22px verdana, arial, sans-serif; height:100%; margin:0 auto; width:100%;} h1 {color:#3a6d8c; font-size:34px; line-height:40px; margin:0;} h3 { color:#3a6d8c; font-size:22px; line-height:26px; font-weight:normal; margin:0 0 8px 0;} img {border:0;} #logo {margin:20px 350px; margin-bottom:20px; width:300px;} #logo h1 {color:#666; letter-spacing:-1px; font-weight:normal;} #logo h1 span {color:#444; font-weight:bold;} #logo .center {align:center; color:#999; font-size:12px;} #container {align:center; margin:0 auto; padding-top:20px; width:960px;} #content {align:center; border-bottom:1px dotted #999; border-top:1px dotted #999; padding:20px 0;} #footer {clear:left; color:#888; margin:20px 0;} #footer a:link, #footer a:visited {color:#888; text-decoration:none;} #footer a:hover {color:#333; text-decoration:underline;}
osx.css
Código CSS:
Ver original
#osx-modal-content, #osx-modal-data, #osx-modal-title, #cerrar {display:none;} #osx-overlay {background-color:#000; cursor:wait;} #osx-container {background-color:#eee; color:#000; font: 16px/24px "Lucida Grande",Arial,sans-serif; padding-bottom:4px; width:600px; -moz-border-radius-bottomleft:6px; -webkit-border-bottom-left-radius:6px; -moz-border-radius-bottomright:6px; -webkit-border-bottom-right-radius:6px; border-radius:0 0 6px 6px; -moz-box-shadow:0 0 64px #000; -webkit-box-shadow:0 0 64px #000;} #osx-container a {color:#ddd;} #osx-container #osx-modal-title {color:#000; font-weight:bold; } #osx-container .close {display:none; position:absolute; right:0; top:0;} #osx-modal-data {display:none; position:absolute; left:10px; top:90px;} #osx-container .close a {display:block; color:#777; font-weight:bold; padding:6px 12px 0px; text-decoration:none; text-shadow:0 1px 0 #f4f4f4;} #osx-container .close a:hover {color:#000;} #osx-container h2 {margin:10px 10px 6px;} #osx-container p {margin-bottom:0px;} #osx-container span {color:#777;}
el javascript
eventomodal.js
Código Javascript:
Ver original
jQuery(function ($) { var id=""; var OSX = { container: null, init: function () { $("#fila1.osx, #fila2.osx, #fila3.osx, #fila4.osx").click(function (e) { id=$(this); e.preventDefault(); $(id).modal({ overlayId: 'osx-overlay', containerId: 'osx-container', closeHTML: null, minHeight: 80, opacity: 65, position: ['0',], overlayClose: true, onOpen: OSX.open, onClose: OSX.close }); }); }, open: function (d) { var self = this; self.container = d.container[0]; d.overlay.fadeIn('slow', function () { var fila = $(id, self.container); var title = $("#osx-modal-title", self.container); fila.show(); title.show(); d.container.slideDown('slow', function () { setTimeout(function () { var h = $("#osx-modal-data", self.container).height() + title.height() + 50; // padding d.container.animate( {height: h}, 200, function () { $("div.close", self.container).show(); $("#osx-modal-data", self.container).show(); } ); }, 500); }); }) }, close: function (d) { var self = this; // this = SimpleModal object d.container.animate( {top:"-" + (d.container.height() + 20)}, 500, function () { self.close(); // or $.modal.close(); } ); } }; OSX.init(); });