解决一下三个bug:
1.新建组织文章时,置标题和描述为空,点击取消按钮,却弹出“标题不能为空”的提示信息 2.课程/项目关联组织:点击取消按钮不应该直接收起关联组织列表 3.组织详情页面内再编辑组织,点击确定编辑的按钮后又返回组织列表页面,应返回组织详情页面
This commit is contained in:
parent
58365e8892
commit
b05708f6e8
|
@ -38,12 +38,19 @@ class OrgDocumentCommentsController < ApplicationController
|
|||
act.update_attributes(:updated_at => @org_document.updated_at)
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html {redirect_to organization_org_document_comments_path(:organization_id => @org_document.organization.id)}
|
||||
format.html {
|
||||
if params[:flag] == 0
|
||||
redirect_to organization_org_document_comments_path(:organization_id => @org_document.organization.id)
|
||||
else
|
||||
redirect_to org_document_comment_path(@org_document.root.id, :organization_id => @org_document.organization.id)
|
||||
end
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@org_document = OrgDocumentComment.find(params[:id])
|
||||
@flag = params[:flag]
|
||||
@organization = Organization.find(params[:organization_id])
|
||||
end
|
||||
|
||||
|
|
|
@ -68,8 +68,7 @@
|
|||
});
|
||||
});
|
||||
function cancel_join_orgs() {
|
||||
$("#search_orgs_result_list").html("");
|
||||
$("#paginator").css("display", "none")
|
||||
$("#join_orgs_for_course input:checked").attr("checked", false);
|
||||
}
|
||||
function course_join_org(courseId) {
|
||||
$.ajax({
|
||||
|
|
|
@ -25,13 +25,14 @@
|
|||
$("#document_title").val("");
|
||||
org_document_description_editor.html("");
|
||||
org_document_description_editor.sync();
|
||||
$('#org_document_editor').hide(); $('#doc_title_hint').hide();
|
||||
$('#org_document_editor').hide();
|
||||
$('#doc_title_hint').hide();
|
||||
}
|
||||
</script>
|
||||
<%= form_tag organization_org_document_comments_path(:organization_id => @organization.id), :id => 'new_org_document_form' do |f| %>
|
||||
<div class="resources">
|
||||
<div>
|
||||
<input class="postDetailInput fl" maxlength="250" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" onblur="check_org_title();" placeholder="请输入文章标题" />
|
||||
<input class="postDetailInput fl" maxlength="250" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" placeholder="请输入文章标题" />
|
||||
</div>
|
||||
<div id="doc_title_hint"></div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<%= form_tag url_for(:controller => 'org_document_comments',:action => 'update', :id => @org_document.id),:method => 'put', :id => 'new_org_document_form' do |f| %>
|
||||
<%= form_tag url_for(:controller => 'org_document_comments',:action => 'update', :id => @org_document.id, :flag => @flag),:method => 'put', :id => 'new_org_document_form' do |f| %>
|
||||
<div class="resources">
|
||||
<div>
|
||||
<input class="postDetailInput fl mr15" style="margin-bottom:15px;" name="org_document_comment[title]" id="document_title" style="resize:none;" onfocus = "$('#org_document_editor').show();" onblur="check_org_title();" value="<%= @org_document.title %>" />
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "编辑文章", edit_org_document_comment_path(:id => @document.id, :organization_id => @document.organization_id), :class => "postOptionLink" %>
|
||||
<%= link_to "编辑文章", edit_org_document_comment_path(:id => @document.id, :organization_id => @document.organization_id, :flag => 1), :class => "postOptionLink" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "删除文章", org_document_comment_path(:id => @document.id, :organization_id => @document.organization_id), :method => 'delete',
|
||||
|
|
|
@ -79,7 +79,8 @@
|
|||
});
|
||||
});
|
||||
function cancel_join_courses() {
|
||||
$("#search_courses_result_list").html("");
|
||||
$("#join_courses_form input:checked").attr("checked", false);
|
||||
//$("#search_courses_result_list").html("");
|
||||
}
|
||||
function org_join_courses(orgId) {
|
||||
$.ajax({
|
||||
|
|
|
@ -75,7 +75,8 @@
|
|||
});
|
||||
});
|
||||
function cancel_join_projects() {
|
||||
$("#search_projects_result_list").html("");
|
||||
$("#join_projects_form input:checked").attr("checked", false);
|
||||
//$("#search_projects_result_list").html("");
|
||||
}
|
||||
function org_join_projects(orgId) {
|
||||
$.ajax({
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "编辑文章", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :class => "postOptionLink" %>
|
||||
<%= link_to "编辑文章", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id, :flag => 0), :class => "postOptionLink" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "删除文章", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete',
|
||||
|
|
|
@ -67,9 +67,7 @@
|
|||
});
|
||||
});
|
||||
function cancel_join_orgs() {
|
||||
$("#search_orgs_result_list").html("");
|
||||
$("#paginator").html("");
|
||||
$("#paginator").css("display", "none");
|
||||
$("#join_orgs_for_project input:checked").attr("checked", false);
|
||||
}
|
||||
function join_org(projectId) {
|
||||
$.ajax({
|
||||
|
|
Loading…
Reference in New Issue