Commit 95012759 authored by techird's avatar techird

bug fixes

parent 7bc1400c
......@@ -312,8 +312,9 @@ KityMinder.LANG['zh-cn'] = {
'clipboardunsupported': '您的浏览器不支持剪贴板,请使用快捷键复制',
'save_success': '文档已保存',
'autosave_success': '文档已自动保存'
'load_success': '<b>{0}</b> 加载成功',
'save_success': '<b>{0}</b> 已保存于 {1}',
'autosave_success': '<b>{0}</b> 已自动保存于 {1}'
},
'popupcolor': {
'clearColor': '清空颜色',
......
......@@ -58,7 +58,7 @@ KityMinder.registerUI('doc', function(minder) {
}).then(function(doc) {
loading = false;
if (doc)
notice.info( '<b>' + doc.title + '</b> 加载完成');
notice.info( minder.getLang('ui.load_success', doc.title ) );
return doc;
});
}
......
......@@ -183,10 +183,6 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
if (!file.modifyTime) throw new Error('File Save Error');
saving = false;
if ($mask) $mask.removeClass('loading');
if (!leaveTheMenu) {
$menu.hide();
}
......@@ -198,7 +194,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
$doc.save(doc);
notice.info(msg || minder.getLang('ui.save_success'));
notice.info(msg || minder.getLang('ui.save_success', doc.title, file.modifyTime.toLocaleTimeString()));
setTimeout(function() {
$finder.list($finder.pwd(), true);
......@@ -210,7 +206,10 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
notice.error('err_save', e);
}
return minder.exportData(protocol).then(upload).then(finish, error);
return minder.exportData(protocol).then(upload).then(finish, error).then(function() {
if ($mask) $mask.removeClass('loading');
saving = false;
});
}
function setFileName() {
......
......@@ -60,10 +60,18 @@
});
$.extend($, {
pajax: function() {
var defered = $.ajax.apply($, arguments);
return Promise.resolve(defered);
pajax: function(opt) {
opt.cache = false;
return Promise.resolve($.ajax(opt));
}
});
// preload css images
$(function() {
var list = ["kmcat_warn.png", "kmcat_sad.png", "icons.png", "template_large.png", "history.png", "feedback.png", "iconpriority.png", "iconprogress.png", "template.png", "layout.png", "next-level.png", "prev-level.png"];
list.forEach(function(item) {
(new Image()).src = 'ui/theme/default/images/' + item;
});
});
})();
\ No newline at end of file
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