add validate script name when upload script

This commit is contained in:
fanfuxiaoran 2014-01-17 14:22:35 +08:00
parent 42505ee570
commit c75b6edf51
2 changed files with 2 additions and 1 deletions

View File

@ -361,6 +361,8 @@ public class ScriptActionController extends BaseControllerService {
if (script.isEmpty()) {
return new String("Failed:empty file!");
}
if(scriptName==null||scriptName.equals(""))
return new String("Failed:empty file name!");
String scenarioModel = new String(script.getBytes());
try {

View File

@ -47,7 +47,6 @@ $('#uploadScript').click(function(){
$('form').ajaxForm({
success: function(responseText){
$('#scriptInfo').html(status);
$("#status").text(responseText);
}
});