Commit 2816991d authored by Vanessa's avatar Vanessa

about #261

parent 4ccace5f
......@@ -225,6 +225,7 @@ blogSubtitle1Label=Blog Subtitle:
blogHost1Label=Blog Host:
submmitCommentLabel=Commit Comment
saveLabel=Save
autoSaveLabel=Auto Save
tagLabel=Tag
tagsLabel=Tags
importedLabel=Imported
......
......@@ -225,6 +225,7 @@ blogSubtitle1Label=\u535a\u5ba2\u5b50\u6807\u9898\uff1a
blogHost1Label=\u535a\u5ba2\u5730\u5740\uff1a
submmitCommentLabel=\u63d0\u4ea4\u8bc4\u8bba
saveLabel=\u4fdd\u5b58
autoSaveLabel=\u81ea\u52a8\u4fdd\u5b58
tagLabel=\u6807\u7b7e
tagsLabel=\u6807\u7b7e
importedLabel=\u5df2\u5bfc\u5165
......
......@@ -114,7 +114,8 @@
"navLabel": "${navLabel}",
"userLabel": "${userLabel}",
"changeRoleLabel": "${changeRoleLabel}",
"visitorUserLabel": "${visitorUserLabel}"
"visitorUserLabel": "${visitorUserLabel}",
"autoSaveLabel": "${autoSaveLabel}"
};
admin.init();
......
......@@ -32,7 +32,7 @@ admin.article = {
// 自动保存草稿定时器
autoSaveDraftTimer: "",
// 自动保存间隔
AUTOSAVETIME: 3000,
AUTOSAVETIME: 1000 * 60,
/**
* @description 获取文章并把值塞入发布文章页面
* @param {String} id 文章 id
......@@ -171,7 +171,7 @@ admin.article = {
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus) {
if (isAuto) {
$("#tipMsg").text("TODO:");
$("#tipMsg").text(Label.autoSaveLabel);
admin.article.status.id = result.oId;
return;
}
......@@ -246,7 +246,7 @@ admin.article = {
data: JSON.stringify(requestJSONObject),
success: function(result, textStatus) {
if (isAuto) {
$("#tipMsg").text("TODO:");
$("#tipMsg").text(Label.autoSaveLabel);
return;
}
......@@ -450,7 +450,6 @@ admin.article = {
* @description 自动保存草稿件
*/
_autoSaveToDraft: function() {
console.log("auto");
if ($("#title").val().replace(/\s/g, "") === "" ||
admin.editors.articleEditor.getContent().replace(/\s/g, "") === "" ||
$("#tag").val().replace(/\s/g, "") === "") {
......@@ -458,13 +457,15 @@ admin.article = {
}
if (admin.article.status.id) {
if (admin.article.status.isArticle) {
admin.article.unPublish(true);
admin.article.status.isArticle = false;
admin.article.setStatus();
admin.article.unPublish(true);
} else {
admin.article.update(false, true);
}
} else {
admin.article.add(false, true);
admin.article.status.isArticle = false;
}
},
/**
......@@ -508,7 +509,7 @@ admin.article = {
cache: false,
success: function(result, textStatus) {
if (isAuto) {
$("#tipMsg").text("TODO:");
$("#tipMsg").text(Label.autoSaveLabel);
return;
}
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment