diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-14 19:08:25 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-10-14 19:08:25 +0400 |
commit | 5dc5ef7bcde5f50033f4d8df685d99854547fe26 (patch) | |
tree | 66864cde96f292d7309f320ea2126480e7285a7e /app/views | |
parent | 06f72627a04d54d2be5289dff9882850e2d48077 (diff) |
branch/tag memorization
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/commits/index.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/_tree.html.haml | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 0e231e4ec2a..f7e8b087b22 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -13,3 +13,10 @@ %h3{:style => "color:#555"} /#{params[:path]} %div{:id => dom_id(@project)} = render "commits" + + +:javascript + $(function(){ + $.cookie('branch', '#{params[:branch]}', { expires: 1 }); + $.cookie('tag', '#{params[:tag]}', { expires: 1 }); + }); diff --git a/app/views/projects/_tree.html.haml b/app/views/projects/_tree.html.haml index af3a209a8ab..d84599ad0c1 100644 --- a/app/views/projects/_tree.html.haml +++ b/app/views/projects/_tree.html.haml @@ -45,6 +45,13 @@ - contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content| = render :partial => "projects/tree_item", :locals => { :content => content } + +:javascript + $(function(){ + $.cookie('branch', '#{params[:branch]}', { expires: 1 }); + $.cookie('tag', '#{params[:tag]}', { expires: 1 }); + }); + :javascript $(function(){ $('select#branch').selectmenu({style:'popup', width:200}); |