I came to bring the rain.. Let me get my coat... Fix focus on timeslider import export

This commit is contained in:
John McLear 2015-03-31 15:00:43 +01:00
parent 73073dcbc1
commit 24e6e1728a
3 changed files with 33 additions and 10 deletions

View File

@ -78,6 +78,7 @@
width: 44px;
text-align:center;
vertical-align:middle;
background:none;
}
#playpause_button {
right: 77px;
@ -125,7 +126,7 @@
font-family: fontawesome-etherpad;
border-radius:2px;
border: #666 solid 1px;
line-height:18px;
/* line-height:18px; */
text-align:center;
height:22px;
color:#666;
@ -337,3 +338,19 @@ OL {
.list-number6 {
list-style-type: lower-roman
}
button{
margin:0;
padding:0;
cursor:pointer;
}
button::-moz-focus-inner {
padding: 0;
border: 0
}
button:focus{
border: 1px solid #666;
}

View File

@ -308,9 +308,6 @@ var padeditbar = (function()
var editbarPosition = 0;
function bodyKeyEvent(evt){
// Check we're on a pad and not on the timeslider
// Or some other window I haven't thought about!
if(typeof pad === 'undefined') return false;
// If the event is Alt F9 or Escape & we're already in the editbar menu
// Send the users focus back to the pad
@ -319,6 +316,10 @@ var padeditbar = (function()
// Close any dropdowns we have open..
padeditbar.toggleDropDown("none");
// Check we're on a pad and not on the timeslider
// Or some other window I haven't thought about!
if(typeof pad === 'undefined') return false;
// Shift focus away from any drop downs
$(':focus').blur(); // required to do not try to remove!
padeditor.ace.focus(); // Sends focus back to pad
@ -366,9 +367,14 @@ var padeditbar = (function()
toolbar.registerCommand("import_export", function () {
toolbar.toggleDropDown("import_export", function(){
setTimeout(function(){
$('#importfileinput').focus();
}, 100);
// If Import file input exists then focus on it..
if($('#importfileinput').length !== 0){
setTimeout(function(){
$('#importfileinput').focus();
}, 100);
}else{
$('.exportlink').first().focus();
}
});
});

View File

@ -61,11 +61,11 @@
<div id="ui-slider-bar"></div>
</div>
<div id="playpause_button">
<div id="playpause_button_icon" class=""></div>
<button id="playpause_button_icon" class=""></button>
</div>
<div id="steppers">
<div class="stepper" id="leftstep"></div>
<div class="stepper" id="rightstep"></div>
<button class="stepper" id="leftstep"></button>
<button class="stepper" id="rightstep"></button>
</div>
</div>