Commit 95012759 authored by techird's avatar techird

bug fixes

parent 7bc1400c
...@@ -312,8 +312,9 @@ KityMinder.LANG['zh-cn'] = { ...@@ -312,8 +312,9 @@ KityMinder.LANG['zh-cn'] = {
'clipboardunsupported': '您的浏览器不支持剪贴板,请使用快捷键复制', 'clipboardunsupported': '您的浏览器不支持剪贴板,请使用快捷键复制',
'save_success': '文档已保存', 'load_success': '<b>{0}</b> 加载成功',
'autosave_success': '文档已自动保存' 'save_success': '<b>{0}</b> 已保存于 {1}',
'autosave_success': '<b>{0}</b> 已自动保存于 {1}'
}, },
'popupcolor': { 'popupcolor': {
'clearColor': '清空颜色', 'clearColor': '清空颜色',
......
...@@ -58,7 +58,7 @@ KityMinder.registerUI('doc', function(minder) { ...@@ -58,7 +58,7 @@ KityMinder.registerUI('doc', function(minder) {
}).then(function(doc) { }).then(function(doc) {
loading = false; loading = false;
if (doc) if (doc)
notice.info( '<b>' + doc.title + '</b> 加载完成'); notice.info( minder.getLang('ui.load_success', doc.title ) );
return doc; return doc;
}); });
} }
......
...@@ -183,10 +183,6 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) { ...@@ -183,10 +183,6 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
if (!file.modifyTime) throw new Error('File Save Error'); if (!file.modifyTime) throw new Error('File Save Error');
saving = false;
if ($mask) $mask.removeClass('loading');
if (!leaveTheMenu) { if (!leaveTheMenu) {
$menu.hide(); $menu.hide();
} }
...@@ -198,7 +194,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) { ...@@ -198,7 +194,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
$doc.save(doc); $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() { setTimeout(function() {
$finder.list($finder.pwd(), true); $finder.list($finder.pwd(), true);
...@@ -210,7 +206,10 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) { ...@@ -210,7 +206,10 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
notice.error('err_save', e); 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() { function setFileName() {
......
...@@ -60,10 +60,18 @@ ...@@ -60,10 +60,18 @@
}); });
$.extend($, { $.extend($, {
pajax: function() { pajax: function(opt) {
var defered = $.ajax.apply($, arguments); opt.cache = false;
return Promise.resolve(defered); 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