fix for desktop

This commit is contained in:
Harry Bomrah 2014-12-03 18:17:39 +08:00
parent e5815dccd7
commit b195e043e6
1 changed files with 8 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class Admin::WritingConferencesController < OrbitMemberController
@writing_conference = WritingConference.new(conference_params) @writing_conference = WritingConference.new(conference_params)
@writing_conference.save @writing_conference.save
if params[:desktop] == "true" if params[:desktop] == "true"
render json: get_paper_list.to_json render json: {"data" => get_paper_list}.to_json
else else
redirect_to params['referer_url'] redirect_to params['referer_url']
end end
@ -45,7 +45,7 @@ class Admin::WritingConferencesController < OrbitMemberController
@writing_conference.update_attributes(conference_params) @writing_conference.update_attributes(conference_params)
@writing_conference.save @writing_conference.save
if params[:desktop] == "true" if params[:desktop] == "true"
render json: get_paper_list.to_json render json: {"data" => get_paper_list}.to_json
else else
redirect_to params['referer_url'] redirect_to params['referer_url']
end end
@ -53,6 +53,12 @@ class Admin::WritingConferencesController < OrbitMemberController
def destroy def destroy
@writing_conference.destroy @writing_conference.destroy
respond_to do |format|
format.html { redirect_to(admin_writing_conferences_url) }
# format.xml { head :ok }
format.js
format.json {render json: {"success" => true}}
end
end end
def toggle_hide def toggle_hide