Merge pull request #664 from frecuencialibre/focus-library-filter-input

Add focus to library filter input upon load
This commit is contained in:
Robb 2018-12-27 09:48:36 -05:00 committed by GitHub
commit 603235f795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 12 deletions

View File

@ -3720,11 +3720,8 @@ button.btn-icon-text > i.icon-white {
display: block;
}
.dashboard_sub_nav {
padding: 0px 0px 0px 10px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
.media_type_selector.dashboard_sub_nav a {
padding-left: 20px;
}
.wrapper {

View File

@ -745,7 +745,8 @@ var AIRTIME = (function(AIRTIME) {
filterMessage.text("");
}
$libContent.find('.dataTables_filter input[type="text"]')
.css('padding-right', $('#advanced-options').find('button').outerWidth());
.css('padding-right', $('#advanced-options').find('button').outerWidth())
.focus();
});
},
"fnRowCallback": AIRTIME.library.fnRowCallback,

View File

@ -131,12 +131,6 @@ AIRTIME = (function(AIRTIME) {
selected.parent().addClass("selected");
$("#library_filter").text(selected.text());
// Slightly hacky way of triggering the click event when it's outside of the anchor text
$(".media_type_selector").on("click", function() {
// Need get(0) here so we don't create a stack overflow by recurring the click on the parent
$(this).find("a").get(0).click();
});
$(window).on('hashchange', function() {
var selected = $("a[href$='"+location.hash+"']"),
dashboardLink = $(".media_type_selector:first"),