# HG changeset patch # User Anthony Ly # Date 1372263675 -7200 # Node ID a1656f70f1c9a38a0d87ed93aaf9a0154de1a503 # Parent b4377a741714da16a90b3f7daaa8b9108590e8c6 center modal diff -r b4377a741714 -r a1656f70f1c9 integration/css/style.css --- a/integration/css/style.css Tue Jun 25 10:46:42 2013 +0200 +++ b/integration/css/style.css Wed Jun 26 18:21:15 2013 +0200 @@ -132,6 +132,8 @@ .links-rows .help-inline{display: none;} .shadow {background-color: #54D0ED !important;} +.modal{width: auto !important; display: inline-block;} +.modal.popup{height: auto; left: none; margin-left: 0; width: auto;} /* Tangle */ .time-tangle {color: #2c3e50; cursor: w-resize; position: relative;border-bottom: 1px dashed #2c3e50;} diff -r b4377a741714 -r a1656f70f1c9 integration/js/common.js --- a/integration/js/common.js Tue Jun 25 10:46:42 2013 +0200 +++ b/integration/js/common.js Wed Jun 26 18:21:15 2013 +0200 @@ -4,6 +4,13 @@ return this.attr(name) !== undefined; }; + $('.modal').on('show', function () { + var halfWidth = $(this).width() / 2; + $(this).css({ + 'margin-left' : - halfWidth +'px' + }); + }); + //open modal $(document).on('click', 'a.open-modal', function(e){ e.preventDefault();