# HG changeset patch # User Mads Kiilerich # Date 2017-10-22 04:01:28 # Node ID d39fcf27fa44772f9188c40dcf5f49a5b7cb7d6d # Parent 7a31cb862a58ae637da356875ce279f5cdd68906 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. diff --git a/kallithea/public/js/base.js b/kallithea/public/js/base.js --- a/kallithea/public/js/base.js +++ b/kallithea/public/js/base.js @@ -799,20 +799,7 @@ var linkInlineComments = function($first } /* 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; diff --git a/kallithea/templates/files/files.html b/kallithea/templates/files/files.html --- a/kallithea/templates/files/files.html +++ b/kallithea/templates/files/files.html @@ -100,7 +100,7 @@ var callbacks = function(State){ 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 @@ $(document).ready(function(){ 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({ diff --git a/kallithea/templates/files/files_browser.html b/kallithea/templates/files/files_browser.html --- a/kallithea/templates/files/files_browser.html +++ b/kallithea/templates/files/files_browser.html @@ -26,7 +26,6 @@
- ${h.form(h.url.current())} ${_('Revision')} @@ -35,15 +34,13 @@ - - - - +
+ +
+ ${h.form(h.url.current())} + ${h.end_form()}
-
- -