Merge "Simplify "Usage box" and layout adjustments"

This commit is contained in:
jenkins-bot 2014-03-12 16:27:33 +00:00 committed by Gerrit Code Review
commit 54a699fe33
4 changed files with 18 additions and 20 deletions

View file

@ -79,6 +79,7 @@
.mlb-post-image { .mlb-post-image {
bottom: auto; bottom: auto;
height: auto; height: auto;
color: #333333;
background-color: @metadata-background; background-color: @metadata-background;
position: absolute; position: absolute;
min-height: (@bottom-height + 1); min-height: (@bottom-height + 1);
@ -162,6 +163,7 @@ body.mobile .mw-mlb-controls,
width: 100%; width: 100%;
background-color: #fbfbfb; background-color: #fbfbfb;
position: relative; position: relative;
padding-top: 10px;
} }
.jq-fullscreened .mw-mlb-image-metadata { .jq-fullscreened .mw-mlb-image-metadata {
@ -183,7 +185,7 @@ body.mobile .mw-mlb-controls,
margin-bottom: 15px; margin-bottom: 15px;
} }
@littlefont: 0.8em; @littlefont: 0.85em;
@mediumfont: 1em; @mediumfont: 1em;
.mw-mlb-caption, .mw-mlb-caption,
@ -193,6 +195,7 @@ body.mobile .mw-mlb-controls,
} }
.mw-mlb-image-links { .mw-mlb-image-links {
margin-left: 20px;
li { li {
list-style: none; list-style: none;
font-size: @littlefont; font-size: @littlefont;

View file

@ -1,12 +1,9 @@
@import "mmv.mixins"; @import "mmv.mixins";
.mw-mlb-fileusage-container { .mw-mlb-fileusage-container {
@box-color: #FFFFFF; @border-color: #DDDDDD;
@heading-color: #F8F8F8;
@inner-border-color: #EEEEEE;
@outer-border-color: #DDDDDD;
@box-shadow-color: #C9C9C9;
@info-color: #565656; @info-color: #565656;
@dark-text: #333333;
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
@ -18,34 +15,32 @@
h3 { h3 {
margin-left: 20px; margin-left: 20px;
margin-top: 20px;
color: @info-color; color: @info-color;
font-weight: normal; font-weight: normal;
font-size: 1.1em; font-size: 1em;
} }
ul { ul {
margin: 0 20px; margin: 0 20px;
border: 1px solid @outer-border-color;
border-bottom: 2px solid @box-shadow-color;
.box-round(3px); .box-round(3px);
font-size: 0.85em;
} }
li { li {
list-style: none; list-style: none;
overflow: hidden; overflow: hidden;
border-bottom: 1px solid @inner-border-color; padding: 3px 5px 3px 0;
padding: 3px 5px 3px 15px;
margin: 0; margin: 0;
font-size: 0.8em;
background-color: @box-color;
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
&.mw-mlb-fileusage-local-section, &.mw-mlb-fileusage-global-section, &.mw-mlb-fileusage-view-all { &.mw-mlb-fileusage-local-section, &.mw-mlb-fileusage-global-section, &.mw-mlb-fileusage-view-all {
color: @info-color; color: @dark-text;
background-color: @heading-color; border-bottom: 1px solid @border-color;
margin: 3px 0;
} }
aside { aside {
display: inline-block; display: inline-block;

View file

@ -683,7 +683,7 @@
* Toggles the metadata div being totally visible. * Toggles the metadata div being totally visible.
*/ */
MPP.toggle = function ( forceDirection ) { MPP.toggle = function ( forceDirection ) {
var scrollTopWhenOpen = this.$container.height() - this.$controlBar.height(), var scrollTopWhenOpen = this.$container.outerHeight() - this.$controlBar.outerHeight(),
scrollTopTarget = $.scrollTo().scrollTop() > 0 ? 0 : scrollTopWhenOpen; scrollTopTarget = $.scrollTo().scrollTop() > 0 ? 0 : scrollTopWhenOpen;
if ( forceDirection ) { if ( forceDirection ) {

View file

@ -287,8 +287,8 @@
$document.trigger( keydown ); $document.trigger( keydown );
assert.strictEqual( Math.round( $.scrollTo().scrollTop() ), assert.strictEqual( Math.round( $.scrollTo().scrollTop() ),
lightbox.panel.$imageMetadata.height() + 1, lightbox.panel.$imageMetadata.outerHeight(),
'scrollTo scrollTop should be set to the metadata height + 1 after pressing up arrow' ); 'scrollTo scrollTop should be set to the metadata height after pressing up arrow' );
assert.ok( lightbox.panel.$dragIcon.hasClass( 'pointing-down' ), assert.ok( lightbox.panel.$dragIcon.hasClass( 'pointing-down' ),
'Chevron pointing down after pressing up arrow' ); 'Chevron pointing down after pressing up arrow' );
assert.ok( localStorage.getItem( 'mmv.hasOpenedMetadata' ), assert.ok( localStorage.getItem( 'mmv.hasOpenedMetadata' ),
@ -305,8 +305,8 @@
lightbox.panel.$dragIcon.click(); lightbox.panel.$dragIcon.click();
assert.strictEqual( Math.round( $.scrollTo().scrollTop() ), assert.strictEqual( Math.round( $.scrollTo().scrollTop() ),
lightbox.panel.$imageMetadata.height() + 1, lightbox.panel.$imageMetadata.outerHeight(),
'scrollTo scrollTop should be set to the metadata height + 1 after clicking the chevron once' ); 'scrollTo scrollTop should be set to the metadata height after clicking the chevron once' );
assert.ok( lightbox.panel.$dragIcon.hasClass( 'pointing-down' ), assert.ok( lightbox.panel.$dragIcon.hasClass( 'pointing-down' ),
'Chevron pointing down after clicking the chevron once' ); 'Chevron pointing down after clicking the chevron once' );