Dropdown on commits page to choose branch #1846

I've mostly duplicated the dropdown code from repo/home.tmpl, which
basically only required a change to the URL. This could probably be
broken out into something more modular.
This commit is contained in:
Angus Gibson 2015-12-09 16:14:54 +11:00
parent a576224d0e
commit 9bd3ebe207
2 changed files with 48 additions and 3 deletions

View file

@ -218,8 +218,9 @@ function initRepository() {
});
}
// File list
if ($('.repository.file.list').length > 0) {
// File list and commits
if ($('.repository.file.list').length > 0 ||
('.repository.commits').length > 0) {
initFilterSearchDropdown('.choose.reference .dropdown');
$('.reference.column').click(function () {
@ -1036,4 +1037,4 @@ $(window).load(function () {
}
}).trigger('hashchange');
}
});
});