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
8f05ba07
Commit
8f05ba07
authored
May 06, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of github.com:fex-team/kityminder into dev
parents
d482e4c7
1c9507bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
36 deletions
+51
-36
freemind.js
src/protocal/freemind.js
+15
-10
mindmanager.js
src/protocal/mindmanager.js
+5
-0
xmind.js
src/protocal/xmind.js
+31
-26
No files found.
src/protocal/freemind.js
View file @
8f05ba07
...
@@ -41,6 +41,11 @@ KityMinder.registerProtocal( 'freemind', function () {
...
@@ -41,6 +41,11 @@ KityMinder.registerProtocal( 'freemind', function () {
}
}
}
}
// 处理超链接
if
(
topic
.
LINK
){
obj
.
data
.
hyperlink
=
topic
.
LINK
;
}
//处理子节点
//处理子节点
if
(
topic
.
node
){
if
(
topic
.
node
){
...
@@ -67,19 +72,19 @@ KityMinder.registerProtocal( 'freemind', function () {
...
@@ -67,19 +72,19 @@ KityMinder.registerProtocal( 'freemind', function () {
return
result
;
return
result
;
}
}
return
{
return
{
fileDescription
:
'xmind格式文件'
,
fileDescription
:
'xmind格式文件'
,
fileExtension
:
'.xmind'
,
fileExtension
:
'.xmind'
,
decode
:
function
(
local
)
{
decode
:
function
(
local
)
{
var
json
=
xml2km
(
local
);
var
json
=
xml2km
(
local
);
return
json
;
return
json
;
},
},
// recognize: recognize,
// recognize: recognize,
recognizePriority
:
-
1
recognizePriority
:
-
1
};
};
}
);
}
);
src/protocal/mindmanager.js
View file @
8f05ba07
...
@@ -43,6 +43,11 @@ KityMinder.registerProtocal( 'mindmanager', function () {
...
@@ -43,6 +43,11 @@ KityMinder.registerProtocal( 'mindmanager', function () {
}
}
}
}
// 处理超链接
if
(
topic
.
Hyperlink
)
{
obj
.
data
.
hyperlink
=
topic
.
Hyperlink
.
Url
;
}
//处理子节点
//处理子节点
if
(
topic
.
SubTopics
&&
topic
.
SubTopics
.
Topic
)
{
if
(
topic
.
SubTopics
&&
topic
.
SubTopics
.
Topic
)
{
...
...
src/protocal/xmind.js
View file @
8f05ba07
...
@@ -48,6 +48,11 @@ KityMinder.registerProtocal( 'xmind', function () {
...
@@ -48,6 +48,11 @@ KityMinder.registerProtocal( 'xmind', function () {
}
}
}
}
// 处理超链接
if
(
topic
[
'xlink:href'
]){
obj
.
data
.
hyperlink
=
topic
[
'xlink:href'
];
}
//处理子节点
//处理子节点
if
(
topic
.
children
&&
topic
.
children
.
topics
&&
topic
.
children
.
topics
.
topic
){
if
(
topic
.
children
&&
topic
.
children
.
topics
&&
topic
.
children
.
topics
.
topic
){
var
tmp
=
topic
.
children
.
topics
.
topic
;
var
tmp
=
topic
.
children
.
topics
.
topic
;
...
@@ -81,33 +86,33 @@ KityMinder.registerProtocal( 'xmind', function () {
...
@@ -81,33 +86,33 @@ KityMinder.registerProtocal( 'xmind', function () {
},
onerror
);
},
onerror
);
}
}
return
{
return
{
fileDescription
:
'xmind格式文件'
,
fileDescription
:
'xmind格式文件'
,
fileExtension
:
'.xmind'
,
fileExtension
:
'.xmind'
,
decode
:
function
(
local
)
{
decode
:
function
(
local
)
{
return
{
return
{
then
:
function
(
local
,
callback
){
then
:
function
(
local
,
callback
){
getEntries
(
local
,
function
(
entries
)
{
getEntries
(
local
,
function
(
entries
)
{
entries
.
forEach
(
function
(
entry
)
{
entries
.
forEach
(
function
(
entry
)
{
if
(
entry
.
filename
==
'content.xml'
){
if
(
entry
.
filename
==
'content.xml'
){
entry
.
getData
(
new
zip
.
TextWriter
(),
function
(
text
)
{
entry
.
getData
(
new
zip
.
TextWriter
(),
function
(
text
)
{
var
km
=
xml2km
(
$
.
parseXML
(
text
));
var
km
=
xml2km
(
$
.
parseXML
(
text
));
callback
&&
callback
(
km
);
callback
&&
callback
(
km
);
});
});
}
}
});
});
});
});
}
}
};
};
},
},
// recognize: recognize,
// recognize: recognize,
recognizePriority
:
-
1
recognizePriority
:
-
1
};
};
}
);
}
);
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