issue局部刷新属性问题

This commit is contained in:
huang 2016-01-22 18:48:40 +08:00
parent 58b5dbdf9a
commit 16cb4add09
3 changed files with 8 additions and 6 deletions

View File

@ -81,7 +81,7 @@ class IssuesController < ApplicationController
@priority_id = params[:priority_id]
@status_id = params[:status_id]
@subject = params[:subject]
@done_ratio = parmas[:done_ratio]
@done_ratio = params[:done_ratio]
@issue_count = @query.issue_count
@issue_pages = Paginator.new @issue_count, @limit, params['page']
params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1
@ -222,7 +222,7 @@ class IssuesController < ApplicationController
def update
if params[:issue_detail]
issue = Issue.find(params[:issue_id])
issue = Issue.find(params[:id])
issue = update_user_issue_detail(issue, params)
@saved = update_user_issue_detail(issue, params)
return

View File

@ -52,9 +52,11 @@
</div>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>activity.description} %>
<%# 局部刷新修改xissue属性 %>
<% unless params[:action] == "index" %>
<div id="div_user_issue_detail_<%=activity.id %>">
<%= render :partial => 'users/project_issue_detail', :locals => {:activity => activity} %>
</div>
<% end %>
<div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>

View File

@ -42,7 +42,7 @@
{:include_blank => false, :selected => @status_id ? @status_id : 0 },
{:onchange=>"remote_function('#issue_query_form_#{activity.id}');",:id=>"status_id",:name=>"status_id",:class=>"w70 undis issueEdit"} %>
<%# end %>
<%= form_tag({:controller => 'issues', :action => 'update', :issue_id => activity.id, :issue_detail => true, :type => "status"},:remote=>'true', :method => :put, :id=>"issue_query_form_#{activity.id}", :class => 'query_form') do %>
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "status"},:remote=>'true', :method => :put, :id=>"issue_query_form_#{activity.id}", :class => 'query_form') do %>
<li>
<p class="label03">&nbsp;状态&nbsp;&nbsp;:&nbsp;</p>
<p class="proInfoP"><span><%= activity.status.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a></p>
@ -54,7 +54,7 @@
</li>
<% end %>
<div class="cl"></div>
<%= form_tag({:controller => 'issues', :action => 'update', :issue_id => activity.id, :issue_detail => true, :type => "assigned"},:remote=>'true', :method => :put, :id=>"issue_query_assign_form_#{activity.id}", :class => 'query_form') do %>
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "assigned"},:remote=>'true', :method => :put, :id=>"issue_query_assign_form_#{activity.id}", :class => 'query_form') do %>
<li>
<p class="label03">&nbsp;指派&nbsp;&nbsp;:&nbsp;</p>
<span class="pro_info_p">
@ -68,7 +68,7 @@
<div class="cl"></div>
</ul>
<ul class="fl">
<%= form_tag({:controller => 'issues', :action => 'update', :issue_id => activity.id, :issue_detail => true, :type => "prior"},:remote=>'true', :method => :put, :id=>"issue_query_prior_form_#{activity.id}", :class => 'query_form') do %>
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "prior"},:remote=>'true', :method => :put, :id=>"issue_query_prior_form_#{activity.id}", :class => 'query_form') do %>
<li>
<p class="label03">&nbsp;优先级&nbsp;&nbsp;:&nbsp;</p>
<span class="proInfoP" style="width:70px;"><span><%= activity.priority.name %></span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>
@ -78,7 +78,7 @@
</li>
<% end %>
<div class="cl"></div>
<%= form_tag({:controller => 'issues', :action => 'update', :issue_id => activity.id, :issue_detail => true, :type => "ratio"},:remote=>'true', :method => :put, :id=>"issue_query_done_form_#{activity.id}", :class => 'query_form') do %>
<%= form_tag({:controller => 'issues', :action => 'update', :id => activity.id, :issue_detail => true, :type => "ratio"},:remote=>'true', :method => :put, :id=>"issue_query_done_form_#{activity.id}", :class => 'query_form') do %>
<li>
<p class="label03">&nbsp;完成度&nbsp;&nbsp;:&nbsp;</p>
<span class="proInfoP" style="width:70px;"><span><%= activity.done_ratio %>%</span> <a href="javascript:void(0)" class="pic_edit2 ml5"></a> </span>