Changeset - d39fcf27fa44
[Not reviewed]
default
0 3 0
Mads Kiilerich - 8 years ago 2017-10-22 04:01:28
mads@kiilerich.com
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.
3 files changed with 9 insertions and 28 deletions:
0 comments (0 inline, 0 general)
kallithea/public/js/base.js
Show inline comments
 
@@ -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;
kallithea/templates/files/files.html
Show inline comments
 
@@ -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({
kallithea/templates/files/files_browser.html
Show inline comments
 
@@ -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>
0 comments (0 inline, 0 general)