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
Hide 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
...
@@ -87,8 +87,8 @@ $(function() {
...
@@ -87,8 +87,8 @@ $(function() {
notice
=
(
function
()
{
notice
=
(
function
()
{
return
window
.
alert
;
return
window
.
alert
;
})(),
})(),
wordLimit
=
function
(
word
,
limit
)
{
wordLimit
=
function
(
word
,
limit
)
{
limit
=
limit
||
15
;
limit
=
limit
||
15
;
return
word
.
length
>
limit
?
(
word
.
substr
(
0
,
limit
-
3
)
+
'...'
)
:
word
;
return
word
.
length
>
limit
?
(
word
.
substr
(
0
,
limit
-
3
)
+
'...'
)
:
word
;
};
};
...
@@ -124,7 +124,7 @@ $(function() {
...
@@ -124,7 +124,7 @@ $(function() {
acceptFiles
.
push
(
p
.
fileExtension
);
acceptFiles
.
push
(
p
.
fileExtension
);
}
}
});
});
function
importUseEncoding
(
encoding
)
{
function
importUseEncoding
(
encoding
)
{
return
function
()
{
return
function
()
{
$
(
'<input type="file" />'
)
$
(
'<input type="file" />'
)
...
@@ -187,7 +187,9 @@ $(function() {
...
@@ -187,7 +187,9 @@ $(function() {
$file_btn
=
$
(
'<button id="file-btn">文件</button>'
).
addClass
(
'dropdown'
).
appendTo
(
$menu
);
$file_btn
=
$
(
'<button id="file-btn">文件</button>'
).
addClass
(
'dropdown'
).
appendTo
(
$menu
);
$file_menu
=
$
.
kmuidropmenu
({
data
:
createFileMenu
()})
$file_menu
=
$
.
kmuidropmenu
({
data
:
createFileMenu
()
})
.
addClass
(
'file-menu'
)
.
addClass
(
'file-menu'
)
.
appendTo
(
'body'
);
.
appendTo
(
'body'
);
...
@@ -346,19 +348,14 @@ $(function() {
...
@@ -346,19 +348,14 @@ $(function() {
function
setRemotePath
(
path
,
saved
)
{
function
setRemotePath
(
path
,
saved
)
{
var
filename
;
var
filename
;
remotePath
=
path
;
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 中登录过了
// 检查是否在 Cookie 中登录过了
...
@@ -870,12 +867,16 @@ $(function() {
...
@@ -870,12 +867,16 @@ $(function() {
if
(
e
.
shiftKey
)
{
if
(
e
.
shiftKey
)
{
share
();
share
();
}
else
{
}
else
{
setTimeout
(
function
()
{
save
();
});
setTimeout
(
function
()
{
save
();
});
}
}
break
;
break
;
case
KM
.
keymap
.
n
:
case
KM
.
keymap
.
n
:
e
.
preventDefault
();
e
.
preventDefault
();
setTimeout
(
function
()
{
newFile
();
});
setTimeout
(
function
()
{
newFile
();
});
break
;
break
;
}
}
}
}
...
@@ -887,9 +888,7 @@ $(function() {
...
@@ -887,9 +888,7 @@ $(function() {
minder
.
on
(
'contentchange'
,
function
()
{
minder
.
on
(
'contentchange'
,
function
()
{
if
(
!
watchingChanges
||
lastContent
==
minder
.
exportData
(
'json'
))
return
;
if
(
!
watchingChanges
||
lastContent
==
minder
.
exportData
(
'json'
))
return
;
var
current
=
draftManager
.
save
();
var
current
=
draftManager
.
save
();
if
(
currentAccount
)
{
setRemotePath
(
remotePath
,
current
.
sync
);
setRemotePath
(
remotePath
,
current
.
sync
);
}
lastContent
=
minder
.
exportData
(
'json'
);
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