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
9a1b9a1b
Commit
9a1b9a1b
authored
May 12, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
social.js
parent
4a5b3b73
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
49 deletions
+89
-49
index.html
dist/index.html
+11
-11
social.js
dist/social/social.js
+39
-19
social.js
social/social.js
+39
-19
No files found.
dist/index.html
View file @
9a1b9a1b
...
...
@@ -7,26 +7,26 @@
<meta
name=
"description"
content=
"百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。"
>
<script
src=
"lib/jquery-2.1.0.min.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"lib/ZeroClipboard.min.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"lib/jquery-2.1.0.min.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
src=
"lib/ZeroClipboard.min.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
type=
"text/javascript"
>
ZeroClipboard
.
setDefaults
(
{
moviePath
:
'lib/ZeroClipboard.swf'
}
);
</script>
<script
src=
"lib/kitygraph.all.min.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"kityminder.all.min.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"kityminder.config.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"lang/zh-cn/zh-cn.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"lib/kitygraph.all.min.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
src=
"kityminder.all.min.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
src=
"kityminder.config.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
src=
"lang/zh-cn/zh-cn.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
src=
"lib/zip.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"lib/zip.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script>
zip
.
inflateJSPath
=
'lib/inflate.js'
;
</script>
<script
src=
"lib/jquery.xml2json.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"lib/baidu-frontia-js-full-1.0.0.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"social/draftmanager.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"social/social.js?_=13998
24598062
"
charset=
"utf-8"
></script>
<script
src=
"lib/jquery.xml2json.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
src=
"lib/baidu-frontia-js-full-1.0.0.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
src=
"social/draftmanager.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<script
src=
"social/social.js?_=13998
93922286
"
charset=
"utf-8"
></script>
<link
href=
"social/social.css"
rel=
"stylesheet"
>
<link
href=
"themes/default/css/import.css"
type=
"text/css"
rel=
"stylesheet"
/>
...
...
dist/social/social.js
View file @
9a1b9a1b
...
...
@@ -197,38 +197,39 @@ $( function () {
if
(
!
match
)
return
;
var
shareId
=
match
[
1
];
var
query
=
new
baidu
.
frontia
.
storage
.
Query
();
query
.
on
(
'shareMinder.id'
).
equal
(
shareId
);
$share_btn
.
loading
(
'正在加载分享内容...'
);
baidu
.
frontia
.
storage
.
findData
(
query
,
{
success
:
function
(
ret
)
{
if
(
ret
.
count
===
0
)
{
$share_btn
.
loading
(
false
);
return
notice
(
'加载分享内容失败!请确认分享链接正确。'
);
$
.
ajax
(
{
url
:
'http://naotu.baidu.com/mongo.php'
,
data
:
{
action
:
'find'
,
id
:
shareId
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
error
)
{
return
notice
(
data
.
error
);
}
if
(
draftManager
)
{
var
draft
=
draftManager
.
openByPath
(
'share/'
+
shareId
);
if
(
draft
)
{
draftManager
.
load
();
}
else
{
draftManager
.
create
(
'share/'
+
shareId
);
minder
.
importData
(
ret
.
result
[
0
].
obj
.
shareMinder
.
data
,
'json'
);
minder
.
importData
(
data
.
shareMinder
.
data
,
'json'
);
}
}
else
{
minder
.
importData
(
ret
.
result
[
0
].
obj
.
shareMinder
.
data
,
'json'
);
minder
.
importData
(
data
.
shareMinder
.
data
,
'json'
);
}
setRemotePath
(
null
,
false
);
$share_btn
.
loading
(
false
);
},
error
:
function
(
e
)
{
console
.
log
(
e
);
error
:
function
()
{
notice
(
'请求分享文件失败,请重试!'
);
}
}
);
$share_btn
.
loading
(
'正在加载分享内容...'
);
isShareLink
=
true
;
}
...
...
@@ -676,12 +677,31 @@ $( function () {
$share_btn
.
loading
(
'正在分享...'
);
baidu
.
frontia
.
storage
.
insertData
(
shareData
,
{
success
:
function
()
{
$share_dialog
.
show
();
$share_url
.
val
(
shareUrl
)[
0
].
select
();
$
.
ajax
({
url
:
'http://naotu.baidu.com/mongo.php'
,
type
:
'POST'
,
data
:
{
action
:
'insert'
,
record
:
JSON
.
stringify
(
{
shareMinder
:
{
id
:
shareId
,
data
:
minder
.
exportData
(
'json'
)
}
}
)
},
success
:
function
(
result
)
{
if
(
result
.
error
)
{
notice
(
result
.
error
);
}
else
{
$share_dialog
.
show
();
$share_url
.
val
(
shareUrl
)[
0
].
select
();
}
},
error
:
function
()
{
notice
(
'分享失败,可能是当前的环境不支持该操作。'
);
}
}
);
shareConfig
.
bdTitle
=
shareConfig
.
bdText
=
minder
.
getMinderTitle
();
shareConfig
.
bdDesc
=
shareConfig
.
bdText
=
'“'
+
minder
.
getMinderTitle
()
+
'” - 我用百度脑图制作的思维导图,快看看吧!(地址:'
+
shareUrl
+
')'
;
shareConfig
.
bdUrl
=
shareUrl
;
...
...
social/social.js
View file @
9a1b9a1b
...
...
@@ -197,38 +197,39 @@ $( function () {
if
(
!
match
)
return
;
var
shareId
=
match
[
1
];
var
query
=
new
baidu
.
frontia
.
storage
.
Query
();
query
.
on
(
'shareMinder.id'
).
equal
(
shareId
);
$share_btn
.
loading
(
'正在加载分享内容...'
);
baidu
.
frontia
.
storage
.
findData
(
query
,
{
success
:
function
(
ret
)
{
if
(
ret
.
count
===
0
)
{
$share_btn
.
loading
(
false
);
return
notice
(
'加载分享内容失败!请确认分享链接正确。'
);
$
.
ajax
(
{
url
:
'http://naotu.baidu.com/mongo.php'
,
data
:
{
action
:
'find'
,
id
:
shareId
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
error
)
{
return
notice
(
data
.
error
);
}
if
(
draftManager
)
{
var
draft
=
draftManager
.
openByPath
(
'share/'
+
shareId
);
if
(
draft
)
{
draftManager
.
load
();
}
else
{
draftManager
.
create
(
'share/'
+
shareId
);
minder
.
importData
(
ret
.
result
[
0
].
obj
.
shareMinder
.
data
,
'json'
);
minder
.
importData
(
data
.
shareMinder
.
data
,
'json'
);
}
}
else
{
minder
.
importData
(
ret
.
result
[
0
].
obj
.
shareMinder
.
data
,
'json'
);
minder
.
importData
(
data
.
shareMinder
.
data
,
'json'
);
}
setRemotePath
(
null
,
false
);
$share_btn
.
loading
(
false
);
},
error
:
function
(
e
)
{
console
.
log
(
e
);
error
:
function
()
{
notice
(
'请求分享文件失败,请重试!'
);
}
}
);
$share_btn
.
loading
(
'正在加载分享内容...'
);
isShareLink
=
true
;
}
...
...
@@ -676,12 +677,31 @@ $( function () {
$share_btn
.
loading
(
'正在分享...'
);
baidu
.
frontia
.
storage
.
insertData
(
shareData
,
{
success
:
function
()
{
$share_dialog
.
show
();
$share_url
.
val
(
shareUrl
)[
0
].
select
();
$
.
ajax
({
url
:
'http://naotu.baidu.com/mongo.php'
,
type
:
'POST'
,
data
:
{
action
:
'insert'
,
record
:
JSON
.
stringify
(
{
shareMinder
:
{
id
:
shareId
,
data
:
minder
.
exportData
(
'json'
)
}
}
)
},
success
:
function
(
result
)
{
if
(
result
.
error
)
{
notice
(
result
.
error
);
}
else
{
$share_dialog
.
show
();
$share_url
.
val
(
shareUrl
)[
0
].
select
();
}
},
error
:
function
()
{
notice
(
'分享失败,可能是当前的环境不支持该操作。'
);
}
}
);
shareConfig
.
bdTitle
=
shareConfig
.
bdText
=
minder
.
getMinderTitle
();
shareConfig
.
bdDesc
=
shareConfig
.
bdText
=
'“'
+
minder
.
getMinderTitle
()
+
'” - 我用百度脑图制作的思维导图,快看看吧!(地址:'
+
shareUrl
+
')'
;
shareConfig
.
bdUrl
=
shareUrl
;
...
...
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