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
e1f18476
Commit
e1f18476
authored
Apr 28, 2014
by
Ronny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加zip文件解压时间戳
parent
40a5f5a1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
minder.data.js
src/core/minder.data.js
+3
-3
mindmanager.js
src/protocal/mindmanager.js
+15
-0
xmind.js
src/protocal/xmind.js
+5
-1
No files found.
src/core/minder.data.js
View file @
e1f18476
...
@@ -115,7 +115,7 @@ kity.extendClass( Minder, {
...
@@ -115,7 +115,7 @@ kity.extendClass( Minder, {
return
d
;
return
d
;
}
}
var
start
=
ts
(
new
Date
(),
'开始解析'
);
window
.
start
=
ts
(
new
Date
(),
'开始解析'
);
//*******************
//*******************
json
=
params
.
json
||
(
params
.
json
=
protocal
.
decode
(
local
)
);
json
=
params
.
json
||
(
params
.
json
=
protocal
.
decode
(
local
)
);
...
@@ -126,14 +126,14 @@ kity.extendClass( Minder, {
...
@@ -126,14 +126,14 @@ kity.extendClass( Minder, {
self
.
_afterImportData
(
data
,
params
);
self
.
_afterImportData
(
data
,
params
);
//*******************
//*******************
var
dur
=
ts
(
new
Date
(),
'解析和转化格式结束'
)
-
start
;
var
dur
=
ts
(
new
Date
(),
'解析和转化格式结束'
)
-
window
.
start
;
console
.
log
(
'--- 共'
+
dur
+
'ms ---'
);
console
.
log
(
'--- 共'
+
dur
+
'ms ---'
);
//*******************
//*******************
}
);
}
);
}
else
{
}
else
{
this
.
_afterImportData
(
json
,
params
);
this
.
_afterImportData
(
json
,
params
);
//*******************
//*******************
var
dur
=
ts
(
new
Date
(),
'解析和转化格式结束'
)
-
start
;
var
dur
=
ts
(
new
Date
(),
'解析和转化格式结束'
)
-
window
.
start
;
console
.
log
(
'--- 共'
+
dur
+
'ms ---'
);
console
.
log
(
'--- 共'
+
dur
+
'ms ---'
);
//*******************
//*******************
}
}
...
...
src/protocal/mindmanager.js
View file @
e1f18476
...
@@ -22,6 +22,17 @@ KityMinder.registerProtocal( 'mindmanager', function () {
...
@@ -22,6 +22,17 @@ KityMinder.registerProtocal( 'mindmanager', function () {
'100'
:
[
'ProgressIcon'
,
5
]
'100'
:
[
'ProgressIcon'
,
5
]
};
};
//*******************
function
ts
(
d
,
str
){
var
h
=
d
.
getHours
(),
m
=
d
.
getMinutes
(),
s
=
d
.
getSeconds
(),
ms
=
d
.
getMilliseconds
();
console
.
log
(
'--- '
+
str
+
': '
+
(
h
+
':'
+
m
+
':'
+
s
+
' '
+
ms
)
+
' ---'
);
return
d
;
}
//*******************
function
processTopic
(
topic
,
obj
)
{
function
processTopic
(
topic
,
obj
)
{
//处理文本
//处理文本
obj
.
data
=
{
obj
.
data
=
{
...
@@ -88,6 +99,10 @@ KityMinder.registerProtocal( 'mindmanager', function () {
...
@@ -88,6 +99,10 @@ KityMinder.registerProtocal( 'mindmanager', function () {
entries
.
forEach
(
function
(
entry
)
{
entries
.
forEach
(
function
(
entry
)
{
if
(
entry
.
filename
==
'Document.xml'
)
{
if
(
entry
.
filename
==
'Document.xml'
)
{
entry
.
getData
(
new
zip
.
TextWriter
(),
function
(
text
)
{
entry
.
getData
(
new
zip
.
TextWriter
(),
function
(
text
)
{
//*******************
var
dur
=
ts
(
new
Date
(),
'解压完成'
)
-
window
.
start
;
console
.
log
(
'--- 解压用了'
+
dur
+
'ms ---'
);
//*******************
var
km
=
xml2km
(
$
.
parseXML
(
text
)
);
var
km
=
xml2km
(
$
.
parseXML
(
text
)
);
callback
&&
callback
(
km
);
callback
&&
callback
(
km
);
}
);
}
);
...
...
src/protocal/xmind.js
View file @
e1f18476
...
@@ -94,7 +94,11 @@ KityMinder.registerProtocal( 'xmind', function () {
...
@@ -94,7 +94,11 @@ KityMinder.registerProtocal( 'xmind', function () {
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
dur
=
ts
(
new
Date
(),
'解压完成'
)
-
window
.
start
;
console
.
log
(
'--- 解压用了'
+
dur
+
'ms ---'
);
//*******************
var
km
=
xml2km
(
$
.
parseXML
(
text
)
);
callback
&&
callback
(
km
);
callback
&&
callback
(
km
);
});
});
}
}
...
...
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