All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ui.static.git.branchNamesAutocomplete.js Maven / Gradle / Ivy

There is a newer version: 0.8.0
Show newest version
$(document).ready(function () {
    if ($("input[name=targetBranch]").length > 0) {
        fetchBranchNames();
    }
});

function fetchBranchNames() {
    $
        .ajax("api/git/branches", {
            method: "GET"
        })
        .done(function (branches) {
            initBranchNamesAutocomplete(branches);
        });
}

function initBranchNamesAutocomplete(branches) {
    $("input[name=targetBranch]")
        .autocomplete({
            source: branches,
            minLength: 0
        })
        .focus(function () {
            $(this).data("uiAutocomplete").search($(this).val());
        });
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy