Adding a special region

This is supposed to allow adding special languages.

This region's section is hidden by default and can be enabled by
passing different options to the lcd object.
This commit is contained in:
Amir E. Aharoni
2012-12-31 23:09:48 +02:00
parent 680e14196d
commit 829c827483
8 changed files with 71 additions and 15 deletions

View File

@@ -146,7 +146,10 @@
$rowDiv.append( $ul );
}
$divRegionCode.show();
// Don't show the region unless it was enabled
if ( $.inArray( regionCode, this.options.showRegions ) > -1 ) {
$divRegionCode.show();
}
return $ul;
},
@@ -157,6 +160,7 @@
regions = {
// These are fallback text when i18n library not present
WW: 'Worldwide',
SP: 'Special',
AM: 'America',
EU: 'Europe',
ME: 'Middle East',
@@ -307,6 +311,7 @@
$.fn.lcd.defaults = {
languages: null,
showRegions: ['WW', 'AM', 'EU', 'ME', 'AF', 'AS', 'PA'],
lazyload: true
};