##// END OF EJS Templates
fixed issues with form upload if settings for repo paths are blocked
fixed issues with form upload if settings for repo paths are blocked

File last commit:

r3988:072a37c4 default
r4046:38ab60c1 default
Show More
files.html
163 lines | 5.3 KiB | text/html | HtmlLexer
renamed project to rhodecode
r547 <%inherit file="/base/base.html"/>
improved title consistency...
r3582 <%def name="title(*args)">
${_('%s Files') % c.repo_name}
%if hasattr(c,'file'):
fixed some unicode problems with git file path
r3792 &middot; ${h.safe_unicode(c.file.path) or '\\'}
improved title consistency...
r3582 %endif
&middot; ${c.rhodecode_name}
renamed project to rhodecode
r547 </%def>
<%def name="breadcrumbs_links()">
Leonardo
Fixing missing icons....
r3532 ${_('Files')}
new files views...
r1737 %if c.file:
improved title consistency...
r3582 @ ${h.show_id(c.changeset)}
White-space cleanup
r1888 %endif
renamed project to rhodecode
r547 </%def>
<%def name="page_nav()">
Mads Kiilerich
use valid options for the top menu: repositories, journal, search and admin
r3603 ${self.menu('repositories')}
renamed project to rhodecode
r547 </%def>
<%def name="main()">
Mads Kiilerich
templates: drop context_bar, use repo_context_bar directly
r3988 ${self.repo_context_bar('files')}
renamed project to rhodecode
r547 <div class="box">
<!-- box / title -->
<div class="title">
some changes for #45....
r644 ${self.breadcrumbs()}
Mads Kiilerich
html: don't use tabs
r3197 <ul class="links">
<li>
Mads Kiilerich
Fix a lot of casings - use standard casing in most places
r3654 <span style="text-transform: uppercase;"><a href="#">${_('Branch')}: ${c.changeset.branch}</a></span>
Mads Kiilerich
html: don't use tabs
r3197 </li>
</ul>
renamed project to rhodecode
r547 </div>
<div class="table">
Mads Kiilerich
html: don't use tabs
r3197 <div id="files_data">
<%include file='files_ypjax.html'/>
</div>
renamed project to rhodecode
r547 </div>
White-space cleanup
r1888 </div>
Reimplemented file-browser using partial-ajax...
r2686
cleaned up JS files in files templates....
r1699 <script type="text/javascript">
Reimplemented file-browser using partial-ajax...
r2686 var CACHE = {};
implements #636, lazy loading of history and authors to speed up page responsiveness....
r3001 var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s
Disable the html4 history mock for old browsers....
r2687 //used to construct links from the search list
fix files quick filter links
r2891 var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
Disable the html4 history mock for old browsers....
r2687 //send the nodelist request to this url
fix files quick filter links
r2891 var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
implements #636, lazy loading of history and authors to speed up page responsiveness....
r3001 // send the node history requst to this url
var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
Reimplemented file-browser using partial-ajax...
r2686
var ypjax_links = function(){
YUE.on(YUQ('.ypjax-link'), 'click',function(e){
White space cleanup
r2815
Mads Kiilerich
html: don't use tabs
r3197 //don't do ypjax on middle click
if(e.which == 2 || !History.enabled){
return true;
}
White space cleanup
r2815
Reimplemented file-browser using partial-ajax...
r2686 var el = e.currentTarget;
var url = el.href;
fixed issues with non-ascii chars in new file browser...
r2691
Reimplemented file-browser using partial-ajax...
r2686 var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}';
_base_url = _base_url.replace('//','/')
White space cleanup
r2815
Reimplemented file-browser using partial-ajax...
r2686 //extract rev and the f_path from url.
parts = url.split(_base_url)
if(parts.length != 2){
Mads Kiilerich
html: don't use tabs
r3197 return false;
Reimplemented file-browser using partial-ajax...
r2686 }
White space cleanup
r2815
Reimplemented file-browser using partial-ajax...
r2686 var parts2 = parts[1].split('/');
improved title consistency...
r3582 var rev = parts2.shift(); // pop the first element which is the revision
var f_path = parts2.join('/');
White space cleanup
r2815
improved title consistency...
r3582 //page title make this consistent with title() mako function on top
var title = "${_('%s Files') % c.repo_name}" + " &middot; " + (f_path || '\\') + " &middot; " + "${c.rhodecode_name}";
White space cleanup
r2815
fix files quick filter links
r2891 var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path);
var _url_base = url_base.replace('__REV__',rev);
fixed issues with non-ascii chars in new file browser...
r2691
Reimplemented file-browser using partial-ajax...
r2686 // Change our States and save some data for handling events
Disable the html4 history mock for old browsers....
r2687 var data = {url:url,title:title, url_base:_url_base,
implements #636, lazy loading of history and authors to speed up page responsiveness....
r3001 node_list_url:_node_list_url, rev:rev, f_path:f_path};
White space cleanup
r2815 History.pushState(data, title, url);
Reimplemented file-browser using partial-ajax...
r2686 //now we're sure that we can do ypjax things
Fixed issue when node didn't exists at 'tip' and we tried calculate history based on that assumption....
r2977 YUE.preventDefault(e);
Reimplemented file-browser using partial-ajax...
r2686 return false;
});
}
var callbacks = function(State){
ypjax_links();
tooltip_activate();
fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base);
White space cleanup
r3029
implements #636, lazy loading of history and authors to speed up page responsiveness....
r3001 if(YUD.get('hlcode')){
Mads Kiilerich
html: don't use tabs
r3197 YUE.on('hlcode', 'mouseup', getSelectionLink);
implements #636, lazy loading of history and authors to speed up page responsiveness....
r3001 }
//console.log(State);
if(YUD.get('load_node_history')){
//remove all listeners due to problems of history state
YUE.removeListener('load_node_history', 'click');
YUE.on('load_node_history', 'click', function(e){
var _url = node_history_url.replace('__REV__',State.data.rev).replace('__FPATH__', State.data.f_path);
fire tooltips after loading the history
r3003 ypjax(_url, 'node_history', function(o){
Mads Kiilerich
html: don't use tabs
r3197 tooltip_activate();
fire tooltips after loading the history
r3003 })
implements #636, lazy loading of history and authors to speed up page responsiveness....
r3001 });
}
Reimplemented file-browser using partial-ajax...
r2686 // Inform Google Analytics of the change
if ( typeof window.pageTracker !== 'undefined' ) {
window.pageTracker._trackPageview(State.url);
White space cleanup
r2815 }
Reimplemented file-browser using partial-ajax...
r2686 }
White space cleanup
r2815 YUE.onDOMReady(function(){
Reimplemented file-browser using partial-ajax...
r2686 ypjax_links();
var container = 'files_data';
//Bind to StateChange Event
History.Adapter.bind(window,'statechange',function(){
var State = History.getState();
cache_key = State.url;
//check if we have this request in cache maybe ?
var _cache_obj = CACHE[cache_key];
var _cur_time = new Date().getTime();
// get from cache if it's there and not yet expired !
if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){
YUD.get(container).innerHTML=_cache_obj[1];
YUD.setStyle(container,'opacity','1.0');
//callbacks after ypjax call
callbacks(State);
}
else{
ypjax(State.url,container,function(o){
Mads Kiilerich
html: don't use tabs
r3197 //callbacks after ypjax call
callbacks(State);
if (o !== undefined){
//store our request in cache
var _expire_on = new Date().getTime()+CACHE_EXPIRE;
Reimplemented file-browser using partial-ajax...
r2686 CACHE[cache_key] = [_expire_on, o.responseText];
}
});
}
White space cleanup
r2815 });
Disable the html4 history mock for old browsers....
r2687 // init the search filter
var _State = {
url: "${h.url.current()}",
data: {
fix files quick filter links
r2891 node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
implements #636, lazy loading of history and authors to speed up page responsiveness....
r3001 url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"),
rev:"${c.changeset.raw_id}",
f_path: "${h.safe_unicode(c.file.path)}"
Disable the html4 history mock for old browsers....
r2687 }
}
fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base);
Reimplemented file-browser using partial-ajax...
r2686 });
cleaned up JS files in files templates....
r1699 </script>
Reimplemented file-browser using partial-ajax...
r2686
White-space cleanup
r1888 </%def>