From 9bd3ebe20708b3d61f1cab8daeeffe8748f93852 Mon Sep 17 00:00:00 2001 From: Angus Gibson Date: Wed, 9 Dec 2015 16:14:54 +1100 Subject: 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. --- public/js/gogs.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'public/js/gogs.js') diff --git a/public/js/gogs.js b/public/js/gogs.js index be17b8c8..427280db 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -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'); } -}); \ No newline at end of file +}); -- cgit v1.2.3