Authored by jack.xue

fix ip validate

@@ -364,12 +364,10 @@ @@ -364,12 +364,10 @@
364 moUrl: $("#updateModal #moUrl").val() 364 moUrl: $("#updateModal #moUrl").val()
365 }, 365 },
366 success: function (response) { 366 success: function (response) {
367 - if (200!=response.status)  
368 - { 367 + if (200 != response.status) {
369 alert(response.message); 368 alert(response.message);
370 } 369 }
371 - else  
372 - { 370 + else {
373 var div = document.getElementById("updateModal"); 371 var div = document.getElementById("updateModal");
374 div.style.display = "none"; 372 div.style.display = "none";
375 } 373 }
@@ -419,14 +417,17 @@ @@ -419,14 +417,17 @@
419 moTags: $("#addModal #moTags").val(), 417 moTags: $("#addModal #moTags").val(),
420 moUrl: $("#addModal #moUrl").val() 418 moUrl: $("#addModal #moUrl").val()
421 }, 419 },
422 - success: function () { 420 + success: function (response) {
  421 + if (200 != response.status) {
  422 + alert(response.message);
  423 + }
  424 + else {
423 var div = document.getElementById("addModal"); 425 var div = document.getElementById("addModal");
424 div.style.display = "none"; 426 div.style.display = "none";
425 - },  
426 - error: function () {  
427 - alert("failed");  
428 } 427 }
429 } 428 }
  429 +
  430 + }
430 ); 431 );
431 432
432 } 433 }