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 - {  
369 - alert(response.message); 367 + if (200 != response.status) {
  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,13 +417,16 @@ @@ -419,13 +417,16 @@
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 () {  
423 - var div = document.getElementById("addModal");  
424 - div.style.display = "none";  
425 - },  
426 - error: function () {  
427 - alert("failed"); 420 + success: function (response) {
  421 + if (200 != response.status) {
  422 + alert(response.message);
  423 + }
  424 + else {
  425 + var div = document.getElementById("addModal");
  426 + div.style.display = "none";
  427 + }
428 } 428 }
  429 +
429 } 430 }
430 ); 431 );
431 432