Commit 4cb30e8c authored by techird's avatar techird

修复保存点取消还继续的问题

parent 9d5a594d
......@@ -174,7 +174,7 @@ $(function() {
$file_btn = $('<button id="file-btn">文件</button>').addClass('dropdown').appendTo($menu);
$file_menu = $.kmuidropmenu({ data: createFileMenu() })
$file_menu = $.kmuidropmenu({data: createFileMenu()})
.addClass('file-menu')
.appendTo('body');
......@@ -712,14 +712,23 @@ $(function() {
minder.execCommand('camera', minder.getRoot(), 300);
}
function generateRemotePath() {
var filename = window.prompt("请输入文件名: ", minder.getMinderTitle()) || minder.getMinderTitle();
function generateRemotePath(filename) {
return '/apps/kityminder/' + filename + '.km';
}
function save() {
if (!currentAccount || save.busy) return;
var uploadPath, filename;
if (!remotePath) {
filename = window.prompt('请输入文件名: ', minder.getMinderTitle())
if (!filename) return;
uploadPath = generateRemotePath(filename);
} else {
uploadPath = remotePath;
}
save.busy = true;
var data = minder.exportData('json');
......@@ -745,7 +754,7 @@ $(function() {
upload.tryCount = 0;
return;
}
var uploadPath = remotePath || generateRemotePath();
$title.loading('正在保存 “' + getFileName(uploadPath) + '” ...');
sto.uploadTextFile(data, uploadPath, {
ondup: remotePath ? sto.constant.ONDUP_OVERWRITE : sto.constant.ONDUP_NEWCOPY,
......
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