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
dfbf06a4
Commit
dfbf06a4
authored
Mar 24, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
merge from dev
parents
3ee012c5
70ae9c51
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
draftmanager.js
social/draftmanager.js
+21
-0
social.js
social/social.js
+3
-2
No files found.
social/draftmanager.js
View file @
dfbf06a4
...
...
@@ -8,6 +8,27 @@ function DraftManager( minder ) {
function
init
()
{
drafts
=
localStorage
.
getItem
(
'drafts'
);
drafts
=
drafts
?
JSON
.
parse
(
drafts
)
:
[];
loadDraftForOldVersion
();
}
/**
* @todo 1.2 版本中删除该方法
*
* 加载老版本的草稿
*/
function
loadDraftForOldVersion
()
{
var
path
=
localStorage
.
getItem
(
'draft_filename'
),
data
=
localStorage
.
getItem
(
'draft_data'
);
if
(
path
&&
data
)
{
drafts
.
push
(
{
path
:
path
,
data
:
data
,
name
:
JSON
.
parse
(
data
).
data
.
text
,
update
:
new
Date
()
}
);
localStorage
.
removeItem
(
'draft_filename'
);
localStorage
.
removeItem
(
'draft_data'
);
}
}
function
store
()
{
...
...
social/social.js
View file @
dfbf06a4
...
...
@@ -457,7 +457,8 @@ $( function () {
var
list
=
draftManager
.
list
(),
draft
,
$draft
,
index
;
if
(
!
list
.
length
)
{
return
false
;
draftManager
.
create
();
list
=
draftManager
.
list
();
}
draft
=
list
.
shift
();
...
...
@@ -488,7 +489,7 @@ $( function () {
function
adjustDraftMenu
()
{
var
pos
=
$draft_btn
.
offset
();
pos
.
top
-=
$draft_menu
.
outerHeight
()
+
1
5
;
pos
.
top
-=
$draft_menu
.
outerHeight
()
+
5
;
$draft_menu
.
offset
(
pos
);
}
...
...
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