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