Misc UI fixes

* Fix the columns breaking when language name breaks to new line
* Fix the Map highlighting when no region id in viewport.
* Correction of color codes, margins according to design.

Change-Id: I0121de92bdf5340bf2365c3b7d6045ef963e6d2a
This commit is contained in:
Santhosh Thottingal
2012-07-02 17:46:04 +05:30
committed by Niklas Laxström
parent 566651b9f6
commit 5625f6eb70
3 changed files with 52 additions and 29 deletions

View File

@@ -30,6 +30,11 @@
background-clip: padding-box; background-clip: padding-box;
} }
.uls-menu a {
font-weight: normal;
color: #0088CC;
}
.uls-menu-header { .uls-menu-header {
margin: 2%; margin: 2%;
margin-top: 20px; margin-top: 20px;
@@ -44,7 +49,7 @@
} }
.uls-menu-header-left h1 { .uls-menu-header-left h1 {
font-weight: bold; font-weight: normal;
padding-top: 12px; padding-top: 12px;
border:none; border:none;
padding-bottom: 3px; padding-bottom: 3px;
@@ -93,25 +98,6 @@
cursor: pointer; cursor: pointer;
} }
/* Language list */
.uls-language-list {
height: 300px;
overflow: auto;
margin-top: 2%;
}
.uls-language-list ul li {
font-weight: bold;
}
.uls-language-list strong {
text-decoration: underline;
}
.uls-language-list a {
color: #0645AD;
}
input#languagefilter { input#languagefilter {
height: 20px; height: 20px;
border: 1px solid #0E90D2; border: 1px solid #0E90D2;

View File

@@ -1,16 +1,47 @@
.uls-lcd-region-section h3 { .uls-lcd-region-section h3 {
color: #999999; color: #999999;
} }
.uls-lcd-region-section ul { .uls-lcd-region-section ul {
list-style: none; list-style: none;
margin-left: 0;
float: left; float: left;
width: 150px; width: 140px;
padding: 10px; margin-left: 5px;
clear: right; padding: 0;
display: block;
}
.uls-lcd-region-section ul li:hover {
background-color: #BFBFBF;
} }
.uls-lcd-region-section { .uls-lcd-region-section {
clear: both; clear: both;
} }
/* Language list */
.uls-language-list {
height: 300px;
overflow: auto;
margin-top: 2%;
}
.uls-language-list ul li {
font-weight: normal;
/* TODO: maybe not the best way */
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.uls-language-list strong {
text-decoration: underline;
}
.uls-language-list a {
font-weight: normal;
color: #0088CC;
}
div.uls-lcd-row:after {
clear: both;
}
div.uls-lcd-row:before, div.uls-lcd-row:after {
content: "";
display: table;
}
div.uls-lcd-row {
padding-bottom: 10px;
}

View File

@@ -69,11 +69,18 @@
getColumn: function( regionCode ) { getColumn: function( regionCode ) {
var $divRegionCode = $( 'div#' + regionCode ); var $divRegionCode = $( 'div#' + regionCode );
var $rowDiv = $divRegionCode.find( 'div.uls-lcd-row:last' );
var $ul = $divRegionCode.find( 'ul:last' ); var $ul = $divRegionCode.find( 'ul:last' );
// Each column can have maximum 10 languages.
if ( $ul.length === 0 || $ul.find( 'li' ).length >= 10 ) { if ( $ul.length === 0 || $ul.find( 'li' ).length >= 10 ) {
// Each row can have 4 columns with 10 languages.
if ( $rowDiv.length === 0 || $rowDiv.find( 'ul' ).length >= 4 ) {
$rowDiv = $( '<div>' ).addClass( 'uls-lcd-row' );
$divRegionCode.append( $rowDiv );
}
$ul = $( '<ul>' ); $ul = $( '<ul>' );
$divRegionCode.append( $ul ); $rowDiv.append( $ul );
} }
$divRegionCode.show(); $divRegionCode.show();
@@ -87,13 +94,12 @@
var $section = $( '<div>' ).addClass( 'uls-lcd-region-section' ).prop( 'id', regionCode ); var $section = $( '<div>' ).addClass( 'uls-lcd-region-section' ).prop( 'id', regionCode );
$section.append( $( '<h3>' ).html( regionCode ) ); $section.append( $( '<h3>' ).html( regionCode ) );
// FIXME this is regioncode(NA, EU etc). Should be Proper localized region name. // FIXME this is regioncode(NA, EU etc). Should be Proper localized region name.
$section.append( $( '<ul>' ) );
that.$element.append( $section ); that.$element.append( $section );
} ); } );
}, },
empty: function() { empty: function() {
this.$element.find( 'div ul' ).remove(); this.$element.find( 'div.uls-lcd-row' ).remove();
this.$element.find( 'div' ).hide(); this.$element.find( 'div' ).hide();
}, },