组织配置里面栏目类型默认为帖子
This commit is contained in:
parent
3a46a409a9
commit
e86419c28b
|
@ -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
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
$("#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