diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 80be8c5d5..bd905dec0 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -75,7 +75,11 @@ class IssuesController < ApplicationController else @limit = 10#per_page_option end - + @assign_to_id = params[:assign_to_id] + @author_id = params[:author_id] + @priority_id = params[:priority_id] + @status_id = params[:status_id] + @subject = params[:subject] @issue_count = @query.issue_count @issue_pages = Paginator.new @issue_count, @limit, params['page'] @offset ||= @issue_pages.offset diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 3fb604f06..c1c3ab957 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -34,31 +34,31 @@ <%#= form_tag({:controller => 'issues', :action => 'index', :project_id => @project}, :method => :get,:id=>"issue_query_form", :class => 'query_form') do %> <%= hidden_field_tag 'set_filter', '1' %>
<%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["指派给",0]), - { :include_blank => false,:selected=>0 + { :include_blank => false,:selected=>@assign_to_id.nil? ? @assign_to_id : 0 }, {:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"v[assigned_to_id]",:class=>"w90"} ) %> <%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]), - { :include_blank => false,:selected=>0 + { :include_blank => false,:selected=>@priority_id ? @priority_id : 0 }, {:onchange=>"remote_function();",:id=>"priority_id",:name=>"v[priority_id]",:class=>"w90"} ) %> <%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]), - { :include_blank => false,:selected=>0 + { :include_blank => false,:selected=>@status_id ? @status_id : 0 }, {:onchange=>"remote_function();",:id=>"status_id",:name=>"v[status_id]",:class=>"w90"} ) %> <%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]), - { :include_blank => false,:selected=>0 + { :include_blank => false,:selected=>@author_id ? @author_id : 0 }, {:onchange=>"remote_function();",:id=>"author_id",:name=>"v[author_id]",:class=>"w90"} ) diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 96e3b84be..ceb675dcb 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -30,7 +30,7 @@

-
收起Git操作指南
+
展开Git操作指南

diff --git a/public/javascripts/project.js b/public/javascripts/project.js index f85f744e3..6dbb0ff6b 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -71,13 +71,35 @@ function showhelpAndScrollTo(id) { { cookiesave("repositories_visiable", true,'','',''); } + var information = $("#showgithelp"); + var val = information.attr("value"); + if(val=="show_help") + { + $("#showgithelp").text("收起Git操作指南"); + information.attr("value", "hide_help"); + } + else + { + $("#showgithelp").text("展开Git操作指南"); + information.attr("value", "show_help"); + } } + + $(function(){ + var information = $("#showgithelp"); + var val = information.attr("value"); if(cookieget("repositories_visiable") == "true") { $('#repos_git_more').hide(); } + else + { + $('#repos_git_more').show(); + $("#showgithelp").text("收起Git操作指南"); + information.attr("value", "hide_help"); + } }); diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index c22c90bf8..e6a244b0e 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -180,6 +180,7 @@ a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; col /* 版本库展示Git操作文档 */ .repos_more{height:23px; width:100%; border:1px solid #CCC; background:#F6F6F6; text-align:center; font-size:12px; padding-top:2px;} .lh23{line-height: 23px;} +.repos_git_more{display: none;} /* 弹框 新样式还没设计出来,暂时用的课程那边的样式 */ .alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}