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
e9d87fe6
Commit
e9d87fe6
authored
Sep 16, 2014
by
zhangbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add rediret && bug fix
parent
1e41f4c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
24 deletions
+54
-24
_share.less
ui/theme/default/css/_share.less
+12
-11
switch-view.js
ui/topbar/switch-view.js
+23
-13
viewshare.html
viewshare.html
+19
-0
No files found.
ui/theme/default/css/_share.less
View file @
e9d87fe6
...
@@ -229,8 +229,7 @@
...
@@ -229,8 +229,7 @@
font-size: 16px;
font-size: 16px;
padding-left: 15px;
padding-left: 15px;
border-bottom: none;
border-bottom: none;
position: absolute;
.dock;
width: 100%;
}
}
.priority {
.priority {
height: 20px;
height: 20px;
...
@@ -310,16 +309,18 @@
...
@@ -310,16 +309,18 @@
padding: 3px 5px;
padding: 3px 5px;
border-radius: 2px;
border-radius: 2px;
font-size: 12px;
font-size: 12px;
line-height: 16px;
color: rgb(77, 65, 0);
color: rgb(77, 65, 0);
vertical-align: middle;
vertical-align: middle;
margin-left: 8px;
margin: 14px 8px;
float: right;
}
}
.hyperlink {
.hyperlink {
display:
inline-
block;
display: block;
/* float: left; */
float: right;
width: 30px;
width: 30px;
height: 20px;
height: 20px;
margin
-left
: 15px;
margin: 15px;
padding: 0;
padding: 0;
background: url(../images/icons.png) no-repeat 0 -80px;
background: url(../images/icons.png) no-repeat 0 -80px;
background-size: 20px;
background-size: 20px;
...
@@ -355,11 +356,11 @@
...
@@ -355,11 +356,11 @@
.dock;
.dock;
}
}
.text {
.text {
width:12em;
display: block;
white-space:nowrap;
white-space:
nowrap;
text-overflow:ellipsis;
text-overflow:
ellipsis;
-o-text-overflow:ellipsis;
-o-text-overflow:
ellipsis;
overflow:hidden;
overflow:
hidden;
vertical-align: middle;
vertical-align: middle;
}
}
}
}
\ No newline at end of file
ui/topbar/switch-view.js
View file @
e9d87fe6
...
@@ -14,16 +14,16 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
...
@@ -14,16 +14,16 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
$
(
'<div class="back"></div>'
).
appendTo
(
'#m-logo'
);
$
(
'<div class="back"></div>'
).
appendTo
(
'#m-logo'
);
var
treeData
;
var
treeData
;
var
$curView
=
$
(
'<div>'
);
var
$curView
=
$
(
'<div
id="curView"
>'
);
var
$preView
=
$
(
'<div>'
);
var
$preView
=
$
(
'<div
id="preView"
>'
);
minder
.
on
(
'uiready'
,
function
()
{
minder
.
on
(
'uiready'
,
function
()
{
var
shareView
=
minder
.
getUI
(
'menu/share/m-share'
);
var
shareView
=
minder
.
getUI
(
'menu/share/m-share'
);
shareView
.
ready
.
then
(
function
(){
shareView
.
ready
.
then
(
function
(){
treeData
=
addParentPointer
(
minder
);
treeData
=
addParentPointer
(
minder
);
$curView
=
renderNodeData
(
treeData
,
minder
,
$curView
);
renderNodeData
(
treeData
,
minder
,
$curView
);
$preView
=
renderNodeData
(
treeData
,
minder
,
$preView
);
renderNodeData
(
treeData
,
minder
,
$preView
);
$
(
'#km-list-view'
).
append
(
$curView
);
$
(
'#km-list-view'
).
append
(
$curView
);
$
(
'#km-list-view'
).
append
(
$preView
);
$
(
'#km-list-view'
).
append
(
$preView
);
$preView
.
css
(
'x'
,
'100%'
);
$preView
.
css
(
'x'
,
'100%'
);
...
@@ -48,11 +48,16 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
...
@@ -48,11 +48,16 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
$
(
'#km-list-view'
).
delegate
(
'li'
,
'click'
,
function
(){
$
(
'#km-list-view'
).
delegate
(
'li'
,
'click'
,
function
(){
var
preViewData
=
$
(
this
).
data
();
var
preViewData
=
$
(
this
).
data
();
renderNodeData
(
preViewData
,
minder
,
$preView
);
if
(
preViewData
.
children
)
{
if
(
preViewData
.
children
)
{
renderNodeData
(
preViewData
,
minder
,
$preView
);
// $curView.css('x');
// console.log($preView.css('x'));
$preView
.
css
(
'x'
,
parseInt
(
$curView
.
css
(
'x'
))
+
100
+
'%'
);
// console.log($preView.css('x'));
// $('#km-list-view').css('x', '0');
$
(
'#km-list-view'
).
transition
({
$
(
'#km-list-view'
).
transition
({
x
:
'-100
%'
,
x
:
parseInt
(
$
(
'#km-list-view'
).
css
(
'x'
))
-
100
+
'
%'
,
duration
:
200
,
duration
:
200
,
easing
:
'ease'
,
easing
:
'ease'
,
complete
:
function
(){
complete
:
function
(){
...
@@ -70,11 +75,14 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
...
@@ -70,11 +75,14 @@ KityMinder.registerUI('topbar/switch-view', function(minder) {
});
});
$
(
'.back'
).
on
(
'click'
,
function
(){
$
(
'.back'
).
on
(
'click'
,
function
(){
var
parentViewData
=
$
(
'.cur-root'
).
data
();
var
parentViewData
=
$
(
'.cur-root'
,
$curView
).
data
();
$preView
.
css
(
'x'
,
'0'
);
renderNodeData
(
parentViewData
,
minder
,
$preView
);
$preView
.
css
(
'x'
,
parseInt
(
$curView
.
css
(
'x'
))
-
100
+
'%'
);
// $curView.css('x');
// $('#km-list-view').css('x', '-100%');
$
(
'#km-list-view'
).
transition
({
$
(
'#km-list-view'
).
transition
({
x
:
'0
'
,
x
:
parseInt
(
$
(
'#km-list-view'
).
css
(
'x'
))
+
100
+
'%
'
,
duration
:
200
,
duration
:
200
,
easing
:
'ease'
,
easing
:
'ease'
,
complete
:
function
(){
complete
:
function
(){
...
@@ -135,6 +143,7 @@ function renderNodeData(node, minder, $target){
...
@@ -135,6 +143,7 @@ function renderNodeData(node, minder, $target){
});
});
}
}
// debugger;
return
$target
.
html
(
$curRoot
.
add
(
$curList
));
return
$target
.
html
(
$curRoot
.
add
(
$curList
));
}
}
...
@@ -167,7 +176,7 @@ function createListNode(node, minder){
...
@@ -167,7 +176,7 @@ function createListNode(node, minder){
// 处理子节点
// 处理子节点
if
(
node
.
children
){
if
(
node
.
children
){
$list
.
addClass
(
'clickable'
);
$list
.
addClass
(
'clickable'
);
$list
.
append
(
'<span class="next-level"></span>'
);
$list
.
children
().
first
().
before
(
'<span class="next-level"></span>'
);
$list
.
data
(
node
);
$list
.
data
(
node
);
}
}
...
@@ -193,8 +202,6 @@ function getNodeHtml (node, minder){
...
@@ -193,8 +202,6 @@ function getNodeHtml (node, minder){
html
+=
'<div class="progress progress-'
+
data
.
progress
+
'"></div>'
html
+=
'<div class="progress progress-'
+
data
.
progress
+
'"></div>'
}
}
// 处理文字
html
+=
'<span class="text">'
+
(
data
.
text
||
''
)
+
'</span>'
;
// 处理超链接
// 处理超链接
if
(
data
.
hyperlink
)
{
if
(
data
.
hyperlink
)
{
html
+=
'<a class="hyperlink" href="'
+
data
.
hyperlink
+
'" target="_blank"></a>'
;
html
+=
'<a class="hyperlink" href="'
+
data
.
hyperlink
+
'" target="_blank"></a>'
;
...
@@ -206,6 +213,9 @@ function getNodeHtml (node, minder){
...
@@ -206,6 +213,9 @@ function getNodeHtml (node, minder){
});
});
}
}
// 处理文字
if
(
data
.
text
)
{
html
+=
'<span class="text">'
+
(
data
.
text
||
''
)
+
'</span>'
;
}
return
html
;
return
html
;
}
}
viewshare.html
View file @
e9d87fe6
...
@@ -9,6 +9,25 @@
...
@@ -9,6 +9,25 @@
<title>
百度脑图 - 便捷的思维导图工具
</title>
<title>
百度脑图 - 便捷的思维导图工具
</title>
<!--Judge whether it is mobile visited -->
<script>
function
browserRedirect
()
{
var
sUserAgent
=
navigator
.
userAgent
.
toLowerCase
();
var
bIsIpad
=
sUserAgent
.
match
(
/ipad/i
)
==
"ipad"
;
var
bIsIphoneOs
=
sUserAgent
.
match
(
/iphone os/i
)
==
"iphone os"
;
var
bIsMidp
=
sUserAgent
.
match
(
/midp/i
)
==
"midp"
;
var
bIsUc7
=
sUserAgent
.
match
(
/rv:1.2.3.4/i
)
==
"rv:1.2.3.4"
;
var
bIsUc
=
sUserAgent
.
match
(
/ucweb/i
)
==
"ucweb"
;
var
bIsAndroid
=
sUserAgent
.
match
(
/android/i
)
==
"android"
;
var
bIsCE
=
sUserAgent
.
match
(
/windows ce/i
)
==
"windows ce"
;
var
bIsWM
=
sUserAgent
.
match
(
/windows mobile/i
)
==
"windows mobile"
;
if
(
bIsIpad
||
bIsIphoneOs
||
bIsMidp
||
bIsUc7
||
bIsUc
||
bIsAndroid
||
bIsCE
||
bIsWM
)
{
window
.
location
.
href
=
window
.
location
.
href
.
replace
(
'viewshare.html'
,
'm-share.html'
);
}
}
browserRedirect
();
</script>
<script
src=
"import.share.js"
charset=
"utf-8"
></script>
<script
src=
"import.share.js"
charset=
"utf-8"
></script>
<script
src=
"kityminder.config.js"
charset=
"utf-8"
></script>
<script
src=
"kityminder.config.js"
charset=
"utf-8"
></script>
<script
src=
"lang/zh-cn/zh-cn.js"
charset=
"utf-8"
></script>
<script
src=
"lang/zh-cn/zh-cn.js"
charset=
"utf-8"
></script>
...
...
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