From 761a8c923ef13d2f92dac94f90ec58a81009cb74 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 26 Dec 2018 16:54:15 -0600 Subject: [PATCH 1/2] remove js hack on media type menu links --- airtime_mvc/public/css/styles.css | 7 ++----- airtime_mvc/public/js/airtime/showbuilder/main_builder.js | 6 ------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/airtime_mvc/public/css/styles.css b/airtime_mvc/public/css/styles.css index 08d86810b..8327080a4 100644 --- a/airtime_mvc/public/css/styles.css +++ b/airtime_mvc/public/css/styles.css @@ -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 { diff --git a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js index 37f5fc62e..9960efd95 100644 --- a/airtime_mvc/public/js/airtime/showbuilder/main_builder.js +++ b/airtime_mvc/public/js/airtime/showbuilder/main_builder.js @@ -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"), From 14c8df75ab150f09c1db5d31db7b7deca5a3d149 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 26 Dec 2018 16:59:25 -0600 Subject: [PATCH 2/2] focus library search input upon load --- airtime_mvc/public/js/airtime/library/library.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/library/library.js b/airtime_mvc/public/js/airtime/library/library.js index b1e3b5075..1939b1fd2 100644 --- a/airtime_mvc/public/js/airtime/library/library.js +++ b/airtime_mvc/public/js/airtime/library/library.js @@ -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,