Add possibility to make branch in branch page (#15960)

* Add possibility to make branch in branch page (#15911)

Add possibility to make branch in branch page
in the area next to Download and Delete buttons.
It is a more intuitive place in the interface
compared to what is already there.

Signed-off-by: Viktor Yakovchuk <viktor@yakovchuk.net>

* Update templates/repo/branch/list.tmpl

Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Viktor Yakovchuk 2021-05-24 17:57:46 +03:00 committed by GitHub
parent 3aaf64885f
commit 5285a3e70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 0 deletions

View file

@ -2658,6 +2658,11 @@ $(document).ready(async () => {
$('.show-panel.button').on('click', function () {
$($(this).data('panel')).show();
});
$('.show-create-branch-modal.button').on('click', function () {
$('#create-branch-form')[0].action = $('#create-branch-form').data('base-action') + $(this).data('branch-from');
$('#modal-create-branch-from-span').text($(this).data('branch-from'));
$($(this).data('modal')).modal('show');
});
$('.show-modal.button').on('click', function () {
$($(this).data('modal')).modal('show');
});