Mercurial > hg > extraction-interface
diff interface/js/check_sections_details.js @ 3:f196939ccc03
error handle and alert feedback to user.
If error occurs, user'll not be halted by the loading page and sections_revisions will recovery to previous version.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 26 Jan 2015 12:19:39 +0100 |
parents | ef6d0c6a13d7 |
children |
line wrap: on
line diff
--- a/interface/js/check_sections_details.js Fri Jan 23 19:00:57 2015 +0100 +++ b/interface/js/check_sections_details.js Mon Jan 26 12:19:39 2015 +0100 @@ -318,8 +318,12 @@ href = reg.exec(href); href=href+"?book_id="+bookId+"&"+count+"&hideDeletedChecked="+hideDeletedChecked+"&editor="+editor; location.href=href; //refresh the page to load the sections saved in db + }else{ - console.log("db not succeeded."); + console.log("db failed. log: ", data); + alert("Saving failed. You've NOT saved your editing."); + alert("Please check your editing again. If the issue remains, please contact us."); + $("#loading").hide(); } },