diff --git a/swh/web/assets/src/bundles/browse/browse.css b/swh/web/assets/src/bundles/browse/browse.css index bac22dbf..c5b43499 100644 --- a/swh/web/assets/src/bundles/browse/browse.css +++ b/swh/web/assets/src/bundles/browse/browse.css @@ -1,109 +1,101 @@ /** * Copyright (C) 2018 The Software Heritage developers * See the AUTHORS file at the top-level directory of this distribution * License: GNU Affero General Public License version 3, or any later version * See top-level LICENSE file for more information */ .navbar-header a, ul.dropdown-menu a, ul.navbar-nav a { border-bottom-style: none; color: #323232; font-weight: 700; } .swh-browse-nav li a { border-radius: 4px; } .nav-link.active { background-color: #e7e7e7; } .scrollable-menu { max-height: 180px; overflow-x: hidden; } .swh-corner-ribbon { width: 200px; background: #e43; position: absolute; text-align: center; line-height: 50px; letter-spacing: 1px; color: #f0f0f0; box-shadow: 0 0 3px rgba(0, 0, 0, 0.3); top: 25px; right: -50px; left: auto; transform: rotate(45deg); z-index: 2000; } .swh-loading { display: none; } .swh-loading.show { - display: inline-block; - position: fixed; - background: white; - border: 1px solid black; - top: 50%; - left: 50%; - margin: -50px 0 0 -50px; - text-align: center; - z-index: 100; + display: block; } .swh-metadata-table-row { border-top: 1px solid #ddd !important; } .swh-metadata-table-key { min-width: 200px; max-width: 200px; width: 200px; } .swh-metadata-table-value pre { white-space: pre-wrap; } .swh-table-even-odd th { border-top: none; } .swh-table-even-odd tr:nth-child(even) { background-color: #f5f5f5; } .swh-table-even-odd tr:nth-child(odd) { background-color: #fff; } .swh-table-cell-text-overflow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .swh-directory-table { margin-bottom: 0; } .swh-directory-table td { border-top: 1px solid #ddd !important; } .swh-title-color { color: #e20026; } .swh-log-entry-message { min-width: 460px; max-width: 460px; width: 460px; } diff --git a/swh/web/assets/src/bundles/browse/origin-search.js b/swh/web/assets/src/bundles/browse/origin-search.js index b2f39051..b86ab6b3 100644 --- a/swh/web/assets/src/bundles/browse/origin-search.js +++ b/swh/web/assets/src/bundles/browse/origin-search.js @@ -1,159 +1,164 @@ /** * Copyright (C) 2018 The Software Heritage developers * See the AUTHORS file at the top-level directory of this distribution * License: GNU Affero General Public License version 3, or any later version * See top-level LICENSE file for more information */ import {heapsPermute} from 'utils/heaps-permute'; import {handleFetchError} from 'utils/functions'; let originPatterns; let perPage = 15; let limit = perPage * 10; let offset = 0; let currentData = null; let inSearch = false; function fixTableRowsStyle() { setTimeout(() => { $('#origin-search-results tbody tr').removeAttr('style'); }); } +function clearOriginSearchResultsTable() { + $('#origin-search-results tbody tr').remove(); +} + function populateOriginSearchResultsTable(data, offset) { let localOffset = offset % limit; if (data.length > 0) { $('#swh-origin-search-results').show(); $('#swh-no-origins-found').hide(); - $('#origin-search-results tbody tr').remove(); + clearOriginSearchResultsTable(); let table = $('#origin-search-results tbody'); for (let i = localOffset; i < localOffset + perPage && i < data.length; ++i) { let elem = data[i]; let tableRow = '
Searching origins ...
-