Support for back links for uls-compact

Added styles for links that are inserted in the header of the list
to allow the user to go back for multi-step dialogs.

Change-Id: I062086e23d0d5275fd577d9977313b0ac25cf014
This commit is contained in:
Pau Giner
2013-03-14 23:02:45 +01:00
committed by Santhosh Thottingal
parent e23d7171d5
commit 44ff5e0120
2 changed files with 48 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
.uls-compact .icon-close,
.uls-compact .uls-title-region,
.uls-compact .uls-title,
.uls-compact .map-block {
display: none !important;
}
@@ -42,3 +42,31 @@
.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;
}

View File

@@ -3,17 +3,7 @@
<head>
<meta charset="utf-8"/>
<!--
Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess
-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>Universal Language Selector</title>
<!-- <link rel="shortcut icon" href="/favicon.ico"/> -->
<!-- <link rel="apple-touch-icon" href="/apple-touch-icon.png"/> -->
<!-- <meta name="description" content=""/> -->
<meta name="author" content="Santhosh Thottingal"/>
<link href="../css/jquery.uls.css" rel="stylesheet"/>
<link href="../css/jquery.uls.grid.css" rel="stylesheet"/>
<link href="../css/jquery.uls.lcd.css" rel="stylesheet"/>
@@ -30,25 +20,25 @@
<script src="../src/jquery.uls.regionfilter.js"></script>
<script src="../src/jquery.uls.core.js"></script>
<script>
$( document ).ready( function() {
$( '.uls-trigger' ).uls( {
onSelect : function( language ) {
var languageName = $.uls.data.getAutonym( language );
$( '.uls-trigger' ).text( languageName );
},
quickList: ['en', 'hi', 'he', 'ml', 'ta', 'fr'] //FIXME
$( document ).ready( function () {
$( '.uls-trigger' ).uls( {
onSelect: function ( language ) {
var languageName = $.uls.data.getAutonym( language );
$( '.uls-trigger' ).text( languageName );
},
quickList: [ 'en', 'hi', 'he', 'ml', 'ta', 'fr' ]
} );
$( '.uls-trigger' ).click( function () {
//Hacks to include optional classes and make the dialog close when clicking outside:
$( '.uls-menu' ).addClass( 'uls-compact' );
$( 'html' ).click( function () {
$( '.uls-menu' ).hide();
} );
$( '.uls-menu' ).click( function ( event ) {
event.stopPropagation();
} );
} );
$( '.uls-trigger' ).click( function () {
//Hacks to include optional classes and make the dialog close when clicking outside:
$( '.uls-menu' ).addClass( 'uls-compact' );
$('html').click(function() {
$('.uls-menu').hide();
});
$('.uls-menu').click(function(event){
event.stopPropagation();
});
});
} );
</script>
</head>
@@ -58,7 +48,7 @@
<span class="active uls-trigger">Select Language</span>
<h1>Universal Language Selector</h1>
<p>
Demonstration of jQuery plugin
Demonstration of jQuery plugin - In compact mode
</p>
</div>
<div class="container"></div>