Commit 64b250b0 authored by techird's avatar techird

expand command button

parent 66c1c1d8
...@@ -138,7 +138,7 @@ KityMinder.LANG['zh-cn'] = { ...@@ -138,7 +138,7 @@ KityMinder.LANG['zh-cn'] = {
'arrangeup': '上移', 'arrangeup': '上移',
'arrangedown': '下移', 'arrangedown': '下移',
'resetlayout': '整理布局', 'resetlayout': '整理布局',
'expandtoleave': '展开全部节点', 'expandtoleaf': '展开全部节点',
'collapsetolevel1': '收起到一级节点' 'collapsetolevel1': '收起到一级节点'
}, },
......
...@@ -241,7 +241,7 @@ KityMinder.registerModule('Expand', function() { ...@@ -241,7 +241,7 @@ KityMinder.registerModule('Expand', function() {
}); });
return { return {
commands: { commands: {
'expandtoleave': ExpandNodeCommand, 'expandtoleaf': ExpandNodeCommand,
'collapsetolevel1': CollapseNodeCommand 'collapsetolevel1': CollapseNodeCommand
}, },
events: { events: {
...@@ -278,14 +278,14 @@ KityMinder.registerModule('Expand', function() { ...@@ -278,14 +278,14 @@ KityMinder.registerModule('Expand', function() {
outside: ExpanderRenderer outside: ExpanderRenderer
}, },
contextmenu: [{ contextmenu: [{
command: 'expandtoleave' command: 'expandtoleaf'
}, { }, {
command: 'collapsetolevel1' command: 'collapsetolevel1'
}, { }, {
divider: true divider: true
}], }],
commandShortcutKeys: { commandShortcutKeys: {
'expandtoleave': 'Alt+`', 'expandtoleaf': 'Alt+`',
'collapsetolevel1': 'Alt+1' 'collapsetolevel1': 'Alt+1'
} }
}; };
......
...@@ -22,7 +22,7 @@ KityMinder.registerTheme('classic', { ...@@ -22,7 +22,7 @@ KityMinder.registerTheme('classic', {
'main-shadow': 'rgba(0, 0, 0, .25)', 'main-shadow': 'rgba(0, 0, 0, .25)',
'sub-color': 'white', 'sub-color': 'white',
'sub-background': 'none', 'sub-background': 'transparent',
'sub-stroke': 'none', 'sub-stroke': 'none',
'sub-font-size': 12, 'sub-font-size': 12,
'sub-padding': [5, 10], 'sub-padding': [5, 10],
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
'main-space': 5, 'main-space': 5,
'sub-color': 'black', 'sub-color': 'black',
'sub-background': 'none', 'sub-background': 'transparent',
'sub-stroke': 'none', 'sub-stroke': 'none',
'sub-font-size': 12, 'sub-font-size': 12,
'sub-padding': compat ? [3, 5] : [5, 10], 'sub-padding': compat ? [3, 5] : [5, 10],
......
...@@ -11,7 +11,7 @@ KityMinder.registerUI('ribbon/tabs', function(minder) { ...@@ -11,7 +11,7 @@ KityMinder.registerUI('ribbon/tabs', function(minder) {
var memory = minder.getUI('memory'); var memory = minder.getUI('memory');
var $tab = new FUI.Tabs({ var $tab = new FUI.Tabs({
buttons: ['idea', 'appearence'/*, 'view'*/].map(function(key) { buttons: ['idea', 'appearence', 'view'].map(function(key) {
return minder.getLang('ui.tabs.' + key); return minder.getLang('ui.tabs.' + key);
}) })
}); });
......
/** /**
* @fileOverview * @fileOverview
* *
* * 切换展开层次
* *
* @author: techird * @author: techird
* @copyright: Baidu FEX, 2014 * @copyright: Baidu FEX, 2014
*/ */
KityMinder.registerUI('ribbon/view/level', function(minder) {
var $commandbutton = minder.getUI('widget/commandbutton');
var $tabs = minder.getUI('ribbon/tabs');
var $levelPanel = new FUI.LabelPanel({
label: minder.getLang('panels.level'),
column: true
}).appendTo($tabs.view);
['expandtoleaf', 'collapsetolevel1'].forEach(function(cmd) {
$commandbutton.generate(cmd).appendTo($levelPanel);
});
});
...@@ -21,4 +21,6 @@ ...@@ -21,4 +21,6 @@
.italic& { .sprite(13); } .italic& { .sprite(13); }
.arrangeup& { .sprite(14); } .arrangeup& { .sprite(14); }
.arrangedown& { .sprite(15); } .arrangedown& { .sprite(15); }
.expandtoleaf& { background-position: 0 -995px; }
.collapsetolevel1& { background-position: 0 -1015px;}
} }
\ No newline at end of file
...@@ -3569,6 +3569,12 @@ ul.resource-list li { ...@@ -3569,6 +3569,12 @@ ul.resource-list li {
.arrangedown.command-button .fui-icon { .arrangedown.command-button .fui-icon {
background-position: 0 -300px; background-position: 0 -300px;
} }
.expandtoleaf.command-button .fui-icon {
background-position: 0 -995px;
}
.collapsetolevel1.command-button .fui-icon {
background-position: 0 -1015px;
}
.preview-navigator { .preview-navigator {
background: white; background: white;
width: 140px; width: 140px;
......
This diff is collapsed.
ui/theme/default/images/icons.png

17.9 KB | W: | H:

ui/theme/default/images/icons.png

19.2 KB | W: | H:

ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
ui/theme/default/images/icons.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -12,8 +12,8 @@ KityMinder.registerUI('widget/commandbutton', function(minder) { ...@@ -12,8 +12,8 @@ KityMinder.registerUI('widget/commandbutton', function(minder) {
generate: function(command, onclick) { generate: function(command, onclick) {
var $button = new FUI.Button({ var $button = new FUI.Button({
label: minder.getLang('ui.' + command), label: minder.getLang('ui.command.' + command) || minder.getLang('ui.' + command),
text: minder.getLang('ui.' + command), text: minder.getLang('ui.command.' + command) || minder.getLang('ui.' + command),
className: ['command-widget', 'command-button', command] className: ['command-widget', 'command-button', command]
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment