|
|
@ -1163,11 +1163,16 @@ class ShixunsController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def get_script_contents
|
|
|
|
def get_script_contents
|
|
|
|
mirrir_script = MirrorScript.find(params[:script_id])
|
|
|
|
if params[:script_id].to_i == -1
|
|
|
|
script = mirrir_script.try(:script)
|
|
|
|
render :json => {contents: "", description: ""}
|
|
|
|
description = mirrir_script.try(:description)
|
|
|
|
else
|
|
|
|
script = modify_shixun_script @shixun, script
|
|
|
|
mirrir_script = MirrorScript.find(params[:script_id])
|
|
|
|
render :json => {contents: script, description: description}
|
|
|
|
script = mirrir_script.try(:script)
|
|
|
|
|
|
|
|
description = mirrir_script.try(:description)
|
|
|
|
|
|
|
|
script = modify_shixun_script @shixun, script
|
|
|
|
|
|
|
|
render :json => {contents: script, description: description}
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def get_common_script
|
|
|
|
def get_common_script
|
|
|
|