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:
committed by
Niklas Laxström
parent
566651b9f6
commit
5625f6eb70
@@ -69,11 +69,18 @@
|
||||
|
||||
getColumn: function( regionCode ) {
|
||||
var $divRegionCode = $( 'div#' + regionCode );
|
||||
var $rowDiv = $divRegionCode.find( 'div.uls-lcd-row:last' );
|
||||
|
||||
var $ul = $divRegionCode.find( 'ul:last' );
|
||||
// Each column can have maximum 10 languages.
|
||||
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>' );
|
||||
$divRegionCode.append( $ul );
|
||||
$rowDiv.append( $ul );
|
||||
}
|
||||
|
||||
$divRegionCode.show();
|
||||
@@ -87,13 +94,12 @@
|
||||
var $section = $( '<div>' ).addClass( 'uls-lcd-region-section' ).prop( 'id', regionCode );
|
||||
$section.append( $( '<h3>' ).html( regionCode ) );
|
||||
// FIXME this is regioncode(NA, EU etc). Should be Proper localized region name.
|
||||
$section.append( $( '<ul>' ) );
|
||||
that.$element.append( $section );
|
||||
} );
|
||||
},
|
||||
|
||||
empty: function() {
|
||||
this.$element.find( 'div ul' ).remove();
|
||||
this.$element.find( 'div.uls-lcd-row' ).remove();
|
||||
this.$element.find( 'div' ).hide();
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user