|
|
|
@ -229,12 +229,7 @@ function planAdd(){ |
|
|
|
|
var sType = $(".planjs").find("b").attr("val"); |
|
|
|
|
var sBody = encodeURIComponent($("#implement textarea[name='sBody']").val()); |
|
|
|
|
|
|
|
|
|
if(sType == 'toFile'){ |
|
|
|
|
if($("#viewfile").val() == ''){ |
|
|
|
|
layer.msg('请选择脚本文件!',{icon:2}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (sType == 'toShell'){ |
|
|
|
|
if(sBody == ''){ |
|
|
|
|
$("#implement textarea[name='sBody']").focus(); |
|
|
|
|
layer.msg('脚本代码不能为空!',{icon:2}); |
|
|
|
@ -242,6 +237,13 @@ function planAdd(){ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(sType == 'toFile'){ |
|
|
|
|
if($("#viewfile").val() == ''){ |
|
|
|
|
layer.msg('请选择脚本文件!',{icon:2}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var urladdress = $("#urladdress").val(); |
|
|
|
|
if(sType == 'toUrl'){ |
|
|
|
|
if(!isURL(urladdress)){ |
|
|
|
|