markdown 编辑模式下发布存在未保存内容文档时提示保存

pull/147/head
xunjianxiang 2017-09-15 18:12:40 +08:00
parent 9fc44ab501
commit 6563eac237
1 changed files with 6 additions and 0 deletions

View File

@ -91,6 +91,12 @@ $(function () {
}); });
}else if(name === "release"){ }else if(name === "release"){
if(Object.prototype.toString.call(window.documentCategory) === '[object Array]' && window.documentCategory.length > 0){ if(Object.prototype.toString.call(window.documentCategory) === '[object Array]' && window.documentCategory.length > 0){
if($("#markdown-save").hasClass('change')) {
var comfirm_result = confirm("编辑内容未保存,需要保存吗?")
if(comfirm_result) {
saveDocument();
}
}
$.ajax({ $.ajax({
url : window.releaseURL, url : window.releaseURL,
data :{"identify" : window.book.identify }, data :{"identify" : window.book.identify },