diff --git a/kallithea/public/css/style.css b/kallithea/public/css/style.css --- a/kallithea/public/css/style.css +++ b/kallithea/public/css/style.css @@ -4804,6 +4804,14 @@ span.pr-closed-tag { max-width: 978px; } +#s2id_org_ref, +#s2id_other_ref, +#s2id_org_repo, +#s2id_other_repo { + min-width: 150px; + margin: 5px; +} + /**** PERMS *****/ diff --git a/kallithea/templates/pullrequests/pullrequest.html b/kallithea/templates/pullrequests/pullrequest.html --- a/kallithea/templates/pullrequests/pullrequest.html +++ b/kallithea/templates/pullrequests/pullrequest.html @@ -210,25 +210,39 @@ ${self.repo_context_bar('showpullrequest }); } - ## refresh automatically when something changes (org_repo can't change) + YAHOO.util.Event.onDOMReady(function(){ + $("#org_repo").select2({ + dropdownAutoWidth: true, + }); + ## (org_repo can't change) + + $("#org_ref").select2({ + dropdownAutoWidth: true, + }); + $("#org_ref").on("change", function(e){ + loadPreview(); + }); - YUE.on('org_ref', 'change', function(e){ - loadPreview(); - }); + $("#other_repo").select2({ + dropdownAutoWidth: true, + }); + $("#other_repo").on("change", function(e){ + otherrepoChanged(); + loadPreview(); + }); - YUE.on('other_repo', 'change', function(e){ + $("#other_ref").select2({ + dropdownAutoWidth: true, + }); + $("#other_ref").on("change", function(e){ + loadPreview(); + }); + otherrepoChanged(); - loadPreview(); + //lazy load overview after 0.5s + setTimeout(loadPreview, 500); }); - YUE.on('other_ref', 'change', function(e){ - loadPreview(); - }); - - otherrepoChanged(); - //lazy load overview after 0.5s - setTimeout(loadPreview, 500); -