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