diff --git a/lib/jquery.uls/css/jquery.uls.css b/lib/jquery.uls/css/jquery.uls.css index 76c42574..d1822fb2 100644 --- a/lib/jquery.uls/css/jquery.uls.css +++ b/lib/jquery.uls/css/jquery.uls.css @@ -664,3 +664,76 @@ div.uls-region { .uls-no-found-more a { cursor: pointer; } + +.uls-compact .icon-close, +.uls-compact .uls-title, +.uls-compact .map-block { + display: none !important; +} + +.uls-compact.uls-menu { + border-radius: 0; +} + +.uls-compact .search { + background: white; + border-top: none; + padding: 0.8em 0; + border-bottom-width: 1px; + border-bottom-style: solid; + border-bottom-color: #DDD; +} + +.uls-compact .filterinput, +.uls-compact .filterinput:focus { + background-color: transparent; + border: none; + box-shadow: none; + outline: none; + font-size: 18px; +} + +.uls-compact .uls-language-list { + background: #FCFCFC; + height: 20em; +} + +.uls-compact .search-label { + background-size: 25px; + height: 26px; + width: 26px; + float: right; + opacity: 0.8; +} + +.uls-compact .languagefilter-clear { + margin-left: 0; +} + +.uls-compact .uls-title-region a { + color: #777; + display: inline-block; + margin: 15px 0 5px 19px; + cursor: pointer; + padding: 6px; + font-size: 14px; + border: 1px solid transparent; +} + +.uls-compact .uls-title-region a:hover { + color: #252525; + background: #F0F0F0; + border: 1px solid #DDD; + border-radius: 3px; +} + +.uls-compact .uls-title-region a:before { + display: inline-block; + width: 0; + height: 0; + border-right: 4px solid #777; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + content: ""; + margin: 0 6px 0 0; +} \ No newline at end of file diff --git a/lib/jquery.uls/jquery.uls.js b/lib/jquery.uls/jquery.uls.js index 10f1022b..7d449d3d 100644 --- a/lib/jquery.uls/jquery.uls.js +++ b/lib/jquery.uls/jquery.uls.js @@ -1,4 +1,4 @@ -/*! jquery.uls - v0.1.0 - 2013-03-06 +/*! jquery.uls - v0.1.0 - 2013-03-15 * https://github.com/wikimedia/jquery.uls * Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */ @@ -1500,6 +1500,10 @@ left: '25%' } ); + if ( this.options.compact ) { + this.$menu.addClass( 'uls-compact' ); + } + if ( !this.initialized ) { $( 'body' ).prepend( this.$menu ); this.i18n(); @@ -1638,6 +1642,8 @@ uls.$languageFilter.languagefilter( 'clear' ); } } ); + + $( 'html' ).click( $.proxy( this.hide, this ) ); }, /** @@ -1740,6 +1746,7 @@ languages: $.uls.data.getAutonyms(), // Languages to be used for ULS, default is all languages quickList: null, // Array of language codes or function that returns such lazyload: true, // Lazy load the language list when scrolled. + compact: false, // Show ULS in compact mode showRegions: ['WW', 'AM', 'EU', 'ME', 'AF', 'AS', 'PA'] };