From 5a7f7da1f74f289f56008fd41e630c35de4e2db9 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Wed, 15 Jun 2016 15:34:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=B4=B4=E5=90=A7=E5=92=8C?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E9=85=8D=E7=BD=AE=E9=BB=98=E8=AE=A4=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E6=9A=82=E6=97=B6=E8=BF=98=E5=8E=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/org_subfields_controller.rb | 5 ++--- app/views/forums/create.js.erb | 7 +++---- app/views/org_subfields/create.js.erb | 2 -- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/controllers/org_subfields_controller.rb b/app/controllers/org_subfields_controller.rb index 734e8a719..34e996494 100644 --- a/app/controllers/org_subfields_controller.rb +++ b/app/controllers/org_subfields_controller.rb @@ -14,10 +14,9 @@ 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]||"Post") + @subfield.update_attributes(:field_type => params[:field_type]) # admin配置的类型 - update_status_by_type(@subfield, params[:field_type]||"Post") + update_status_by_type(@subfield, params[:field_type]) else @res = false end diff --git a/app/views/forums/create.js.erb b/app/views/forums/create.js.erb index aae5122e4..88e535e72 100644 --- a/app/views/forums/create.js.erb +++ b/app/views/forums/create.js.erb @@ -1,7 +1,6 @@ <%if @save_flag%> -//$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle(); -//$('#reorder_time').click(); - window.location.href= "http://"+"<%= Setting.host_name%>"+"/forums/" + "<%= @forum.id%>" +$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle(); +$('#reorder_time').click(); <%else%> - $("#error").html("<%= @forum.errors.full_messages[0]%>").show(); +$("#error").html("<%= @forum.errors.full_messages[0]%>").show(); <%end %> \ No newline at end of file diff --git a/app/views/org_subfields/create.js.erb b/app/views/org_subfields/create.js.erb index a65f53719..952ed7b2c 100644 --- a/app/views/org_subfields/create.js.erb +++ b/app/views/org_subfields/create.js.erb @@ -4,8 +4,6 @@ $("#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(""); \ No newline at end of file