From f3c4baa84b8fa7afb3eab137b4c5e3544bd9e761 Mon Sep 17 00:00:00 2001 From: Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> Date: Sun, 20 Dec 2020 04:13:12 +0100 Subject: Show dropdown with all statuses for commit (#13977) * Show dropdown with all statuses for commit * Use popups * Remove unnecessary change * Style popup * Use divided list * As per @silverwind * Refactor GetLastCommitStatus * Missing dropdown on repo home and commit page * Fix tests * Make status icon be a part of a link on PR list * Fix missing translation call * Indent fix Co-authored-by: Lunny Xiao Co-authored-by: techknowlogick --- web_src/js/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'web_src/js') diff --git a/web_src/js/index.js b/web_src/js/index.js index e55e2febe0..dd7032eb84 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -759,6 +759,15 @@ async function initRepository() { }); } + // Commit statuses + $('.commit-statuses-trigger').each(function () { + $(this) + .popup({ + on: 'click', + position: ($('.repository.file.list').length > 0 ? 'right center' : 'left center'), + }); + }); + // File list and commits if ($('.repository.file.list').length > 0 || ('.repository.commits').length > 0) { initFilterBranchTagDropdown('.choose.reference .dropdown'); -- cgit v1.2.3