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
81d2f50f
Commit
81d2f50f
authored
Mar 19, 2014
by
techird
Browse files
Options
Browse Files
Download
Plain Diff
merge from dev
parents
d9d921d1
cf67d28b
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
140 additions
and
12 deletions
+140
-12
CHANGELOG.md
CHANGELOG.md
+2
-2
help.js
dialogs/help/help.js
+94
-0
kityminder.config.js
kityminder.config.js
+1
-1
zh-cn.js
lang/zh-cn/zh-cn.js
+9
-1
publish
publish
+6
-6
dialog.js
src/adapter/dialog.js
+1
-2
layout.js
src/adapter/layout.js
+3
-0
editor.receiver.js
src/module/editor.receiver.js
+1
-0
layout.default.js
src/module/layout.default.js
+2
-0
buttonicon.css
themes/default/css/buttonicon.css
+3
-0
help.css
themes/default/css/help.css
+17
-0
import.css
themes/default/css/import.css
+1
-0
help.png
themes/default/images/help.png
+0
-0
No files found.
CHANGELOG.md
View file @
81d2f50f
...
...
@@ -9,8 +9,8 @@
1.
添加了剪贴板操作的支持
2.
添加了本地自动保存草稿的功能
3.
发布版本上添加了 Github 地址
4.
优化了文字选中效果
3.
优化了文字选中效果
4.
改进了文字输入体验
### 功能调整
...
...
dialogs/help/help.js
0 → 100644
View file @
81d2f50f
(
function
()
{
var
helpContent
=
'<div class="help-content" style="padding:20px;width:360px;">'
;
helpContent
+=
'<h2>基本操作</h2>'
;
helpContent
+=
'<p>编辑脑图的时候,最基本的操作是插入节点、编辑节点、删除节点、设置节点样式</p>'
;
helpContent
+=
'<ul>'
;
helpContent
+=
' <li><h3>插入子节点:</h3>在选中的节点中按 Tab 键</li>'
;
helpContent
+=
' <li><h3>插入同级节点:</h3>在选中的节点中按 Enter/Return 键</li>'
;
helpContent
+=
' <li><h3>编辑节点:</h3>刚插入的子节点和同级节点会进入编辑模式;其他节点双击也能进入编辑模式;编辑模式下可以编辑节点的文本</li>'
;
helpContent
+=
' <li><h3>设置节点样式:</h3>你可以选中一个或多个节点后,在工具栏中改变选中节点的样式。也可以使用快捷键来使用这些功能:撤销(Ctrl+Z)、重做(Ctrl+Y)、加粗(Ctrl+B)、斜体(Ctrl+I)</li>'
;
helpContent
+=
'</ul>'
;
helpContent
+=
'<h2>导入导出</h2>'
;
helpContent
+=
'<p>您可以导出你的脑图到本地,方法是点击工具栏上的导出按钮,然后选择要导出的格式。下面列出支持的格式列表:</p>'
;
helpContent
+=
'<ul>'
;
helpContent
+=
' <li><h3>大纲文本:</h3>导出成以制表符界定大纲的文本,此格式可以被导入</li>'
;
helpContent
+=
' <li><h3>KityMinder格式:</h3>KityMinder自身的保存格式(JSON),此格式可以被导入</li>'
;
helpContent
+=
' <li><h3>PNG 图片:</h3>导出成 PNG 位图格式,此格式不可被导入</li>'
;
helpContent
+=
' <li><h3>SVG 矢量图:</h3>导出成 SVG 矢量图格式,可以被矢量工具二次加工,此格式不可被导入</li>'
;
helpContent
+=
'</ul>'
;
helpContent
+=
'<p>导出的文件可以直接拖放到 KityMinder 上直接打开</p>'
;
helpContent
+=
'<h2>云盘功能</h2>'
;
helpContent
+=
'<p>使用百度账号登录后,您可以使用云存储和分享功能</p>'
;
helpContent
+=
'<ul>'
;
helpContent
+=
' <li><h3>登录:</h3>点击登录按钮</li>'
;
helpContent
+=
' <li><h3>保存:</h3>点击保存按钮,将会把文件保存到你的云盘里</li>'
;
helpContent
+=
' <li><h3>分享:</h3>点击分享按钮,会生成分享链接,该链接可以打开您分享的脑图</li>'
;
helpContent
+=
' <li><h3>打开:</h3>点击您账号的下拉按钮,会列出最近保存的脑图文件,点击即可打开</li>'
;
helpContent
+=
'</ul>'
;
helpContent
+=
'<h2>视野导航</h2>'
;
helpContent
+=
'<p>视野导航包括以下几个功能:</p>'
;
helpContent
+=
'<ul>'
;
helpContent
+=
' <li><h3>视野拖动:</h3>根节点未被选中的情况下,拖动根节点可以拖动视野;或者使用空格键切换拖动状态</li>'
;
helpContent
+=
' <li><h3>视野缩放:</h3>点击工具栏中的“放大”和“缩小”按钮可以缩放视野,或者按着 Ctrl 键使用滚轮缩放</li>'
;
helpContent
+=
' <li><h3>视野复位:</h3>双击空白处,可以将视野复位</li>'
;
helpContent
+=
'</ul>'
;
helpContent
+=
'</div>'
;
var
utils
=
KM
.
utils
;
KM
.
registerWidget
(
'help'
,
{
tpl
:
helpContent
,
initContent
:
function
(
km
)
{
var
lang
=
km
.
getLang
(
'dialogs.markers'
),
html
;
if
(
lang
)
{
html
=
$
.
parseTmpl
(
this
.
tpl
,
lang
);
}
this
.
root
().
html
(
html
);
},
initEvent
:
function
(
km
,
$w
)
{
$w
.
on
(
"click"
,
"li"
,
function
()
{
var
$this
=
$
(
this
);
$this
.
siblings
().
removeClass
(
"active"
);
$this
.
toggleClass
(
"active"
);
var
val
=
$this
.
val
();
if
(
!
$this
.
hasClass
(
"active"
)
)
{
val
=
null
;
}
var
type
=
$this
.
attr
(
"type"
);
km
.
execCommand
(
type
,
val
);
}
);
km
.
on
(
'interactchange'
,
function
(
e
)
{
var
valPri
=
this
.
queryCommandValue
(
"priority"
);
var
valPro
=
this
.
queryCommandValue
(
"progress"
);
$w
.
find
(
"li[type='priority']"
).
removeClass
(
"active"
);
$w
.
find
(
"li[type='priority'][value='"
+
valPri
+
"']"
).
addClass
(
"active"
);
$w
.
find
(
"li[type='progress']"
).
removeClass
(
"active"
);
$w
.
find
(
"li[type='progress'][value='"
+
valPro
+
"']"
).
addClass
(
"active"
);
}
);
},
buttons
:
{
'ok'
:
{
exec
:
function
(
km
,
$w
)
{
var
href
=
$
(
'#kmui-link-Jhref'
).
val
().
replace
(
/^
\s
+|
\s
+$/g
,
''
);
if
(
href
)
{
km
.
execCommand
(
'link'
,
{
'href'
:
href
,
'target'
:
$
(
"#kmui-link-Jtarget:checked"
).
length
?
"_blank"
:
'_self'
,
'title'
:
$
(
"#kmui-link-Jtitle"
).
val
().
replace
(
/^
\s
+|
\s
+$/g
,
''
),
'_href'
:
href
}
);
}
}
},
'cancel'
:
{}
},
width
:
400
}
);
}
)();
\ No newline at end of file
kityminder.config.js
View file @
81d2f50f
...
...
@@ -63,7 +63,7 @@
'KITYMINDER_HOME_URL'
:
getKMBasePath
(),
//定义工具栏
toolbars
:
[
'hand zoom-in zoom-out | undo redo | bold italic | fontfamily fontsize forecolor | saveto | markers | node | switchlayout'
'hand zoom-in zoom-out | undo redo | bold italic | fontfamily fontsize forecolor | saveto | markers | node | switchlayout
| help
'
]
//设置主题
...
...
lang/zh-cn/zh-cn.js
View file @
81d2f50f
...
...
@@ -16,7 +16,8 @@ KityMinder.LANG[ 'zh-cn' ] = {
'zoom-in'
:
'放大'
,
'zoom-out'
:
'缩小'
,
'markers'
:
'添加标签'
,
'switchlayout'
:
'切换主题'
'switchlayout'
:
'切换主题'
,
'help'
:
'帮助'
},
'popupcolor'
:
{
'clearColor'
:
'清空颜色'
,
...
...
@@ -39,12 +40,19 @@ KityMinder.LANG[ 'zh-cn' ] = {
'threequartersdone'
:
'完成3/4'
,
'done'
:
'已完成'
}
},
'help'
:
{
}
},
'node'
:
{
'appendsiblingnode'
:
'插入同级节点'
,
'appendchildnode'
:
'插入子节点'
,
'removenode'
:
'删除节点'
},
'layout'
:
{
'default'
:
'左右展开'
,
'bottom'
:
'向下展开'
}
};
\ No newline at end of file
publish
View file @
81d2f50f
echo -e "\033[0;33;1mPublish start."
echo -e "\033[0;33;1m
> Checking out gh-pages\033[0m"
echo -e "\033[0;33;1m> Checking out gh-pages\033[0m"
git checkout -q gh-pages
echo -e "\033[0;33;1m
> Merging dev commits\033[0m"
echo -e "\033[0;33;1m> Merging dev commits\033[0m"
git merge dev -qm "merge from dev"
echo -e "\033[0;33;1m
> Building dist js files\033[0m"
echo -e "\033[0;33;1m> Building dist js files\033[0m"
grunt -q > GRUNT_OUTPUT
rm -f GRUNT_OUTPUT
git add dist
echo -e "\033[0;33;1m
> Commit dist js files\033[0m"
echo -e "\033[0;33;1m> Commit dist js files\033[0m"
git commit -qm "publish"
echo -e "\033[0;33;1m
> Pusing to git...\033[0m"
git push origin gh-pages
echo -e "\033[0;33;1m> Pusing to git...\033[0m"
git push
-q
origin gh-pages
git checkout -q dev
echo -e "\033[0;33;1mPublish done.\033[0m"
\ No newline at end of file
src/adapter/dialog.js
View file @
81d2f50f
KM
.
registerToolbarUI
(
'markers'
,
function
(
name
)
{
KM
.
registerToolbarUI
(
'markers
help
'
,
function
(
name
)
{
var
me
=
this
,
currentRange
,
$dialog
,
opt
=
{
width
:
200
,
title
:
this
.
getLang
(
'tooltips'
)[
name
]
||
''
,
url
:
me
.
getOptions
(
'KITYMINDER_HOME_URL'
)
+
'dialogs/'
+
name
+
'/'
+
name
+
'.js'
,
};
...
...
src/adapter/layout.js
View file @
81d2f50f
...
...
@@ -17,6 +17,9 @@ KM.registerToolbarUI( 'switchlayout', function ( name ) {
return
null
;
}
utils
.
each
(
options
.
items
,
function
(
i
,
item
){
options
.
items
[
i
]
=
me
.
getLang
(
'layout'
)[
item
];
});
//实例化
$combox
=
$
.
kmuibuttoncombobox
(
options
).
css
(
'zIndex'
,
me
.
getOptions
(
'zIndex'
)
+
1
);
comboboxWidget
=
$combox
.
kmui
();
...
...
src/module/editor.receiver.js
View file @
81d2f50f
...
...
@@ -107,6 +107,7 @@ Minder.Receiver = kity.createClass('Receiver',{
case
keys
.
Tab
:
this
.
selection
.
setHide
();
this
.
clear
().
setTextEditStatus
(
false
);
this
.
km
.
fire
(
'contentchange'
);
this
.
km
.
setStatus
(
'normal'
);
e
.
preventDefault
();
break
;
...
...
src/module/layout.default.js
View file @
81d2f50f
...
...
@@ -646,12 +646,14 @@ KityMinder.registerModule( "LayoutDefault", function () {
if
(
Layout
.
shicon
)
Layout
.
shicon
.
remove
();
}
catch
(
error
)
{}
}
//if ( _buffer[ 0 ].getData( "expand" ) !== false )
_buffer
=
_buffer
.
concat
(
_buffer
[
0
].
getChildren
()
);
_buffer
.
shift
();
}
if
(
isExpand
)
{
node
.
clearChildren
();
for
(
var
j
=
0
;
j
<
_cleanbuffer
.
length
;
j
++
)
{
//if ( _cleanbuffer[ j ].getData( "expand" ) !== false )
_cleanbuffer
[
j
].
clearChildren
();
minder
.
appendChildNode
(
_cleanbuffer
[
j
].
getLayout
().
parent
,
_cleanbuffer
[
j
]
);
}
...
...
themes/default/css/buttonicon.css
View file @
81d2f50f
...
...
@@ -28,4 +28,7 @@
}
.kmui-btn-toolbar
.kmui-btn
.kmui-icon-zoom-out
{
background
:
url(../images/zoom_out.png)
no-repeat
2px
2px
;
}
.kmui-btn-toolbar
.kmui-btn
.kmui-icon-help
{
background
:
url(../images/help.png)
no-repeat
2px
2px
;
}
\ No newline at end of file
themes/default/css/help.css
0 → 100644
View file @
81d2f50f
.help-content
{
line-height
:
20px
;
font-size
:
12px
;
}
.help-content
ul
{
list-style
:
none
;
padding
:
0
;
}
.help-content
ul
li
{
color
:
#666
;
}
.help-content
h2
{
color
:
#333
;
font-size
:
18px
;}
.help-content
h3
{
color
:
#333
;
display
:
inline
;
font-size
:
14px
;
}
\ No newline at end of file
themes/default/css/import.css
View file @
81d2f50f
...
...
@@ -12,4 +12,5 @@
@import
"colorpicker.css"
;
@import
"separator.css"
;
@import
"markers.css"
;
@import
"help.css"
;
@import
"dropmenu.css"
;
\ No newline at end of file
themes/default/images/help.png
0 → 100644
View file @
81d2f50f
823 Bytes
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