Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
4cb30e8c
Commit
4cb30e8c
authored
Jul 06, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复保存点取消还继续的问题
parent
9d5a594d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
social.js
social/social.js
+13
-4
No files found.
social/social.js
View file @
4cb30e8c
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment