Browse Source

improved user list keyboard navigation. Fixes #15

sisyphus
Dustin Falgout 10 years ago
parent
commit
1376a6fdd6
  1. 55
      themes/antergos/css/bootstrap/theme.css
  2. 23
      themes/antergos/index.html
  3. 4
      themes/antergos/js/greeter.js
  4. 2
      themes/antergos/js/mock.js

55
themes/antergos/css/bootstrap/theme.css vendored

@ -19,6 +19,9 @@ src: url('../../font-awesome/fonts/Lato-Regular.ttf');
font-family: LatoLight;
src: url('../../font-awesome/fonts/Lato-Light.ttf');
}
*:focus {
outline: none;
}
.hidden {
opacity: 0;
@ -280,13 +283,16 @@ a {
.list-group-item.hovered .badge,
.list-group-item.hovered .badge i {
display: block;
margin-top: 3px;
}
.panel-heading {
padding: 10px 20px !important;
background: #f1f1f1;
}
.panel-footer {
height: 50px;
background: #f1f1f1;
}
#sessions, #actionsArea {
@ -327,11 +333,8 @@ div.password, div.status, div.timer {
.password {
font-size: 14px !important;
padding-top: 5px !important;
padding-bottom: 5px !important;
}
.form-control {
height: 36px;
line-height: 37px;
height: 37px;
}
#passwordArea .btn {
padding-top: 6.5px;
@ -591,3 +594,45 @@ padding: 0px;
.list-group-item {
padding: 0px 15px;
}
a.list-group-item:focus, a.list-group-item:hover, a.list-group-item.hovered
{
position:relative;
-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset;
-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset;
box-shadow:0 1px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(0, 0, 0, 0.1) inset;
outline: none;
margin: 0px 0;
background: #ffffff;
}
a.list-group-item:focus:before, a.list-group-item:focus:after,
a.list-group-item:hover:before, a.list-group-item:hover:after,
a.list-group-item.hovered:after, a.list-group-item.hovered:before
{
content:"";
position:absolute;
z-index:-1;
-webkit-box-shadow:0 0 5px rgba(0,0,0,0.8);
-moz-box-shadow:0 0 5px rgba(0,0,0,0.8);
box-shadow:0 0 5px rgba(0,0,0,0.8);
top:0;
bottom:0;
left:10px;
right:10px;
-moz-border-radius:100px / 10px;
border-radius:100px / 10px;
}
a.list-group-item:focus:after, a.list-group-item:hover:after, a.list-group-item.hovered:after
{
right:10px;
left:auto;
-webkit-transform:skew(8deg) rotate(3deg);
-moz-transform:skew(8deg) rotate(3deg);
-ms-transform:skew(8deg) rotate(3deg);
-o-transform:skew(8deg) rotate(3deg);
transform:skew(8deg) rotate(3deg);
}
td.input-group, #passwordArea table {
width: 100%;
margin-top: 5px;
}

23
themes/antergos/index.html

@ -254,15 +254,15 @@
<ul class="dropdown-menu pull-right">
<li>
<a href="#" onclick="cancelAuthentication()">
<i class="fa fa-times"></i>Cancel</a>
<i class="fa fa-times"></i> Cancel</a>
</li>
<li>
<a href="#" onclick="showLog()">
<i class="fa fa-bug"></i>View Log</a>
<i class="fa fa-bug"></i> View Log</a>
</li>
<li>
<a href="#" onclick="$(document.location.reload(true))">
<i class="fa fa-refresh"></i>Reset</a>
<i class="fa fa-refresh"></i> Reset</a>
</li>
</ul>
</div>
@ -333,8 +333,6 @@
$(this).hide();
$("#bg-switch-toggle").show();
});
</script>
<script>
$("#bg-switch-toggle").click(function(e) {
e.preventDefault();
$("#bg-switch-wrapper").toggleClass("active");
@ -342,11 +340,22 @@
$("#bg-switch-close").show();
});
// Show user list when pressed any key
$(document).keypress(function(e) {
$('*').each(function(){
$(this).attr('tabindex', '-1');
});
$('#collapseTwo').on('shown.bs.collapse', function() {
$('#collapseTwo a').each(function(index) {
var i = index + 1;
$(this).attr('tabindex', i);
});
});
$('#collapseTwo').on('hidden.bs.collapse', function() {
$('#collapseTwo a').each(function(index) {
$(this).attr('tabindex', -1);
});
});
</script>

4
themes/antergos/js/greeter.js

@ -236,14 +236,12 @@ function cancelAuthentication() {
$('#timerArea').hide();
$('#passwordArea').hide();
$('#session-list').hide();
if (selectedUser != null) {
lightdm.cancel_authentication();
log("authentication cancelled for " + selectedUser);
$('.list-group-item.hovered').removeClass('hovered').siblings().show();
$('.list-group-item').removeClass('hovered').siblings().show();
$('.fa-toggle-down').show();
selectedUser = null;
authPending = false;
}
return true;
}

2
themes/antergos/js/mock.js

@ -69,7 +69,7 @@ if (typeof lightdm == 'undefined') {
lightdm.cancel_authentication= function() {
_lightdm_mock_check_argument_length(arguments, 0);
if (!lightdm._username) {
throw "we are not authenticating";
console.log("we are not authenticating");
}
lightdm._username= null;
};

Loading…
Cancel
Save