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
9a1f16cb
Commit
9a1f16cb
authored
Feb 28, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into gh-pages
parents
57e57bb5
ac7424be
Changes
1
Hide 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 @
9a1f16cb
...
@@ -91,7 +91,7 @@ $( function () {
...
@@ -91,7 +91,7 @@ $( function () {
var
options
=
{
var
options
=
{
response_type
:
'token'
,
response_type
:
'token'
,
media_type
:
'baidu'
,
media_type
:
'baidu'
,
redirect_uri
:
baseUrl
+
'index.html'
,
redirect_uri
:
window
.
location
.
href
,
client_type
:
'web'
client_type
:
'web'
};
};
baidu
.
frontia
.
social
.
login
(
options
);
baidu
.
frontia
.
social
.
login
(
options
);
...
@@ -129,7 +129,7 @@ $( function () {
...
@@ -129,7 +129,7 @@ $( function () {
by
:
'time'
,
by
:
'time'
,
success
:
function
(
result
)
{
success
:
function
(
result
)
{
if
(
result
.
list
.
length
)
{
if
(
result
.
list
.
length
)
{
if
(
!
isShareLink
)
{
if
(
!
isShareLink
&&
!
thisMapFilename
)
{
loadPersonal
(
result
.
list
[
0
].
path
);
loadPersonal
(
result
.
list
[
0
].
path
);
}
else
{
}
else
{
$user_btn
.
loading
(
false
);
$user_btn
.
loading
(
false
);
...
@@ -141,7 +141,7 @@ $( function () {
...
@@ -141,7 +141,7 @@ $( function () {
}
}
function
addToRecentMenu
(
list
)
{
function
addToRecentMenu
(
list
)
{
list
.
splice
(
8
);
list
.
splice
(
8
);
list
.
forEach
(
function
(
file
)
{
list
.
forEach
(
function
(
file
)
{
$user_menu
.
appendItem
(
{
$user_menu
.
appendItem
(
{
item
:
{
item
:
{
...
@@ -290,7 +290,7 @@ $( function () {
...
@@ -290,7 +290,7 @@ $( function () {
function
loadShare
()
{
function
loadShare
()
{
var
pattern
=
/share_id=
(\w
+
)([
&#
]
|$
)
/
;
var
pattern
=
/share_id=
(\w
+
)([
&#
]
|$
)
/
;
var
match
=
pattern
.
exec
(
window
.
location
.
href
);
var
match
=
pattern
.
exec
(
window
.
top
.
location
.
href
);
if
(
!
match
)
return
;
if
(
!
match
)
return
;
var
shareId
=
match
[
1
];
var
shareId
=
match
[
1
];
var
query
=
new
baidu
.
frontia
.
storage
.
Query
();
var
query
=
new
baidu
.
frontia
.
storage
.
Query
();
...
@@ -308,11 +308,23 @@ $( function () {
...
@@ -308,11 +308,23 @@ $( function () {
}
);
}
);
isShareLink
=
true
;
isShareLink
=
true
;
}
}
function
loadPath
()
{
var
pattern
=
/path=
(
.+
?)([
&#
]
|$
)
/
;
var
match
=
pattern
.
exec
(
window
.
top
.
location
.
href
);
if
(
!
match
)
return
;
thisMapFilename
=
decodeURI
(
match
[
1
]
);
}
loadShare
();
loadShare
();
currentUser
=
baidu
.
frontia
.
getCurrentAccount
();
currentUser
=
baidu
.
frontia
.
getCurrentAccount
();
if
(
currentUser
)
{
if
(
currentUser
)
{
setCurrentUser
(
currentUser
);
setCurrentUser
(
currentUser
);
loadPath
();
if
(
thisMapFilename
)
{
loadPersonal
(
thisMapFilename
);
}
}
else
{
}
else
{
$login_btn
.
appendTo
(
$panel
);
$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