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
d18c5145
Commit
d18c5145
authored
Jul 07, 2014
by
techird
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复文件状态提示
parent
7458951d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
21 deletions
+20
-21
social.js
social/social.js
+20
-21
No files found.
social/social.js
View file @
d18c5145
...
...
@@ -88,7 +88,7 @@ $(function() {
return
window
.
alert
;
})(),
wordLimit
=
function
(
word
,
limit
)
{
wordLimit
=
function
(
word
,
limit
)
{
limit
=
limit
||
15
;
return
word
.
length
>
limit
?
(
word
.
substr
(
0
,
limit
-
3
)
+
'...'
)
:
word
;
};
...
...
@@ -187,7 +187,9 @@ $(function() {
$file_btn
=
$
(
'<button id="file-btn">文件</button>'
).
addClass
(
'dropdown'
).
appendTo
(
$menu
);
$file_menu
=
$
.
kmuidropmenu
({
data
:
createFileMenu
()})
$file_menu
=
$
.
kmuidropmenu
({
data
:
createFileMenu
()
})
.
addClass
(
'file-menu'
)
.
appendTo
(
'body'
);
...
...
@@ -346,19 +348,14 @@ $(function() {
function
setRemotePath
(
path
,
saved
)
{
var
filename
;
remotePath
=
path
;
if
(
remotePath
)
{
filename
=
getFileName
(
remotePath
);
if
(
!
saved
)
{
filename
=
'* '
+
filename
;
}
$title
.
text
((
filename
));
}
else
if
(
currentAccount
)
{
$title
.
text
((
'* '
+
minder
.
getMinderTitle
()));
}
else
{
$title
.
text
((
filename
||
minder
.
getMinderTitle
()));
}
document
.
title
=
[
filename
||
minder
.
getMinderTitle
(),
titleSuffix
].
join
(
' - '
);
filename
=
remotePath
?
getFileName
(
remotePath
)
:
minder
.
getMinderTitle
();
if
(
!
saved
)
filename
=
'* '
+
filename
;
$title
.
text
(
filename
)
document
.
title
=
[
filename
,
titleSuffix
].
join
(
' - '
);
}
// 检查是否在 Cookie 中登录过了
...
...
@@ -870,12 +867,16 @@ $(function() {
if
(
e
.
shiftKey
)
{
share
();
}
else
{
setTimeout
(
function
()
{
save
();
});
setTimeout
(
function
()
{
save
();
});
}
break
;
case
KM
.
keymap
.
n
:
e
.
preventDefault
();
setTimeout
(
function
()
{
newFile
();
});
setTimeout
(
function
()
{
newFile
();
});
break
;
}
}
...
...
@@ -887,9 +888,7 @@ $(function() {
minder
.
on
(
'contentchange'
,
function
()
{
if
(
!
watchingChanges
||
lastContent
==
minder
.
exportData
(
'json'
))
return
;
var
current
=
draftManager
.
save
();
if
(
currentAccount
)
{
setRemotePath
(
remotePath
,
current
.
sync
);
}
lastContent
=
minder
.
exportData
(
'json'
);
});
}
...
...
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