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
ac7424be
Commit
ac7424be
authored
Feb 28, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cloud
parent
bd314791
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
social.js
dist/social.js
+16
-4
No files found.
dist/social.js
View file @
ac7424be
...
...
@@ -91,7 +91,7 @@ $( function () {
var
options
=
{
response_type
:
'token'
,
media_type
:
'baidu'
,
redirect_uri
:
baseUrl
+
'index.html'
,
redirect_uri
:
window
.
location
.
href
,
client_type
:
'web'
};
baidu
.
frontia
.
social
.
login
(
options
);
...
...
@@ -129,7 +129,7 @@ $( function () {
by
:
'time'
,
success
:
function
(
result
)
{
if
(
result
.
list
.
length
)
{
if
(
!
isShareLink
)
{
if
(
!
isShareLink
&&
!
thisMapFilename
)
{
loadPersonal
(
result
.
list
[
0
].
path
);
}
else
{
$user_btn
.
loading
(
false
);
...
...
@@ -141,7 +141,7 @@ $( function () {
}
function
addToRecentMenu
(
list
)
{
list
.
splice
(
8
);
list
.
splice
(
8
);
list
.
forEach
(
function
(
file
)
{
$user_menu
.
appendItem
(
{
item
:
{
...
...
@@ -290,7 +290,7 @@ $( function () {
function
loadShare
()
{
var
pattern
=
/share_id=
(\w
+
)([
&#
]
|$
)
/
;
var
match
=
pattern
.
exec
(
window
.
location
.
href
);
var
match
=
pattern
.
exec
(
window
.
top
.
location
.
href
);
if
(
!
match
)
return
;
var
shareId
=
match
[
1
];
var
query
=
new
baidu
.
frontia
.
storage
.
Query
();
...
...
@@ -308,11 +308,23 @@ $( function () {
}
);
isShareLink
=
true
;
}
function
loadPath
()
{
var
pattern
=
/path=
(
.+
?)([
&#
]
|$
)
/
;
var
match
=
pattern
.
exec
(
window
.
top
.
location
.
href
);
if
(
!
match
)
return
;
thisMapFilename
=
decodeURI
(
match
[
1
]
);
}
loadShare
();
currentUser
=
baidu
.
frontia
.
getCurrentAccount
();
if
(
currentUser
)
{
setCurrentUser
(
currentUser
);
loadPath
();
if
(
thisMapFilename
)
{
loadPersonal
(
thisMapFilename
);
}
}
else
{
$login_btn
.
appendTo
(
$panel
);
}
...
...
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