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
908171a9
Commit
908171a9
authored
Mar 24, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存容错
parent
f320920a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
19 deletions
+26
-19
social.js
social/social.js
+26
-19
No files found.
social/social.js
View file @
908171a9
...
...
@@ -338,28 +338,35 @@ $( function () {
var
data
=
minder
.
exportData
(
'json'
);
var
sto
=
baidu
.
frontia
.
personalStorage
;
try
{
sto
.
uploadTextFile
(
data
,
remotePath
||
generateRemotePath
(),
{
ondup
:
remotePath
?
sto
.
constant
.
ONDUP_OVERWRITE
:
sto
.
constant
.
ONDUP_NEWCOPY
,
success
:
function
(
savedFile
)
{
if
(
savedFile
.
path
)
{
if
(
!
remotePath
)
{
addToRecentMenu
(
[
savedFile
]
);
}
setRemotePath
(
savedFile
.
path
,
true
);
$save_btn
.
text
(
'已保存!'
);
function
error
(
reason
)
{
notice
(
reason
+
'
\
n建议您将脑图以 .km 格式导出到本地!'
);
$save_btn
.
loading
(
false
);
clearTimeout
(
timeout
);
}
var
timeout
=
setTimeout
(
function
()
{
error
(
'保存到云盘超时,可能是网络不稳定导致。'
);
},
15000
);
sto
.
uploadTextFile
(
data
,
remotePath
||
generateRemotePath
(),
{
ondup
:
remotePath
?
sto
.
constant
.
ONDUP_OVERWRITE
:
sto
.
constant
.
ONDUP_NEWCOPY
,
success
:
function
(
savedFile
)
{
if
(
savedFile
.
path
)
{
if
(
!
remotePath
)
{
addToRecentMenu
(
[
savedFile
]
);
}
setRemotePath
(
savedFile
.
path
,
true
);
$save_btn
.
text
(
'已保存!'
);
draftManager
.
save
(
remotePath
);
},
error
:
function
(
error
)
{
notice
(
'保存到云盘失败,建议您将脑图以 .km 格式导出到本地!'
);
$save_btn
.
loading
(
false
);
clearTimeout
(
timeout
);
}
else
{
error
(
'保存到云盘失败,可能是网络问题导致!'
);
}
}
);
}
catch
(
e
)
{
notice
(
'保存到云盘失败:'
+
e
.
message
+
'
\
n建议您将脑图以 .km 格式导出到本地!
'
);
$save_btn
.
loading
(
false
);
}
}
,
error
:
function
(
e
)
{
error
(
'保存到云盘失败
'
);
}
}
);
$save_btn
.
loading
(
'正在保存...'
);
}
...
...
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