broken style when MessageBox overflow
This commit is contained in:
parent
c08786d801
commit
c72651143b
@ -11,8 +11,10 @@
|
|||||||
.mbox_body {
|
.mbox_body {
|
||||||
min-width: 350px;
|
min-width: 350px;
|
||||||
min-height: 100px;
|
min-height: 100px;
|
||||||
|
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
max-height: 600px;
|
max-height: 600px;
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: rgba( 0, 0, 0, 0.8 );
|
background-color: rgba( 0, 0, 0, 0.8 );
|
||||||
|
|
||||||
@ -34,6 +36,7 @@
|
|||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
color: white;
|
color: white;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
/*
|
/*
|
||||||
-moz-box-shadow: inset 0 10px 10px -10px black;
|
-moz-box-shadow: inset 0 10px 10px -10px black;
|
||||||
-webkit-box-shadow: inset 0 10px 10px -10px black;
|
-webkit-box-shadow: inset 0 10px 10px -10px black;
|
||||||
@ -41,6 +44,13 @@
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mbox-inners {
|
||||||
|
/* This is to hide the scrollbar */
|
||||||
|
padding-right: 50%;
|
||||||
|
margin-right: -50%;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
.mbox_buttons {
|
.mbox_buttons {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding: 1em 0.5em;
|
padding: 1em 0.5em;
|
||||||
|
@ -79,8 +79,8 @@
|
|||||||
"mbox_body cubic500"
|
"mbox_body cubic500"
|
||||||
, [
|
, [
|
||||||
Dand.wrapc( "mbox_titlebar flsf", title )
|
Dand.wrapc( "mbox_titlebar flsf", title )
|
||||||
, Dand.wrapc( "mbox_content", content )
|
, Dand.wrapc( "mbox_content", this.innerBox = Dand.wrapc( "mbox-inners", content ) )
|
||||||
, Dand.wrapc( "mbox_buttons", no ? [ _yes, _no ] : _yes )
|
, this.buttonBox = Dand.wrapc( "mbox_buttons", no ? [ _yes, _no ] : _yes )
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -106,9 +106,21 @@
|
|||||||
, function()
|
, function()
|
||||||
{
|
{
|
||||||
m_style.transition = m_style.minHeight = m_style.height = m_style.overflow = "";
|
m_style.transition = m_style.minHeight = m_style.height = m_style.overflow = "";
|
||||||
m_style.marginTop = String( -0.5 * this.mbox.clientHeight ) + "px";
|
|
||||||
|
var bBox = this.buttonBox;
|
||||||
|
var mHeight = this.mbox.clientHeight;
|
||||||
|
var innerHeight = this.innerBox.clientHeight;
|
||||||
|
var bBoxHeight = bBox.clientHeight;
|
||||||
|
|
||||||
|
m_style.marginTop = ( -0.5 * mHeight ) + "px";
|
||||||
|
|
||||||
m_style.opacity = 1;
|
m_style.opacity = 1;
|
||||||
|
if( mHeight < ( bBox.getBoundingClientRect().y - bBox.parentNode.getBoundingClientRect().y + bBoxHeight ) )
|
||||||
|
{
|
||||||
|
m_style.height = "100%";
|
||||||
|
this.innerBox.style.maxHeight = ( innerHeight - bBoxHeight ) + "px"
|
||||||
|
}
|
||||||
|
|
||||||
}.bind( this )
|
}.bind( this )
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
/** @type {System.Cycle} */
|
/** @type {System.Cycle} */
|
||||||
var Cycle = __import( "System.Cycle" );
|
var Cycle = __import( "System.Cycle" );
|
||||||
|
/** @type {System.Debug} */
|
||||||
|
var debug = __import( "System.Debug" );
|
||||||
|
|
||||||
// trigger list
|
// trigger list
|
||||||
var tList = [];
|
var tList = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user