diff --git a/app/views/common/_extend_file.html.erb b/app/views/common/_extend_file.html.erb new file mode 100644 index 000000000..2569a1fa5 --- /dev/null +++ b/app/views/common/_extend_file.html.erb @@ -0,0 +1,18 @@ +
+ + + <% line_num = 1 %> + <% syntax_highlight_lines(filename, Redmine::CodesetUtil.to_utf8_by_setting(content)).each do |line| %> + + + + + <% line_num += 1 %> + <% end %> + +
+ <%= line_num %> + +
<%= line.html_safe %>
+
+
\ No newline at end of file diff --git a/app/views/common/_file.html.erb b/app/views/common/_file.html.erb index 4fc335b73..48f7440f7 100644 --- a/app/views/common/_file.html.erb +++ b/app/views/common/_file.html.erb @@ -15,4 +15,4 @@ <% end %> - + \ No newline at end of file diff --git a/app/views/games/_extend_tree.html.erb b/app/views/games/_extend_tree.html.erb new file mode 100644 index 000000000..780cd59c4 --- /dev/null +++ b/app/views/games/_extend_tree.html.erb @@ -0,0 +1,22 @@ +
+ + + <% @entries.each do |entry| %> + <% tr_id = Digest::MD5.hexdigest(entry.path) + depth = params[:depth].to_i %> + <% sub_path = entry.path[0] == "/" ? entry.path.sub("/", "") : entry.path %> + <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(sub_path) %> + <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> + + + + + <% end %> + +
+
\ No newline at end of file diff --git a/app/views/games/_myshixun_extend_repository.html.erb b/app/views/games/_myshixun_extend_repository.html.erb index 41539fc37..41dee3c6f 100644 --- a/app/views/games/_myshixun_extend_repository.html.erb +++ b/app/views/games/_myshixun_extend_repository.html.erb @@ -1,18 +1,21 @@

<%= render :partial => 'myshixun_breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %>

- + <% if params[:action] == "entry" %> + + + <% end %>
<% if params[:action] == "entry" %>
- <%= render :partial => 'common/file', :locals => {:filename => @path, :content => @content, :extend => true} %> + <%= render :partial => 'common/extend_file', :locals => {:filename => @path, :content => @content, :extend => true} %>
<% else %> <% unless @entries.blank? %> - <%= render :partial => 'tree', :locals => { :extend => true} %> + <%= render :partial => 'extend_tree', :locals => { :extend => true} %> <% end %> <% end %>
diff --git a/app/views/games/_repository.html.erb b/app/views/games/_repository.html.erb index 9439e0529..2c60698d8 100644 --- a/app/views/games/_repository.html.erb +++ b/app/views/games/_repository.html.erb @@ -12,32 +12,38 @@ $(".content-half-fix02").css("height", web_h - 85 + "px"); $(".content-half-fix02").css("width", "86%"); $(".autoscroll_new").css("height", web_h * 0.61 + "px"); + $(".autoscroll_extend").css("height", web_h * 0.825 + "px"); } else if($.browser.safari) { $(".content-half-fix02").css("height", web_h - 85 + "px"); $(".content-half-fix02").css("width", "86%"); $(".autoscroll_new").css("height", web_h * 0.61 + "px"); + $(".autoscroll_extend").css("height", web_h * 0.825 + "px"); } else if($.browser.mozilla) { $(".content-half-fix02").css("height", web_h - 85 + "px"); $(".content-half-fix02").css("width", "86%"); $(".autoscroll_new").css("height", web_h * 0.595 + "px"); + $(".autoscroll_extend").css("height", web_h * 0.825 + "px"); } else if($.browser.opera) { $(".content-half-fix02").css("height", web_h - 85 + "px"); $(".content-half-fix02").css("width", "86%"); $(".autoscroll_new").css("height", web_h * 0.61 + "px"); + $(".autoscroll_extend").css("height", web_h * 0.825 + "px"); }else if($.browser.chrome){ if(window.navigator.userAgent.indexOf("MetaSr") == -1){ $(".content-half-fix02").css("height", web_h - 85 + "px"); $(".content-half-fix02").css("width", "86%"); $(".autoscroll_new").css("height", web_h * 0.61 + "px"); + $(".autoscroll_extend").css("height", web_h * 0.835 + "px"); }else{ $(".content-half-fix02").css("height", web_h - 80 + "px"); $(".content-half-fix02").css("width", "85.7%"); $(".autoscroll_new").css("height", web_h * 0.58 + "px"); + $(".autoscroll_extend").css("height", web_h * 0.825 + "px"); } } }); diff --git a/public/stylesheets/css/taskstyle.css b/public/stylesheets/css/taskstyle.css index bcdf60494..259f364cf 100644 --- a/public/stylesheets/css/taskstyle.css +++ b/public/stylesheets/css/taskstyle.css @@ -169,3 +169,4 @@ input.knowledge_frame{height:30px;line-height:30px;border:none;background:#f3f5f .content-half-fix02{margin:0; position: absolute; top:65px; z-index:99; right:45px;} .autoscroll_new{ overflow:auto; } +.autoscroll_extend{ overflow:auto; }