新建贴吧跳入该贴吧帖子列表,组织栏目配置默认选择第一个栏目类型
This commit is contained in:
parent
d6d9a366f2
commit
fde3fd0d94
|
@ -14,9 +14,10 @@ class OrgSubfieldsController < ApplicationController
|
|||
SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir].downcase)
|
||||
end
|
||||
end
|
||||
@subfield.update_attributes(:field_type => params[:field_type])
|
||||
#默认类型为帖子
|
||||
@subfield.update_attributes(:field_type => params[:field_type]||"Post")
|
||||
# admin配置的类型
|
||||
update_status_by_type(@subfield, params[:field_type])
|
||||
update_status_by_type(@subfield, params[:field_type]||"Post")
|
||||
else
|
||||
@res = false
|
||||
end
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<%if @save_flag%>
|
||||
$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
|
||||
$('#reorder_time').click();
|
||||
//$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
|
||||
//$('#reorder_time').click();
|
||||
window.location.href= "http://"+"<%= Setting.host_name%>"+"/forums/" + "<%= @forum.id%>"
|
||||
<%else%>
|
||||
$("#error").html("<%= @forum.errors.full_messages[0]%>").show();
|
||||
<%end %>
|
||||
$("#error").html("<%= @forum.errors.full_messages[0]%>").show();
|
||||
<%end %>
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<% if @res %>
|
||||
$("#org_subfield_list").html("");
|
||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
||||
$("#sub_field_left_lists").html("");
|
||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||
$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
|
||||
$("#org_subfield_list").html("");
|
||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
|
||||
$("#sub_field_left_lists").html("");
|
||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||
$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
|
||||
//默认选中第一个
|
||||
$("input[name='field_type']").get(0).checked=true;
|
||||
<% end %>
|
||||
$("#subfield_name").val("");
|
||||
$("#sub_dir").val("");
|
Loading…
Reference in New Issue