Commit 70fc3260 authored by Akikonata's avatar Akikonata

added lang

parent 094eb0fd
KityMinder.LANG[ 'zh-cn' ] = { KityMinder.LANG[ 'zh-cn' ] = {
'maintopic': '中心主题',
'topic': '分支主题',
'tooltips': { 'tooltips': {
'undo': '撤销', 'undo': '撤销',
'redo': '重做', 'redo': '重做',
......
...@@ -39,7 +39,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", { ...@@ -39,7 +39,7 @@ var Minder = KityMinder.Minder = kity.createClass( "KityMinder", {
this._addRenderContainer(); this._addRenderContainer();
this._root = new MinderNode( "Main Topic" ); this._root = new MinderNode( this.getLang().maintopic );
this._root.setType( "root" ); this._root.setType( "root" );
if ( this._options.renderTo ) { if ( this._options.renderTo ) {
this.renderTo( this._options.renderTo ); this.renderTo( this._options.renderTo );
......
...@@ -38,12 +38,12 @@ kity.extendClass( Minder, { ...@@ -38,12 +38,12 @@ kity.extendClass( Minder, {
} }
} }
if(moduleDeals.defaultOptions){ if ( moduleDeals.defaultOptions ) {
this.setDefaultOptions(moduleDeals.defaultOptions); this.setDefaultOptions( moduleDeals.defaultOptions );
} }
//添加模块的快捷键 //添加模块的快捷键
if(moduleDeals.addShortcutKeys){ if ( moduleDeals.addShortcutKeys ) {
this.addShortcutKeys(moduleDeals.addShortcutKeys) this.addShortcutKeys( moduleDeals.addShortcutKeys )
} }
} }
......
...@@ -87,11 +87,11 @@ KityMinder.registerModule( "KeyboardModule", function () { ...@@ -87,11 +87,11 @@ KityMinder.registerModule( "KeyboardModule", function () {
} }
switch ( e.originEvent.keyCode ) { switch ( e.originEvent.keyCode ) {
case keys.Enter: case keys.Enter:
this.execCommand( 'appendSiblingNode', new MinderNode( 'Topic' ) ); this.execCommand( 'appendSiblingNode', new MinderNode( this.getLang().topic ) );
e.preventDefault(); e.preventDefault();
break; break;
case keys.Tab: case keys.Tab:
this.execCommand( 'appendChildNode', new MinderNode( 'Topic' ) ); this.execCommand( 'appendChildNode', new MinderNode( this.getLang().topic ) );
e.preventDefault(); e.preventDefault();
break; break;
case keys.Backspace: case keys.Backspace:
......
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