diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-22 19:34:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-22 19:34:21 +0000 |
commit | 33003e5b2d881a30df7dc37a0c2a7b07b2a67ebe (patch) | |
tree | 1a08550ffa2f665d9a64aeb68001cb7074571f5c /app/views | |
parent | 8ca4d35dcc466df18b0fa6a322d00b030b183d15 (diff) | |
download | redmine-33003e5b2d881a30df7dc37a0c2a7b07b2a67ebe.tar.gz redmine-33003e5b2d881a30df7dc37a0c2a7b07b2a67ebe.zip |
SCM browser: directories can now be collapsed and re-expanded with no additional request.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@863 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/repositories/_dir_list.rhtml | 2 | ||||
-rw-r--r-- | app/views/repositories/_dir_list_content.rhtml | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/views/repositories/_dir_list.rhtml b/app/views/repositories/_dir_list.rhtml index b9c3fd54c..1ed623ae8 100644 --- a/app/views/repositories/_dir_list.rhtml +++ b/app/views/repositories/_dir_list.rhtml @@ -1,4 +1,4 @@ -<table class="list"> +<table class="list" id="browser"> <thead> <tr id="root"> <th><%= l(:field_name) %></th> diff --git a/app/views/repositories/_dir_list_content.rhtml b/app/views/repositories/_dir_list_content.rhtml index 742da4951..3dfe4319b 100644 --- a/app/views/repositories/_dir_list_content.rhtml +++ b/app/views/repositories/_dir_list_content.rhtml @@ -1,15 +1,15 @@ <% @entries.each do |entry| %> <% tr_id = Digest::MD5.hexdigest(entry.path) depth = params[:depth].to_i %> -<tr id="<%= tr_id %>"> +<tr id="<%= tr_id %>" class="<%= params[:parent_id] %>"> <td> <%= if entry.is_dir? link_to_remote h(entry.name), - {:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1)}, + {:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id}, :update => tr_id, :position => :after, - :success => "Element.addClassName('#{tr_id}', 'open');", - :condition => "!Element.hasClassName('#{tr_id}', 'open')" + :success => "scmEntryLoaded('#{tr_id}')", + :condition => "scmEntryClick('#{tr_id}')" }, {:href => url_for({:action => 'browse', :id => @project, :path => entry.path, :rev => @rev}), :class => ('icon icon-folder'), |