Mercurial > kallithea
changeset 6941:d39fcf27fa44
files: simplify header, making it more like changeset
"Search file list" is moved out of the header to a separate div.
The "Follow current branch" functionality is dropped, and there is thus less
need for passing the current URL around ... but it is generally still used for
browser history navigation.
The removal of branch following is a temporary feature regression - that will
be fixed next.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sun, 22 Oct 2017 04:01:28 +0200 |
parents | 7a31cb862a58 |
children | 46bc7191e1e4 |
files | kallithea/public/js/base.js kallithea/templates/files/files.html kallithea/templates/files/files_browser.html |
diffstat | 3 files changed, 9 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/public/js/base.js Wed Aug 16 17:34:44 2017 +0200 +++ b/kallithea/public/js/base.js Sun Oct 22 04:01:28 2017 +0200 @@ -799,20 +799,7 @@ } /* activate files.html stuff */ -var fileBrowserListeners = function(current_url, node_list_url, url_base){ - var current_url_branch = "?branch=__BRANCH__"; - - $('#stay_at_branch').on('click',function(e){ - if(e.currentTarget.checked){ - var uri = current_url_branch; - uri = uri.replace('__BRANCH__',e.currentTarget.value); - window.location = uri; - } - else{ - window.location = current_url; - } - }); - +var fileBrowserListeners = function(node_list_url, url_base){ var $node_filter = $('#node_filter'); var filterTimeout = null;
--- a/kallithea/templates/files/files.html Wed Aug 16 17:34:44 2017 +0200 +++ b/kallithea/templates/files/files.html Sun Oct 22 04:01:28 2017 +0200 @@ -100,7 +100,7 @@ var _f_path = State.data.f_path; var _rev = State.data.rev; - fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base); + fileBrowserListeners(State.data.node_list_url, State.data.url_base); // Inform Google Analytics of the change if ( typeof window.pageTracker !== 'undefined' ) { window.pageTracker._trackPageview(State.url); @@ -233,7 +233,7 @@ f_path: ${h.js(h.safe_unicode(c.file.path))} } } - fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base); + fileBrowserListeners(_State.data.node_list_url, _State.data.url_base); // change branch filter $("#branch_selector").select2({
--- a/kallithea/templates/files/files_browser.html Wed Aug 16 17:34:44 2017 +0200 +++ b/kallithea/templates/files/files_browser.html Sun Oct 22 04:01:28 2017 +0200 @@ -26,7 +26,6 @@ </%def> <div id="body" class="panel panel-default"> <div class="panel-heading clearfix"> - ${h.form(h.url.current())} <span class="browser-nav form-inline"> <span class="info_box"> <span class="info_box_elem rev">${_('Revision')}</span> @@ -35,15 +34,13 @@ <span class="info_box_elem"><a class="btn btn-default btn-xs ypjax-link" href="${c.url_next}" title="${_('Next revision')}"><i class="icon-right-open"></i></a></span> </span> </span> - <span class="browser-branch form-inline"> - <label class="checkbox"> - ${h.checkbox('stay_at_branch',c.changeset.branch,c.changeset.branch==c.branch)} - ${_('Follow current branch')} - </label> - </span> - <span id="search_activate_id" class="search_activate"> + </div> + + <div class="panel-body"> + ${h.form(h.url.current())} + <div id="search_activate_id" class="search_activate"> <a class="btn btn-default btn-xs" id="filter_activate" href="#">${_('Search File List')}</a> - </span> + </div> ${h.end_form()} <div class="browser-search form-inline"> <div> @@ -53,9 +50,6 @@ </div> </div> </div> - </div> - - <div class="panel-body"> <table class="table code-browser"> <thead> <tr>