diff --git a/public/css/main.css b/public/css/main.css index f5ae181..711a830 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -337,3 +337,50 @@ div[class="tooltip-inner"] { background: transparent; float: right; } + +/* Scrollable dropdown menus */ +.dropdown-menu-scrollable { + max-height: 50vh; + overflow-y: auto; + overflow-x: hidden; +} + +/* Search container inside dropdown */ +.dropdown-search-container { + padding: 5px 10px; +} + +.dropdown-search-container .navbar-form { + margin: 0; + padding: 0; +} + +.dropdown-search-container .input-group { + width: 100%; +} + +.dropdown-search-container .input-group-addon { + background-color: #fff; + border-right: none; +} + +.dropdown-search-container input.typeahead { + border-left: none; + box-shadow: none; +} + +.dropdown-search-container input.typeahead:focus { + border-color: #ccc; + box-shadow: none; +} + +/* Loading indicator in dropdowns */ +.dropdown-loading { + padding: 10px 20px; + color: #999; + text-align: center; +} + +.dropdown-loading .fa-spinner { + margin-right: 5px; +} diff --git a/public/js/main.js b/public/js/main.js index 2109259..85ac3c5 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -60,6 +60,8 @@ function set_machine_types() { function populate_machine_type_menus(machine_types) { var run_filter_list = $('#menu-machine-type').parent().find('ul'); + // Remove loading indicator + run_filter_list.find('.dropdown-loading').remove(); if (run_filter_list.children().length == 0) { var items = []; $.each(machine_types, function(i) { @@ -97,6 +99,8 @@ function set_suites() { function populate_suite_menus(suite_names) { var suite_list = $('#menu-suites').parent().find('ul'); + // Remove loading indicator + suite_list.find('.dropdown-loading').remove(); if (suite_list.children().length == 0) { var items = []; $.each(suite_names, function(i) { @@ -279,6 +283,10 @@ $( document ).ready(function() { name: 'branches', prefetch: '/_paddles/branches/', ttl: 30000, + }).on('typeahead:loading', function() { + $(this).closest('.input-group').find('.input-group-addon').html(''); + }).on('typeahead:loaded', function() { + $(this).closest('.input-group').find('.input-group-addon').html(''); }); $('#search-branches').keypress(function(e) { diff --git a/pulpito/templates/layout.html b/pulpito/templates/layout.html index 53dd884..27a222e 100644 --- a/pulpito/templates/layout.html +++ b/pulpito/templates/layout.html @@ -53,29 +53,35 @@ By Branch -