From 3a8df7ef2e71bb3bca4d5a29cde5d00c71767297 Mon Sep 17 00:00:00 2001 From: zswang Date: Wed, 3 Jun 2015 23:59:12 +0800 Subject: [PATCH] fixed bower [main] config --- .bowerrc | 3 + .gitignore | 2 +- bower.json | 119 +++++++++++++++++---------------- dist/kityminder.editor.js | 30 ++++----- dist/kityminder.editor.min.css | 2 +- dist/kityminder.editor.min.js | 6 +- package.json | 4 +- ui/templates.js | 23 +++---- 8 files changed, 92 insertions(+), 97 deletions(-) create mode 100644 .bowerrc diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 00000000..44491d3d --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "bower_components" +} diff --git a/.gitignore b/.gitignore index ba512da1..31e09a45 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ .DS_Store bower_components/ node_modules/ -.tmp/ \ No newline at end of file +.tmp/ diff --git a/bower.json b/bower.json index 7cf01a00..21be1ba5 100644 --- a/bower.json +++ b/bower.json @@ -1,61 +1,64 @@ { - "name": "km-editor", - "version": "1.0.0", - "authors": [ - "fex" - ], - "description": "Kity Minder Editor", - "main": "kityminder.editor.js", - "keywords": [ - "kityminder", - "fex", - "ui", - "javascript", - "html5", - "svg" - ], - "license": "BSD", - "homepage": "https://github.com/fex-team/kityminder-editor", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "less", - "ui", - "src", - "Gruntfile.js", - "package.json" - ], - "devDependencies": { - "seajs": "~2.3.0" - }, - "dependencies": { - "bootstrap": "~3.3.4", - "angular": "~1.3.15", - "angular-bootstrap": "~0.12.1", - "angular-ui-codemirror": "~0.2.3", - "codemirror": "~4.8.0", - "marked": "~0.3.3", - "kity": "~2.0.0", - "hotbox": "~1.0.2", - "kityminder-core": "~1.4.3", - "angular-bootstrap-colorpicker": "~3.0.17" - }, - "overrides": { - "codemirror": { - "main": [ - "lib/codemirror.js", - "lib/codemirror.css", - "mode/xml/xml.js", - "mode/javascript/javascript.js", - "mode/css/css.js", - "mode/htmlmixed/htmlmixed.js", - "mode/markdown/markdown.js", - "addon/mode/overlay.js", - "mode/gfm/gfm.js" - ] + "name": "kityminder-editor", + "version": "1.0.19", + "authors": [ + "fex" + ], + "description": "Kity Minder Editor", + "main": [ + "dist/kityminder.editor.js", + "dist/kityminder.editor.css" + ], + "keywords": [ + "kityminder", + "fex", + "ui", + "javascript", + "html5", + "svg" + ], + "license": "BSD", + "homepage": "https://github.com/fex-team/kityminder-editor", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests", + "less", + "ui", + "src", + "Gruntfile.js", + "package.json" + ], + "devDependencies": { + "seajs": "~2.3.0" + }, + "dependencies": { + "bootstrap": "~3.3.4", + "angular": "~1.3.15", + "angular-bootstrap": "~0.12.1", + "angular-ui-codemirror": "~0.2.3", + "codemirror": "~4.8.0", + "marked": "~0.3.3", + "kity": "~2.0.0", + "hotbox": "~1.0.2", + "kityminder-core": "~1.4.3", + "angular-bootstrap-colorpicker": "~3.0.17" + }, + "overrides": { + "codemirror": { + "main": [ + "lib/codemirror.js", + "lib/codemirror.css", + "mode/xml/xml.js", + "mode/javascript/javascript.js", + "mode/css/css.js", + "mode/htmlmixed/htmlmixed.js", + "mode/markdown/markdown.js", + "addon/mode/overlay.js", + "mode/gfm/gfm.js" + ] + } } - } } diff --git a/dist/kityminder.editor.js b/dist/kityminder.editor.js index 50cff2a5..3a295aa5 100644 --- a/dist/kityminder.editor.js +++ b/dist/kityminder.editor.js @@ -1,6 +1,6 @@ /*! * ==================================================== - * km-editor - v0.0.1 - 2015-05-26 + * kityminder-editor - v1.0.19 - 2015-06-03 * https://github.com/fex-team/kityminder-editor * GitHub: https://github.com/fex-team/kityminder-editor * Copyright (c) 2015 ; Licensed @@ -1279,7 +1279,7 @@ angular.module('kityminderEditor').run(['$templateCache', function($templateCach $templateCache.put('ui/directive/kityminderEditor/kityminderEditor.html', - "
" + "
" ); @@ -1289,20 +1289,13 @@ angular.module('kityminderEditor').run(['$templateCache', function($templateCach $templateCache.put('ui/directive/noteEditor/noteEditor.html', - "

请选择节点编辑备注

" ); @@ -1977,9 +1970,11 @@ angular.module('kityminderEditor') .directive('minderDivider', ['config', function(config) { return { scope: { - config: '=minderDivider' + config: '=minderDivider', + minder: '=' }, link: function($scope, element) { + var minder = $scope.minder; var ctrlPanelMin = config.getConfig('ctrlPanelMin'); var dividerWidth = config.getConfig('dividerWidth'); @@ -2010,6 +2005,7 @@ angular.module('kityminderEditor') // 改变父 scope 的变量 $scope.config.ctrlPanelWidth = ctrlPanelWidth + deltaX; $scope.$apply(); + minder.fire('resize'); } }); diff --git a/dist/kityminder.editor.min.css b/dist/kityminder.editor.min.css index df0f14cc..13a9519b 100644 --- a/dist/kityminder.editor.min.css +++ b/dist/kityminder.editor.min.css @@ -1 +1 @@ -#previewer-content pre,.gfm-render pre,.km-editor>.receiver{word-break:break-all;word-wrap:break-word}.s-btn-icon,.s-btn-label{vertical-align:middle}.km-editor{overflow:hidden}.km-editor>.mask{display:block;position:absolute;left:0;right:0;top:0;bottom:0;background-color:transparent}.km-editor>.receiver{position:absolute;background:#fff;outline:0;box-shadow:0 0 20px rgba(0,0,0,.5);left:0;top:0;padding:3px 5px;margin-left:-3px;margin-top:-5px;max-width:300px;width:auto;font-size:14px;line-height:1.4em;min-height:1.4em;box-sizing:border-box;overflow:hidden;border:none;-webkit-user-select:text;pointer-events:none;opacity:0;z-index:-1000}.km-editor>.receiver.debug{opacity:1;outline:green solid 1px;background:0 0;z-index:0}.km-editor>.receiver.input{pointer-events:all;opacity:1;z-index:999;background:#fff;outline:0}.btn-wrap[disabled] span,.color-list .color-wrap[disabled],.current-font-item[disabled],.font-bold[disabled],.font-italics[disabled],.s-btn-wrap[disabled] span,.tool-group[disabled],li[disabled]{opacity:.5}div.minder-editor-container{position:absolute;top:40px;bottom:0;left:0;right:0;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none}.control-panel,.minder-divider,.minder-editor{position:absolute;bottom:0;top:0}.minder-editor{left:0;right:250px}.control-panel{right:0;width:250px;border-left:1px solid #CCC}.minder-divider{right:250px;width:2px;background-color:#fbfbfb;cursor:ew-resize}.tool-group{padding:0}.tool-group .tool-group-item{display:inline-block;border-radius:4px}#previewer-content blockquote,.gfm-render blockquote{display:block;border-left:4px solid #E4AD91;font-style:italic}.tool-group .tool-group-item .tool-group-icon{width:20px;height:20px;padding:2px;margin:1px}.tool-group .tool-group-item:hover{background-color:#eff3fa}.tool-group .tool-group-item.active,.tool-group .tool-group-item:active{background-color:#c4d0ee}.control-panel .km-priority .km-priority-item .km-priority-icon{background:url(images/iconpriority.png)repeat-y}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-0{background-position:0 20px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-1{background-position:0 0}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-2{background-position:0 -20px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-3{background-position:0 -40px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-4{background-position:0 -60px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-5{background-position:0 -80px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-6{background-position:0 -100px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-7{background-position:0 -120px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-8{background-position:0 -140px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-9{background-position:0 -160px}.control-panel .km-progress .km-progress-item .km-progress-icon{background:url(images/iconprogress.png)repeat-y}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-0{background-position:0 20px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-1{background-position:0 0}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-2{background-position:0 -20px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-3{background-position:0 -40px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-4{background-position:0 -60px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-5{background-position:0 -80px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-6{background-position:0 -100px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-7{background-position:0 -120px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-8{background-position:0 -140px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-9{background-position:0 -160px}.km-resource{padding:0;margin-top:10px;list-style-type:none}.gfm-render{font-size:12px;-webkit-user-select:text;color:#333;line-height:1.8em}.gfm-render blockquote,.gfm-render hr,.gfm-render p,.gfm-render pre,.gfm-render table,.gfm-render ul{margin:1em 0;cursor:text}.gfm-render blockquote:first-child:last-child,.gfm-render hr:first-child:last-child,.gfm-render p:first-child:last-child,.gfm-render pre:first-child:last-child,.gfm-render table:first-child:last-child,.gfm-render ul:first-child:last-child{margin:0}.gfm-render img{max-width:100%}.gfm-render a{color:#00f}.gfm-render a:hover{color:red}.gfm-render blockquote{color:#da8e68;padding-left:10px;margin-left:2em}.gfm-render ol,.gfm-render ul{padding-left:3em}.gfm-render table{width:100%;border-collapse:collapse;margin:1em 0}.gfm-render table td,.gfm-render table th{border:1px solid #666;padding:2px 4px}.gfm-render table th{background:rgba(45,141,234,.2)}.gfm-render table tr:nth-child(even) td{background:rgba(45,141,234,.03)}.gfm-render em{color:red}.gfm-render del{color:#999}.gfm-render pre{background:rgba(45,141,234,.1);padding:5px;border-radius:5px}.gfm-render code{background:rgba(45,141,234,.1);padding:0 5px;border-radius:3px}.gfm-render pre code{background:0 0}.gfm-render hr{border:none;border-top:1px solid #CCC}.gfm-render .highlight{background:#ff0;color:red}.tab-content{position:absolute;top:42px;bottom:0;left:0;right:0}.km-note,.km-note .CodeMirror,.tab-pane{position:absolute;top:0;bottom:0;left:0;right:0}.km-note{padding:5px 10px}.km-note .CodeMirror{height:auto;cursor:text;font-size:14px;line-height:1.3em;font-family:consolas}.btn-label,.s-btn-label,div a.theme-item{font-size:12px}.km-note-tips{color:#ccc}#previewer-content{position:absolute;background:#FFD;padding:5px 15px;border-radius:5px;max-width:400px;max-height:200px;overflow:auto;z-index:10;box-shadow:0 0 15px rgba(0,0,0,.5);word-break:break-all;font-size:12px;-webkit-user-select:text;color:#333;line-height:1.8em}#previewer-content blockquote,#previewer-content hr,#previewer-content p,#previewer-content pre,#previewer-content table,#previewer-content ul{margin:1em 0;cursor:text}.btn-wrap,div a.theme-item{text-decoration:none;cursor:pointer}#previewer-content blockquote:first-child:last-child,#previewer-content hr:first-child:last-child,#previewer-content p:first-child:last-child,#previewer-content pre:first-child:last-child,#previewer-content table:first-child:last-child,#previewer-content ul:first-child:last-child{margin:0}#previewer-content img{max-width:100%}#previewer-content a{color:#00f}#previewer-content a:hover,#previewer-content em{color:red}#previewer-content blockquote{color:#da8e68;padding-left:10px;margin-left:2em}#previewer-content ol,#previewer-content ul{padding-left:3em}#previewer-content table{width:100%;border-collapse:collapse;margin:1em 0}#previewer-content table td,#previewer-content table th{border:1px solid #666;padding:2px 4px}#previewer-content table th{background:rgba(45,141,234,.2)}#previewer-content table tr:nth-child(even) td{background:rgba(45,141,234,.03)}#previewer-content del{color:#999}#previewer-content pre{background:rgba(45,141,234,.1);padding:5px;border-radius:5px}#previewer-content code{background:rgba(45,141,234,.1);padding:0 5px;border-radius:3px}#previewer-content pre code{background:0 0}#previewer-content hr{border:none;border-top:1px solid #CCC}#previewer-content .highlight{background:#ff0;color:red}#previewer-content.ng-hide{display:block!important;left:-99999px!important;top:-99999px!important}.inline-directive,.temp-item,.temp-item-wrap,.theme-item-wrap,div a.theme-item{display:inline-block}.panel-body{padding:10px}.temp-list{min-width:124px}.temp-item-wrap{width:50px;height:40px;padding:0 2px;margin:5px}.temp-item{width:50px;height:40px;background-image:url(images/template.png);background-repeat:no-repeat}.temp-item.default{background-position:0 0}.temp-item.structure{background-position:-50px 0}.temp-item.filetree{background-position:-100px 0}.temp-item.right{background-position:-150px 0}.temp-item.fish-bone{background-position:-200px 0}.temp-item.tianpan{background-position:-250px 0}.current-temp-item{width:74px}.temp-item-selected{background-color:#87a9da}.theme-list{min-width:162px}div a.theme-item{width:70px;height:30px;text-align:center;line-height:30px;padding:0 5px;color:#000}.theme-item-selected{width:100px}.theme-item-wrap{width:80px;height:40px;padding:5px}.theme-item-wrap:hover{background-color:#eff3fa}.btn-icon{width:25px;height:25px;margin-left:12px;margin-bottom:3px;margin-top:4px;display:block}.btn-wrap,.s-btn-group-vertical,.s-btn-icon,.s-btn-label,.s-btn-wrap{display:inline-block}.btn-wrap{width:50px;height:50px}.btn-wrap[disabled],.s-btn-wrap[disabled]{cursor:default}.btn-wrap[disabled]:active,.btn-wrap[disabled]:hover{background-color:transparent}.btn-wrap:link,.btn-wrap:visited{text-decoration:none}.btn-wrap:hover{background-color:#eff3fa;text-decoration:none}.btn-wrap:active{background-color:#c4d0ee}.reset-layout-icon{background:url(images/icons.png)0 -150px no-repeat}.clear-style-icon{background:url(images/icons.png)0 -175px no-repeat}.s-btn-icon{width:20px;height:20px;margin-right:3px}.s-btn-wrap{margin-bottom:2px;padding:2px 5px 2px 3px;text-decoration:none;font-size:0}.s-btn-wrap[disabled]:active,.s-btn-wrap[disabled]:hover{background-color:transparent}.s-btn-wrap:hover{background-color:#eff3fa;text-decoration:none}.s-btn-wrap:active{background-color:#c4d0ee}.copy-style-icon{background:url(images/icons.png)0 -200px no-repeat}.paste-style-wrap{display:block}.color-list,.color-list .color-wrap,.font-color,.font-color-wrap,.font-size-list{display:inline-block}.paste-style-icon{background:url(images/icons.png)0 -220px no-repeat}.current-font-item a{text-decoration:none}.font-item{line-height:1em;text-align:left}.font-item-selected{background-color:#87a9da}.font-bold,.font-italics{background:url(images/icons.png)no-repeat;cursor:pointer}.font-bold:hover,.font-italics:hover{background-color:#eff3fa}.font-bold:active,.font-italics:active{background-color:#c4d0ee}.font-bold{background-position:0 -240px}.font-italics{background-position:0 -260px}.font-bold-selected,.font-italics-selected{background-color:#87a9da}.font-color-wrap{width:22px;height:22px;margin:3px 3px 0 0;border:1px solid #efefef;vertical-align:bottom}.font-color{width:16px;height:16px;margin:2px}.color-list{width:100px;margin:0;padding:0;font-size:0}.color-list .color-wrap{width:22px;height:22px;margin:3px 3px 0 0;border:1px solid #efefef;background-color:transparent;list-style-type:none;cursor:pointer}.color-list .color-wrap .color-item{display:inline-block;width:16px;height:16px;margin:2px}.color-list .color-wrap:hover{background-color:#eff3fa}.color-list .color-wrap:active{background-color:#c4d0ee}.color-list .color-wrap-selected{background-color:#87a9da} \ No newline at end of file +#previewer-content pre,.gfm-render pre,.km-editor>.receiver{word-break:break-all;word-wrap:break-word}.s-btn-icon,.s-btn-label{vertical-align:middle}.km-editor{overflow:hidden}.km-editor>.mask{display:block;position:absolute;left:0;right:0;top:0;bottom:0;background-color:transparent}.km-editor>.receiver{position:absolute;background:#fff;outline:0;box-shadow:0 0 20px rgba(0,0,0,.5);left:0;top:0;padding:3px 5px;margin-left:-3px;margin-top:-5px;max-width:300px;width:auto;font-size:14px;line-height:1.4em;min-height:1.4em;box-sizing:border-box;overflow:hidden;border:none;-webkit-user-select:text;pointer-events:none;opacity:0;z-index:-1000}.km-editor>.receiver.debug{opacity:1;outline:green solid 1px;background:0 0;z-index:0}.km-editor>.receiver.input{pointer-events:all;opacity:1;z-index:999;background:#fff;outline:0}.btn-wrap[disabled] span,.color-list .color-wrap[disabled],.current-font-item[disabled],.font-bold[disabled],.font-italics[disabled],.s-btn-wrap[disabled] span,.tool-group[disabled],li[disabled]{opacity:.5}div.minder-editor-container{position:absolute;top:40px;bottom:0;left:0;right:0;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none}.control-panel,.minder-divider,.minder-editor{position:absolute;bottom:0;top:0}.minder-editor{left:0;right:250px}.control-panel{right:0;width:250px;border-left:1px solid #CCC}.minder-divider{right:250px;width:2px;background-color:#fbfbfb;cursor:ew-resize}.tool-group{padding:0}.tool-group .tool-group-item{display:inline-block;border-radius:4px}.tool-group .tool-group-item .tool-group-icon{width:20px;height:20px;padding:2px;margin:1px}.tool-group .tool-group-item:hover{background-color:#eff3fa}.tool-group .tool-group-item.active,.tool-group .tool-group-item:active{background-color:#c4d0ee}.control-panel .km-priority .km-priority-item .km-priority-icon{background:url(images/iconpriority.png) repeat-y}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-0{background-position:0 20px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-1{background-position:0 0}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-2{background-position:0 -20px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-3{background-position:0 -40px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-4{background-position:0 -60px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-5{background-position:0 -80px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-6{background-position:0 -100px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-7{background-position:0 -120px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-8{background-position:0 -140px}.control-panel .km-priority .km-priority-item .km-priority-icon.priority-9{background-position:0 -160px}.control-panel .km-progress .km-progress-item .km-progress-icon{background:url(images/iconprogress.png) repeat-y}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-0{background-position:0 20px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-1{background-position:0 0}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-2{background-position:0 -20px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-3{background-position:0 -40px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-4{background-position:0 -60px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-5{background-position:0 -80px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-6{background-position:0 -100px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-7{background-position:0 -120px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-8{background-position:0 -140px}.control-panel .km-progress .km-progress-item .km-progress-icon.progress-9{background-position:0 -160px}.km-resource{padding:0;margin-top:10px;list-style-type:none}.gfm-render{font-size:12px;-webkit-user-select:text;color:#333;line-height:1.8em}.gfm-render blockquote,.gfm-render hr,.gfm-render p,.gfm-render pre,.gfm-render table,.gfm-render ul{margin:1em 0;cursor:text}.gfm-render blockquote:first-child:last-child,.gfm-render hr:first-child:last-child,.gfm-render p:first-child:last-child,.gfm-render pre:first-child:last-child,.gfm-render table:first-child:last-child,.gfm-render ul:first-child:last-child{margin:0}.gfm-render img{max-width:100%}.gfm-render a{color:#00f}.gfm-render a:hover{color:red}.gfm-render blockquote{display:block;border-left:4px solid #E4AD91;color:#da8e68;padding-left:10px;font-style:italic;margin-left:2em}.gfm-render ol,.gfm-render ul{padding-left:3em}.gfm-render table{width:100%;border-collapse:collapse;margin:1em 0}.gfm-render table td,.gfm-render table th{border:1px solid #666;padding:2px 4px}.gfm-render table th{background:rgba(45,141,234,.2)}.gfm-render table tr:nth-child(even) td{background:rgba(45,141,234,.03)}.gfm-render em{color:red}.gfm-render del{color:#999}.gfm-render pre{background:rgba(45,141,234,.1);padding:5px;border-radius:5px}.gfm-render code{background:rgba(45,141,234,.1);padding:0 5px;border-radius:3px}.gfm-render pre code{background:0 0}.gfm-render hr{border:none;border-top:1px solid #CCC}.gfm-render .highlight{background:#ff0;color:red}.tab-content{position:absolute;top:42px;bottom:0;left:0;right:0}.km-note,.km-note .CodeMirror,.tab-pane{position:absolute;top:0;bottom:0;left:0;right:0}.km-note{padding:5px 10px}.km-note .CodeMirror{height:auto;cursor:text;font-size:14px;line-height:1.3em;font-family:consolas}.btn-label,.s-btn-label,div a.theme-item{font-size:12px}.km-note-tips{color:#ccc}#previewer-content{position:absolute;background:#FFD;padding:5px 15px;border-radius:5px;max-width:400px;max-height:200px;overflow:auto;z-index:10;box-shadow:0 0 15px rgba(0,0,0,.5);word-break:break-all;font-size:12px;-webkit-user-select:text;color:#333;line-height:1.8em}#previewer-content blockquote,#previewer-content hr,#previewer-content p,#previewer-content pre,#previewer-content table,#previewer-content ul{margin:1em 0;cursor:text}.btn-wrap,div a.theme-item{text-decoration:none;cursor:pointer}#previewer-content blockquote:first-child:last-child,#previewer-content hr:first-child:last-child,#previewer-content p:first-child:last-child,#previewer-content pre:first-child:last-child,#previewer-content table:first-child:last-child,#previewer-content ul:first-child:last-child{margin:0}#previewer-content img{max-width:100%}#previewer-content a{color:#00f}#previewer-content a:hover,#previewer-content em{color:red}#previewer-content blockquote{display:block;border-left:4px solid #E4AD91;color:#da8e68;padding-left:10px;font-style:italic;margin-left:2em}#previewer-content ol,#previewer-content ul{padding-left:3em}#previewer-content table{width:100%;border-collapse:collapse;margin:1em 0}#previewer-content table td,#previewer-content table th{border:1px solid #666;padding:2px 4px}#previewer-content table th{background:rgba(45,141,234,.2)}#previewer-content table tr:nth-child(even) td{background:rgba(45,141,234,.03)}#previewer-content del{color:#999}#previewer-content pre{background:rgba(45,141,234,.1);padding:5px;border-radius:5px}#previewer-content code{background:rgba(45,141,234,.1);padding:0 5px;border-radius:3px}#previewer-content pre code{background:0 0}#previewer-content hr{border:none;border-top:1px solid #CCC}#previewer-content .highlight{background:#ff0;color:red}#previewer-content.ng-hide{display:block!important;left:-99999px!important;top:-99999px!important}.inline-directive,.temp-item,.temp-item-wrap,.theme-item-wrap,div a.theme-item{display:inline-block}.panel-body{padding:10px}.temp-list{min-width:124px}.temp-item-wrap{width:50px;height:40px;padding:0 2px;margin:5px}.temp-item{width:50px;height:40px;background-image:url(images/template.png);background-repeat:no-repeat}.temp-item.default{background-position:0 0}.temp-item.structure{background-position:-50px 0}.temp-item.filetree{background-position:-100px 0}.temp-item.right{background-position:-150px 0}.temp-item.fish-bone{background-position:-200px 0}.temp-item.tianpan{background-position:-250px 0}.current-temp-item{width:74px}.temp-item-selected{background-color:#87a9da}.theme-list{min-width:162px}div a.theme-item{width:70px;height:30px;text-align:center;line-height:30px;padding:0 5px;color:#000}.theme-item-selected{width:100px}.theme-item-wrap{width:80px;height:40px;padding:5px}.theme-item-wrap:hover{background-color:#eff3fa}.btn-icon{width:25px;height:25px;margin-left:12px;margin-bottom:3px;margin-top:4px;display:block}.btn-wrap,.s-btn-group-vertical,.s-btn-icon,.s-btn-label,.s-btn-wrap{display:inline-block}.btn-wrap{width:50px;height:50px}.btn-wrap[disabled],.s-btn-wrap[disabled]{cursor:default}.btn-wrap[disabled]:active,.btn-wrap[disabled]:hover{background-color:transparent}.btn-wrap:link,.btn-wrap:visited{text-decoration:none}.btn-wrap:hover{background-color:#eff3fa;text-decoration:none}.btn-wrap:active{background-color:#c4d0ee}.reset-layout-icon{background:url(images/icons.png) 0 -150px no-repeat}.clear-style-icon{background:url(images/icons.png) 0 -175px no-repeat}.s-btn-icon{width:20px;height:20px;margin-right:3px}.s-btn-wrap{margin-bottom:2px;padding:2px 5px 2px 3px;text-decoration:none;font-size:0}.s-btn-wrap[disabled]:active,.s-btn-wrap[disabled]:hover{background-color:transparent}.s-btn-wrap:hover{background-color:#eff3fa;text-decoration:none}.s-btn-wrap:active{background-color:#c4d0ee}.copy-style-icon{background:url(images/icons.png) 0 -200px no-repeat}.paste-style-wrap{display:block}.color-list,.color-list .color-wrap,.font-color,.font-color-wrap,.font-size-list{display:inline-block}.paste-style-icon{background:url(images/icons.png) 0 -220px no-repeat}.current-font-item a{text-decoration:none}.font-item{line-height:1em;text-align:left}.font-item-selected{background-color:#87a9da}.font-bold,.font-italics{background:url(images/icons.png) no-repeat;cursor:pointer}.font-bold:hover,.font-italics:hover{background-color:#eff3fa}.font-bold:active,.font-italics:active{background-color:#c4d0ee}.font-bold{background-position:0 -240px}.font-italics{background-position:0 -260px}.font-bold-selected,.font-italics-selected{background-color:#87a9da}.font-color-wrap{width:22px;height:22px;margin:3px 3px 0 0;border:1px solid #efefef;vertical-align:bottom}.font-color{width:16px;height:16px;margin:2px}.color-list{width:100px;margin:0;padding:0;font-size:0}.color-list .color-wrap{width:22px;height:22px;margin:3px 3px 0 0;border:1px solid #efefef;background-color:transparent;list-style-type:none;cursor:pointer}.color-list .color-wrap .color-item{display:inline-block;width:16px;height:16px;margin:2px}.color-list .color-wrap:hover{background-color:#eff3fa}.color-list .color-wrap:active{background-color:#c4d0ee}.color-list .color-wrap-selected{background-color:#87a9da} \ No newline at end of file diff --git a/dist/kityminder.editor.min.js b/dist/kityminder.editor.min.js index 77da5667..a5685005 100644 --- a/dist/kityminder.editor.min.js +++ b/dist/kityminder.editor.min.js @@ -1,11 +1,11 @@ /*! * ==================================================== - * km-editor - v0.0.1 - 2015-05-26 + * kityminder-editor - v1.0.19 - 2015-06-03 * https://github.com/fex-team/kityminder-editor * GitHub: https://github.com/fex-team/kityminder-editor * Copyright (c) 2015 ; Licensed * ==================================================== */ -!function(){function a(a){b.r([c[a]])}var b={r:function(a){if(b[a].inited)return b[a].value;if("function"!=typeof b[a].value)return b[a].inited=!0,b[a].value;var c={exports:{}},d=b[a].value(null,c.exports,c);if(b[a].inited=!0,b[a].value=d,void 0!==d)return d;for(var e in c.exports)if(c.exports.hasOwnProperty(e))return b[a].inited=!0,b[a].value=c.exports,c.exports}};b[0]={value:function(a,c,d){function e(a){g.push(a)}function f(a){this.selector=a;for(var b=0;b {2}",c,h,a),d=0;d *");var e,g,h,i;if(g=a.split(c),2==g.length?e="before":(g=a.split(d),2==g.length&&(e="after")),!e)throw new Error("Illegal fsm condition: "+a);h=g[0],i=g[1],b.condition={when:e,exit:h,enter:i},f.push(b)}}function g(){this.fsm=new f("normal")}var h=b.r(16),i=new h("fsm");return d.exports=g}},b[7]={value:function(a,c,d){function e(){function a(){m=[],n=[],k=o.exportJson()}function b(){var a=o.exportJson(),b=f(a,k);if(b.length){for(m.push(b);m.length>q;)m.shift();return k=a,!0}}function c(){var a=o.exportJson();n.push(f(a,k)),k=a}function d(){l=!0;var a=m.pop();a&&(o.applyPatches(a),c()),l=!1}function e(){l=!0;var a=n.pop();n&&(o.applyPatches(a),b()),l=!1}function g(){l||b()&&(n=[])}function h(){return!!m.length}function i(){return!!n.length}function j(a){if(l){var b=a.patch;switch(b.express){case"node.add":o.select(b.node.getChild(b.index),!0);break;case"node.remove":case"data.replace":case"data.remove":case"data.add":o.select(b.node,!0)}}}var k,l,m,n,o=this.minder,p=this.hotbox,q=100;this.history={reset:a,undo:d,redo:e,hasUndo:h,hasRedo:i},a(),o.on("contentchange",g),o.on("import",a),o.on("patch",j);var r=p.state("main");r.button({position:"top",label:"撤销",key:"Ctrl + Z",enable:h,action:d,next:"idle"}),r.button({position:"top",label:"重做",key:"Ctrl + Y",enable:i,action:e,next:"idle"})}var f=b.r(19);return window.diff=f,d.exports=e}},b[8]={value:function(a,c,d){function e(){var a=this.fsm,b=this.minder,c=(this.receiver,this.container),d=new f(c);a.when("normal -> hotbox",function(a,c,e){var f,g=b.getSelectedNode();if(g){var h=g.getRenderBox();f={x:h.cx,y:h.cy}}d.active("main",f)}),a.when("normal -> normal",function(a,c,e,f){if("shortcut-handle"==e){var g=d.dispatch(f);g?f.preventDefault():b.dispatchKeyEvent(f)}}),this.hotbox=d}var f=b.r(2);return d.exports=e}},b[9]={value:function(a,c,d){function e(){function a(){j.when("* -> input",e),j.when("input -> *",function(a,b,c){switch(c){case"input-cancel":return h();case"input-commit":default:return f()}}),k.on("beforemousedown",function(){"input"==j.state()&&j.jump("normal","input-commit")}),k.on("dblclick",function(){k.getSelectedNode()&&d()})}function b(){g.flaged&&n.classList.add("debug"),n.onmousedown=function(a){a.stopPropagation()},k.on("layoutallfinish viewchange viewchanged selectionchange",function(a){("viewchange"!=a.type||"input"==j.state())&&i()}),i()}function c(){l.state("main").button({position:"center",label:"编辑",key:"F2",enable:function(){return-1!=k.queryCommandState("text")},action:d})}function d(){n.innerText=k.queryCommandValue("text"),j.jump("input","input-request"),m.selectAll()}function e(){var a=k.getSelectedNode();if(a){var b=a.getData("font-size")||a.getStyle("font-size");n.style.fontSize=b+"px",n.style.minWidth=0,n.style.minWidth=n.clientWidth+"px",n.classList.add("input"),n.focus()}}function f(){var a=n.innerText;k.execCommand("text",a.replace(/^\n*|\n*$/g,"")),h()}function h(){n.classList.remove("input"),m.selectAll()}function i(){var a=i,b=k.getSelectedNode();b&&(a.timer||(a.timer=setTimeout(function(){var c=b.getRenderBox("TextRenderer");n.style.left=Math.round(c.x)+"px",n.style.top=(g.flaged?Math.round(c.bottom+30):Math.round(c.y))+"px",a.timer=0})))}var j=this.fsm,k=this.minder,l=this.hotbox,m=this.receiver,n=m.element;b(),a(),c(),this.editText=d}b.r(18);var f=b.r(16),g=new f("input");return d.exports=e}},b[10]={value:function(a,c,d){function e(a){return a.ctrlKey||a.metaKey||a.altKey?!1:a.keyCode>=65&&a.keyCode<=90?!0:a.keyCode>=48&&a.keyCode<=57?!0:229==a.keyCode?!0:void 0}function f(){var a=this.fsm,b=this.minder,c=this.receiver,d=this.container,f=c.element,h=this.hotbox;c.listen("normal",function(c){if("keydown"==c.type&&c.is("Space"))return c.preventDefault(),a.jump("hotbox","space-trigger");if("keydown"==c.type&&e(c)){if(b.getSelectedNode())return a.jump("input","user-input");f.innerHTML=""}return"keydown"==c.type?a.jump("normal","shortcut-handle",c):void 0}),c.listen("hotbox",function(b){b.preventDefault();h.dispatch(b);return h.state()==g.STATE_IDLE&&"hotbox"==a.state()?a.jump("normal","hotbox-idle"):void 0}),c.listen("input",function(b){if("keydown"==b.type){if(b.is("Enter"))return b.preventDefault(),a.jump("normal","input-commit");if(b.is("Esc"))return b.preventDefault(),a.jump("normal","input-cancel");(b.is("Tab")||b.is("Shift + Tab"))&&b.preventDefault()}});var i,j,k=2;d.addEventListener("mousedown",function(b){b.button==k&&b.preventDefault(),"hotbox"==a.state()?(h.active(g.STATE_IDLE),a.jump("normal","blur")):"normal"==a.state()&&b.button==k&&(i=b.clientX,j=b.clientY)},!1),d.addEventListener("contextmenu",function(a){a.preventDefault()}),d.addEventListener("mouseup",function(c){"normal"==a.state()&&c.button==k&&c.clientX==i&&c.clientY==j&&b.getSelectedNode()&&a.jump("hotbox","content-menu")},!1),h.$element.addEventListener("mousedown",function(a){a.stopPropagation()})}var g=b.r(2);return d.exports=f}},b[11]={value:function(a,c,d){function e(){var a=new f({enableKeyReceiver:!1,enableAnimation:!1});a.renderTo(this.selector),a.setTheme(null),a.select(a.getRoot(),!0),a.execCommand("text","中心主题"),this.minder=a}var f=b.r(4);return d.exports=e}},b[12]={value:function(a,b,c){function d(){var a=this,b=this.minder,c=this.hotbox,d=this.fsm,e=c.state("main"),f=["前移:Alt+Up:ArrangeUp","下级:Tab:AppendChildNode","同级:Enter:AppendSiblingNode","后移:Alt+Down:ArrangeDown","删除:Delete|Backspace:RemoveNode","归纳:Shift+Tab|Shift+Insert:AppendParentNode"];f.forEach(function(c){var f=c.split(":"),g=f.shift(),h=f.shift(),i=f.shift();e.button({position:"ring",label:g,key:h,action:function(){0===i.indexOf("Append")?(b.execCommand(i,"新主题"),a.editText()):(b.execCommand(i),d.jump("normal","command-executed"))},enable:function(){return-1!=b.queryCommandState(i)}})}),e.button({position:"ring",key:"/",action:function(){b.queryCommandState("expand")?b.queryCommandState("collapse")||b.execCommand("collapse"):b.execCommand("expand")},enable:function(){return-1!=b.queryCommandState("expand")||-1!=b.queryCommandState("collapse")},beforeShow:function(){b.queryCommandState("expand")?this.$button.children[0].innerHTML="收起":this.$button.children[0].innerHTML="展开"}})}return c.exports=d}},b[13]={value:function(a,b,c){function d(){var a=this.minder,b=this.hotbox,c=b.state("main");c.button({position:"top",label:"优先级",key:"P",next:"priority"});var d=b.state("priority");"123456789".replace(/./g,function(b){d.button({position:"ring",label:"P"+b,key:b,action:function(){a.execCommand("Priority",b)}})}),d.button({position:"center",label:"移除",key:"Del",action:function(){a.execCommand("Priority",0)}}),d.button({position:"top",label:"返回",key:"esc",next:"back"})}return c.exports=d}},b[14]={value:function(a,b,c){function d(){var a=this.minder,b=this.hotbox,c=b.state("main");c.button({position:"top",label:"进度",key:"G",next:"progress"});var d=b.state("progress");"012345678".replace(/./g,function(b){d.button({position:"ring",label:"G"+b,key:b,action:function(){a.execCommand("Progress",parseInt(b)+1)}})}),d.button({position:"center",label:"移除",key:"Del",action:function(){a.execCommand("Progress",0)}}),d.button({position:"top",label:"返回",key:"esc",next:"back"})}return c.exports=d}},b[15]={value:function(a,c,d){function e(){function a(a){a.is=function(a){for(var b=a.split("|"),c=0;c/g,">").replace(/\n/g,"
")}))}},b[19]={value:function(a,b,c){function d(a){return-1===a.indexOf("/")&&-1===a.indexOf("~")?a:a.replace(/~/g,"~0").replace(/\//g,"~1")}function e(a){return"object"==typeof a?JSON.parse(JSON.stringify(a)):a}function f(a,b,c,g){for(var i=h(b),j=h(a),k=!1,l=!1,m=j.length-1;m>=0;m--){var n=j[m],o=a[n];if(b.hasOwnProperty(n)){var p=b[n];"object"==typeof o&&null!=o&&"object"==typeof p&&null!=p?f(o,p,c,g+"/"+d(n)):o!=p&&(k=!0,c.push({op:"replace",path:g+"/"+d(n),value:e(p)}))}else c.push({op:"remove",path:g+"/"+d(n)}),l=!0}if(l||i.length!=j.length)for(var m=0;m
  • '),a.put("ui/directive/controlPanel/controlPanel.html",'
    '),a.put("ui/directive/fontOperator/fontOperator.html",'
    '),a.put("ui/directive/kityminderEditor/kityminderEditor.html",'
    '),a.put("ui/directive/layout/layout.html",' {{ \'resetlayout\' | lang: \'ui/command\' }}'),a.put("ui/directive/noteEditor/noteEditor.html",'

    请选择节点编辑备注

    '),a.put("ui/directive/notePreviewer/notePreviewer.html",'
    '),a.put("ui/directive/priorityEditor/priorityEditor.html",'
    '),a.put("ui/directive/progressEditor/progressEditor.html",'
    '),a.put("ui/directive/resourceEditor/resourceEditor.html",'
    '),a.put("ui/directive/styleOperator/styleOperator.html",' {{ \'clearstyle\' | lang: \'ui\' }}'),a.put("ui/directive/templateList/templateList.html",''),a.put("ui/directive/themeList/themeList.html",'')}]),angular.module("kityminderEditor").service("commandBinder",function(){return{bind:function(a,b,c){a.on("interactchange",function(){c.commandDisabled=-1===a.queryCommandState(b),c.commandValue=a.queryCommandValue(b),c.$apply()})}}}),angular.module("kityminderEditor").service("config",function(){return{_default:{ctrlPanelMin:250,ctrlPanelWidth:parseInt(window.localStorage.__dev_minder_ctrlPanelWidth)||250,dividerWidth:3,defaultLang:"zh-cn"},getConfig:function(a){return void 0==a?this._default:this._default[a]||null},setConfig:function(a){this._default=a}}}),angular.module("kityminderEditor").service("lang.zh-cn",function(){return{"zh-cn":{template:{"default":"思维导图",tianpan:"天盘图",structure:"组织结构图",filetree:"目录组织图",right:"逻辑结构图","fish-bone":"鱼骨头图"},theme:{classic:"脑图经典","classic-compact":"紧凑经典",snow:"温柔冷光","snow-compact":"紧凑冷光",fish:"鱼骨图",wire:"线框","fresh-red":"清新红","fresh-soil":"泥土黄","fresh-green":"文艺绿","fresh-blue":"天空蓝","fresh-purple":"浪漫紫","fresh-pink":"脑残粉","fresh-red-compat":"紧凑红","fresh-soil-compat":"紧凑黄","fresh-green-compat":"紧凑绿","fresh-blue-compat":"紧凑蓝","fresh-purple-compat":"紧凑紫","fresh-pink-compat":"紧凑粉",tianpan:"经典天盘","tianpan-compact":"紧凑天盘"},maintopic:"中心主题",topic:"分支主题",panels:{history:"历史",template:"模板",theme:"皮肤",layout:"布局",style:"样式",font:"文字",color:"颜色",background:"背景",insert:"插入",arrange:"调整",nodeop:"当前",priority:"优先级",progress:"进度",resource:"资源",note:"备注",attachment:"附件",word:"文字"},error_message:{title:"哎呀,脑图出错了",err_load:"加载脑图失败",err_save:"保存脑图失败",err_network:"网络错误",err_doc_resolve:"文档解析失败",err_unknown:"发生了奇怪的错误",err_localfile_read:"文件读取错误",err_download:"文件下载失败",err_remove_share:"取消分享失败",err_create_share:"分享失败",err_mkdir:"目录创建失败",err_ls:"读取目录失败",err_share_data:"加载分享内容出错",err_share_sync_fail:"分享内容同步失败",err_move_file:"文件移动失败",err_rename:"重命名失败",unknownreason:"可能是外星人篡改了代码...",pcs_code:{3:"不支持此接口",4:"没有权限执行此操作",5:"IP未授权",110:"用户会话已过期,请重新登录",31001:"数据库查询错误",31002:"数据库连接错误",31003:"数据库返回空结果",31021:"网络错误",31022:"暂时无法连接服务器",31023:"输入参数错误",31024:"app id为空",31025:"后端存储错误",31041:"用户的cookie不是合法的百度cookie",31042:"用户未登陆",31043:"用户未激活",31044:"用户未授权",31045:"用户不存在",31046:"用户已经存在",31061:"文件已经存在",31062:"文件名非法",31063:"文件父目录不存在",31064:"无权访问此文件",31065:"目录已满",31066:"文件不存在",31067:"文件处理出错",31068:"文件创建失败",31069:"文件拷贝失败",31070:"文件删除失败",31071:"不能读取文件元信息",31072:"文件移动失败",31073:"文件重命名失败",31079:"未找到文件MD5,请使用上传API上传整个文件。",31081:"superfile创建失败",31082:"superfile 块列表为空",31083:"superfile 更新失败",31101:"tag系统内部错误",31102:"tag参数错误",31103:"tag系统错误",31110:"未授权设置此目录配额",31111:"配额管理只支持两级目录",31112:"超出配额",31113:"配额不能超出目录祖先的配额",31114:"配额不能比子目录配额小",31141:"请求缩略图服务失败",31201:"签名错误",31202:"文件不存在",31203:"设置acl失败",31204:"请求acl验证失败",31205:"获取acl失败",31206:"acl不存在",31207:"bucket已存在",31208:"用户请求错误",31209:"服务器错误",31210:"服务器不支持",31211:"禁止访问",31212:"服务不可用",31213:"重试出错",31214:"上传文件data失败",31215:"上传文件meta失败",31216:"下载文件data失败",31217:"下载文件meta失败",31218:"容量超出限额",31219:"请求数超出限额",31220:"流量超出限额",31298:"服务器返回值KEY非法",31299:"服务器返回值KEY不存在"}},ui:{shared_file_title:"[分享的] {0} (只读)",load_share_for_edit:"正在加载分享的文件...",share_sync_success:"分享内容已同步",recycle_clear_confirm:"确认清空回收站么?清空后的文件无法恢复。",fullscreen_exit_hint:"按 Esc 或 F11 退出全屏",error_detail:"详细信息",copy_and_feedback:"复制并反馈",move_file_confirm:'确定把 "{0}" 移动到 "{1}" 吗?',rename:"重命名",rename_success:"{0} 重命名成功",move_success:"{0} 移动成功到 {1}",command:{appendsiblingnode:"插入同级主题",appendchildnode:"插入下级主题",removenode:"删除",editnode:"编辑",arrangeup:"上移",arrangedown:"下移",resetlayout:"整理布局",expandtoleaf:"展开全部节点",expandtolevel1:"展开到一级节点",expandtolevel2:"展开到二级节点",expandtolevel3:"展开到三级节点",expandtolevel4:"展开到四级节点",expandtolevel5:"展开到五级节点",expandtolevel6:"展开到六级节点",fullscreen:"全屏",outline:"大纲"},expandtoleaf:"展开",back:"返回",undo:"撤销 (Ctrl + Z)",redo:"重做 (Ctrl + Y)",tabs:{idea:"思路",appearence:"外观",view:"视图"},quickvisit:{"new":"新建 (Ctrl + Alt + N)",save:"保存 (Ctrl + S)",share:"分享 (Ctrl + Alt + S)",feedback:"反馈问题(F1)",editshare:"编辑"},menu:{mainmenutext:"百度脑图",newtab:"新建",opentab:"打开",savetab:"保存",sharetab:"分享",preferencetab:"设置",helptab:"帮助",feedbacktab:"反馈",recenttab:"最近使用",netdisktab:"百度云存储",localtab:"本地文件",drafttab:"草稿箱",downloadtab:"导出到本地",createsharetab:"当前脑图",managesharetab:"已分享",newheader:"新建脑图",openheader:"打开",saveheader:"保存到",draftheader:"草稿箱",shareheader:"分享我的脑图",downloadheader:"导出到指定格式",preferenceheader:"偏好设置",helpheader:"帮助",feedbackheader:"反馈"},mydocument:"我的文档",emptydir:"目录为空!",pickfile:"选择文件...",acceptfile:"支持的格式:{0}",dropfile:"或将文件拖至此处",unsupportedfile:"不支持的文件格式",untitleddoc:"未命名文档",overrideconfirm:"{0} 已存在,确认覆盖吗?",checklogin:"检查登录状态中...",loggingin:"正在登录...",recent:"最近打开",clearrecent:"清空",clearrecentconfirm:"确认清空最近文档列表?",cleardraft:"清空",cleardraftconfirm:"确认清空草稿箱?",none_share:"不分享",public_share:"公开分享",password_share:"私密分享",email_share:"邮件邀请",url_share:"脑图 URL 地址:",sns_share:"社交网络分享:",sns_share_text:"“{0}” - 我用百度脑图制作的思维导图,快看看吧!(地址:{1})",none_share_description:"不分享当前脑图",public_share_description:"创建任何人可见的分享",share_button_text:"创建",password_share_description:"创建需要密码才可见的分享",email_share_description:"创建指定人可见的分享,您还可以允许他们编辑",ondev:"敬请期待!",create_share_failed:"分享失败:{0}",remove_share_failed:"删除失败:{1}",copy:"复制",copied:"已复制",shared_tip:"当前脑图被 {0} 分享,你可以修改之后保存到自己的网盘上或再次分享",current_share:"当前脑图",manage_share:"我的分享",share_remove_action:"不分享该脑图",share_view_action:"打开分享地址",share_edit_action:"编辑分享的文件",login:"登录",logout:"注销",switchuser:"切换账户",userinfo:"个人信息",gotonetdisk:"我的网盘",requirelogin:'请 后使用',saveas:"保存为",filename:"文件名",fileformat:"保存格式",save:"保存",mkdir:"新建目录",recycle:"回收站",newdir:"未命名目录",bold:"加粗",italic:"斜体",forecolor:"字体颜色",fontfamily:"字体",fontsize:"字号",layoutstyle:"主题",node:"节点操作",saveto:"另存为",hand:"允许拖拽",camera:"定位根节点","zoom-in":"放大(Ctrl+)","zoom-out":"缩小(Ctrl-)",markers:"标签",resource:"资源",help:"帮助",preference:"偏好设置",expandnode:"展开到叶子",collapsenode:"收起到一级节点",template:"模板",theme:"皮肤",clearstyle:"清除样式",copystyle:"复制样式",pastestyle:"粘贴样式",appendsiblingnode:"同级主题",appendchildnode:"下级主题",arrangeup:"前调",arrangedown:"后调",editnode:"编辑",removenode:"移除",priority:"优先级",progress:{p1:"未开始",p2:"完成 1/8",p3:"完成 1/4",p4:"完成 3/8",p5:"完成一半",p6:"完成 5/8",p7:"完成 3/4",p8:"完成 7/8",p9:"已完成",p0:"清除进度"},link:"链接",image:"图片",note:"备注",removelink:"移除已有连接",removeimage:"移除已有图片",removenote:"移除已有备注",resetlayout:"整理",justnow:"刚刚",minutesago:"{0} 分钟前",hoursago:"{0} 小时前",yesterday:"昨天",daysago:"{0} 天前",longago:"很久之前",redirect:"您正在打开连接 {0},百度脑图不能保证连接的安全性,是否要继续?",navigator:"导航器",unsavedcontent:"当前文件还没有保存到网盘:\n\n{0}\n\n虽然未保存的数据会缓存在草稿箱,但是清除浏览器缓存会导致草稿箱清除。",shortcuts:"快捷键",contact:"联系与反馈",email:"邮件组",qq_group:"QQ 群",github_issue:"Github",baidu_tieba:"贴吧",clipboardunsupported:"您的浏览器不支持剪贴板,请使用快捷键复制",load_success:"{0} 加载成功",save_success:"{0} 已保存于 {1}",autosave_success:"{0} 已自动保存于 {1}",selectall:"全选",selectrevert:"反选",selectsiblings:"选择兄弟节点",selectlevel:"选择同级节点",selectpath:"选择路径",selecttree:"选择子树"},popupcolor:{clearColor:"清空颜色",standardColor:"标准颜色",themeColor:"主题颜色"},dialogs:{markers:{"static":{lang_input_text:"文本内容:",lang_input_url:"链接地址:",lang_input_title:"标题:",lang_input_target:"是否在新窗口:"},priority:"优先级",none:"无",progress:{title:"进度",notdone:"未完成",done1:"完成 1/8",done2:"完成 1/4",done3:"完成 3/8",done4:"完成 1/2",done5:"完成 5/8",done6:"完成 3/4",done7:"完成 7/8",done:"已完成"}},help:{},hyperlink:{},image:{},resource:{}},hyperlink:{hyperlink:"链接...",unhyperlink:"移除链接"},image:{image:"图片...",removeimage:"移除图片"},marker:{marker:"进度/优先级..."},resource:{resource:"资源..."}}}}),angular.module("kityminderEditor").filter("commandState",function(){return function(a,b){return a.queryCommandState(b)}}).filter("commandValue",function(){return function(a,b){return a.queryCommandValue(b)}}),angular.module("kityminderEditor").filter("lang",["config","lang.zh-cn",function(a,b){return function(c,d){var e=a.getConfig("defaultLang");if(void 0==b[e])return"未发现对应语言包,请检查 lang.xxx.service.js!";var f=b[e];return d.split("/").forEach(function(a,b){f=f[a]}),f[c]||null}}]),angular.module("kityminderEditor").directive("colorPanel",function(){return{restrict:"E",templateUrl:"ui/directive/colorPanel/colorPanel.html",scope:{minder:"="},link:function(a){var b=a.minder,c=b.getThemeItems();a.hexPicker=a.hexPicker||c.background,a.seriesColor=["#e75d66","#fac75b","#99ca6a","#00c5ad","#3bbce0","#425b71","#ffffff"],a.$on("colorpicker-selected",function(c,d){b.execCommand("background",d.value),a.customColor=d.value}),b.on("interactchange",function(){var c=b.queryCommandValue("background")||"#000000";a.customColor=-1==a.seriesColor.indexOf(c)?c:null})}}}),angular.module("kityminderEditor").directive("controlPanel",function(){return{templateUrl:"ui/directive/controlPanel/controlPanel.html",restrict:"A",link:function(a){a.refreshNotePanel=function(){a.$broadcast("notePanelActived")}}}}),angular.module("kityminderEditor").directive("fontOperator",function(){return{restrict:"E",templateUrl:"ui/directive/fontOperator/fontOperator.html",scope:{minder:"="},link:function(a){var b=a.minder,c=b.getThemeItems();a.hexPicker=a.hexPicker||c["main-color"],a.fontSizeList=[10,12,16,18,24,32,48],a.$on("colorpicker-selected",function(c,d){b.execCommand("forecolor",d.value),a.customColor=d.value}),b.on("interactchange",function(){a.customColor=b.queryCommandValue("forecolor")||"#000000"})}}}),angular.module("kityminderEditor").directive("kityminderEditor",["config",function(a){return{restrict:"EA",templateUrl:"ui/directive/kityminderEditor/kityminderEditor.html",replace:!0,scope:{onInit:"&"},link:function(b,c,d){function e(a,c){b.onInit({editor:a,minder:c})}var f=c.children(".minder-editor")[0];if("undefined"!=typeof seajs)seajs.config({base:"./src"}),define("demo",function(a){var c=a("editor"),d=window.editor=new c(f);window.localStorage.__dev_minder_content&&d.minder.importJson(JSON.parse(window.localStorage.__dev_minder_content)), -d.minder.on("contentchange",function(){window.localStorage.__dev_minder_content=JSON.stringify(d.minder.exportJson())}),window.minder=window.km=d.minder,b.editor=d,b.minder=minder,b.$apply(),e(d,minder)}),seajs.use("demo");else if(window.kityminder&&window.kityminder.Editor){var g=new kityminder.Editor(f);window.editor=b.editor=g,window.minder=b.minder=g.minder,e(g,g.minder)}b.config=a.getConfig()}}}]),angular.module("kityminderEditor").directive("layout",function(){return{restrict:"E",templateUrl:"ui/directive/layout/layout.html",scope:{minder:"="},link:function(a){}}}),angular.module("kityminderEditor").directive("minderDivider",["config",function(a){return{scope:{config:"=minderDivider"},link:function(b,c){var d,e,f=a.getConfig("ctrlPanelMin"),g=a.getConfig("dividerWidth"),h=!1,i=document.body.clientWidth,j=b.config.ctrlPanelWidth;c.on("mousedown",function(a){d=a.pageX,h=!0}),$("body").on("mousemove",function(a){if(h){e=a.clientX;var c=d-e,k=i-j,l=f+g-j;c=c>k?k:c,c=l>c?l:c,b.config.ctrlPanelWidth=j+c,b.$apply()}}),window.addEventListener("mouseup",function(a){j=b.config.ctrlPanelWidth,window.localStorage.__dev_minder_ctrlPanelWidth=j,h=!1,b.$apply()})}}}]),angular.module("kityminderEditor").directive("noteEditor",function(){return{restrict:"E",templateUrl:"ui/directive/noteEditor/noteEditor.html",scope:{minder:"="},controller:["$scope",function(a){function b(){var b=a.noteEnabled=-1!=d.queryCommandState("note"),c=d.queryCommandValue("note")||"";b&&(a.noteContent=c),e=!0,a.$apply(),e=!1}var c,d=a.minder,e=!1;a.codemirrorLoaded=function(b){c=a.cmEditor=b,b.setSize("100%","100%")},a.$watch("noteContent",function(a){var b=-1!=d.queryCommandState("note");a&&b&&!e&&d.execCommand("note",a),setTimeout(function(){c.refresh()})}),a.$on("notePanelActived",function(){setTimeout(function(){c.refresh(),c.focus()})}),d.on("interactchange",b)}]}}),angular.module("kityminderEditor").directive("notePreviewer",["$sce",function(a){return{restrict:"A",templateUrl:"ui/directive/notePreviewer/notePreviewer.html",link:function(b,c){function d(c,d){var e=c.getRenderer("NoteIconRenderer").getRenderShape(),h=e.getRenderBox("screen"),j=c.getData("note");g[0].scrollTop=0;var k=marked(j);d&&(k=k.replace(new RegExp("("+d+")","ig"),'$1')),b.noteContent=a.trustAsHtml(k),b.$apply();var l=$(f[0]).width(),m=$(f[0]).height(),n=$(g).outerWidth(),o=$(g).outerHeight(),p=h.cx-n/2-f[0].offsetLeft,q=h.bottom+10-f[0].offsetTop;0>p&&(p=10),p+n>l&&(p=h.left-n-10-f[0].offsetLeft),q+o>m&&(q=h.top-o-10-f[0].offsetTop),b.previewerStyle={left:Math.round(p)+"px",top:Math.round(q)+"px"},b.showNotePreviewer=!0;var r=g[0].querySelector(".highlight");r&&r.scrollIntoView(),i=!0,b.$apply()}var e=b.minder,f=c.parent(),g=c.children();b.showNotePreviewer=!1,marked.setOptions({gfm:!0,breaks:!0});var h;e.on("shownoterequest",function(a){h=setTimeout(function(){d(a.node)},300)}),e.on("hidenoterequest",function(){clearTimeout(h)});var i=!1;$(document).on("mousedown mousewheel DOMMouseScroll",function(){i&&(b.showNotePreviewer=!1,b.$apply())}),c.on("mousedown mousewheel DOMMouseScroll",function(a){a.stopPropagation()})}}}]),angular.module("kityminderEditor").directive("priorityEditor",["commandBinder",function(a){return{restrict:"E",templateUrl:"ui/directive/priorityEditor/priorityEditor.html",scope:{minder:"="},link:function(b){for(var c=b.minder,d=[],e=0;10>e;e++)d.push(e);a.bind(c,"priority",b),b.priorities=d,b.getPriorityTitle=function(a){switch(a){case 0:return"移除优先级";default:return"优先级"+a}}}}}]),angular.module("kityminderEditor").directive("progressEditor",["commandBinder",function(a){return{restrict:"E",templateUrl:"ui/directive/progressEditor/progressEditor.html",scope:{minder:"="},link:function(b){for(var c=b.minder,d=[],e=0;10>e;e++)d.push(e);a.bind(c,"progress",b),b.progresses=d,b.getProgressTitle=function(a){switch(a){case 0:return"移除进度";case 1:return"未开始";case 9:return"全部完成";default:return"完成"+(a-1)+"/8"}}}}}]),angular.module("kityminderEditor").directive("resourceEditor",function(){return{restrict:"E",templateUrl:"ui/directive/resourceEditor/resourceEditor.html",scope:{minder:"="},controller:["$scope",function(a){var b=a.minder,c=!1;b.on("interactchange",function(){var d=a.enabled=-1!=b.queryCommandState("resource"),e=d?b.queryCommandValue("resource"):[],f=b.getUsedResource().map(function(a){return{name:a,selected:e.indexOf(a)>-1}});a.used=f,c=!0,a.$apply(),c=!1}),a.$watch("used",function(a){if(-1!=b.queryCommandState("resource")&&a){var d=a.filter(function(a){return a.selected}).map(function(a){return a.name});if(c)return;b.execCommand("resource",d)}},!0),a.resourceColor=function(a){return b.getResourceColor(a).toHEX()},a.addResource=function(c){var d=b.queryCommandValue("resource");c&&/\S/.test(c)&&(-1==d.indexOf(c)&&a.used.push({name:c,selected:!0}),a.newResourceName=null)}}]}}),angular.module("kityminderEditor").directive("styleOperator",function(){return{restrict:"E",templateUrl:"ui/directive/styleOperator/styleOperator.html",scope:{minder:"="}}}),angular.module("kityminderEditor").directive("templateList",function(){return{restrict:"E",templateUrl:"ui/directive/templateList/templateList.html",scope:{minder:"="},link:function(a){a.templateList=kityminder.Minder.getTemplateList()}}}),angular.module("kityminderEditor").directive("themeList",function(){return{restrict:"E",templateUrl:"ui/directive/themeList/themeList.html",link:function(a){var b=kityminder.Minder.getThemeList();a.getThemeThumbStyle=function(a){var c=b[a],d={color:c["root-color"],"border-radius":c["root-radius"]/2};return c["root-background"]&&(d.background=c["root-background"].toString()),d},a.themeKeyList=["classic","classic-compact","fresh-blue","fresh-blue-compat","fresh-green","fresh-green-compat","fresh-pink","fresh-pink-compat","fresh-purple","fresh-purple-compat","fresh-red","fresh-red-compat","fresh-soil","fresh-soil-compat","snow","snow-compact","fish","wire"]}}}),a("expose-editor")}(); \ No newline at end of file +!function(){function a(a){b.r([c[a]])}var b={r:function(a){if(b[a].inited)return b[a].value;if("function"!=typeof b[a].value)return b[a].inited=!0,b[a].value;var c={exports:{}},d=b[a].value(null,c.exports,c);if(b[a].inited=!0,b[a].value=d,void 0!==d)return d;for(var e in c.exports)if(c.exports.hasOwnProperty(e))return b[a].inited=!0,b[a].value=c.exports,c.exports}};b[0]={value:function(a,c,d){function e(a){g.push(a)}function f(a){this.selector=a;for(var b=0;b {2}",c,h,a),d=0;d *");var e,g,h,i;if(g=a.split(c),2==g.length?e="before":(g=a.split(d),2==g.length&&(e="after")),!e)throw new Error("Illegal fsm condition: "+a);h=g[0],i=g[1],b.condition={when:e,exit:h,enter:i},f.push(b)}}function g(){this.fsm=new f("normal")}var h=b.r(16),i=new h("fsm");return d.exports=g}},b[7]={value:function(a,c,d){function e(){function a(){m=[],n=[],k=o.exportJson()}function b(){var a=o.exportJson(),b=f(a,k);if(b.length){for(m.push(b);m.length>q;)m.shift();return k=a,!0}}function c(){var a=o.exportJson();n.push(f(a,k)),k=a}function d(){l=!0;var a=m.pop();a&&(o.applyPatches(a),c()),l=!1}function e(){l=!0;var a=n.pop();n&&(o.applyPatches(a),b()),l=!1}function g(){l||b()&&(n=[])}function h(){return!!m.length}function i(){return!!n.length}function j(a){if(l){var b=a.patch;switch(b.express){case"node.add":o.select(b.node.getChild(b.index),!0);break;case"node.remove":case"data.replace":case"data.remove":case"data.add":o.select(b.node,!0)}}}var k,l,m,n,o=this.minder,p=this.hotbox,q=100;this.history={reset:a,undo:d,redo:e,hasUndo:h,hasRedo:i},a(),o.on("contentchange",g),o.on("import",a),o.on("patch",j);var r=p.state("main");r.button({position:"top",label:"撤销",key:"Ctrl + Z",enable:h,action:d,next:"idle"}),r.button({position:"top",label:"重做",key:"Ctrl + Y",enable:i,action:e,next:"idle"})}var f=b.r(19);return window.diff=f,d.exports=e}},b[8]={value:function(a,c,d){function e(){var a=this.fsm,b=this.minder,c=(this.receiver,this.container),d=new f(c);a.when("normal -> hotbox",function(a,c,e){var f,g=b.getSelectedNode();if(g){var h=g.getRenderBox();f={x:h.cx,y:h.cy}}d.active("main",f)}),a.when("normal -> normal",function(a,c,e,f){if("shortcut-handle"==e){var g=d.dispatch(f);g?f.preventDefault():b.dispatchKeyEvent(f)}}),this.hotbox=d}var f=b.r(2);return d.exports=e}},b[9]={value:function(a,c,d){function e(){function a(){j.when("* -> input",e),j.when("input -> *",function(a,b,c){switch(c){case"input-cancel":return h();case"input-commit":default:return f()}}),k.on("beforemousedown",function(){"input"==j.state()&&j.jump("normal","input-commit")}),k.on("dblclick",function(){k.getSelectedNode()&&d()})}function b(){g.flaged&&n.classList.add("debug"),n.onmousedown=function(a){a.stopPropagation()},k.on("layoutallfinish viewchange viewchanged selectionchange",function(a){("viewchange"!=a.type||"input"==j.state())&&i()}),i()}function c(){l.state("main").button({position:"center",label:"编辑",key:"F2",enable:function(){return-1!=k.queryCommandState("text")},action:d})}function d(){n.innerText=k.queryCommandValue("text"),j.jump("input","input-request"),m.selectAll()}function e(){var a=k.getSelectedNode();if(a){var b=a.getData("font-size")||a.getStyle("font-size");n.style.fontSize=b+"px",n.style.minWidth=0,n.style.minWidth=n.clientWidth+"px",n.classList.add("input"),n.focus()}}function f(){var a=n.innerText;k.execCommand("text",a.replace(/^\n*|\n*$/g,"")),h()}function h(){n.classList.remove("input"),m.selectAll()}function i(){var a=i,b=k.getSelectedNode();b&&(a.timer||(a.timer=setTimeout(function(){var c=b.getRenderBox("TextRenderer");n.style.left=Math.round(c.x)+"px",n.style.top=(g.flaged?Math.round(c.bottom+30):Math.round(c.y))+"px",a.timer=0})))}var j=this.fsm,k=this.minder,l=this.hotbox,m=this.receiver,n=m.element;b(),a(),c(),this.editText=d}b.r(18);var f=b.r(16),g=new f("input");return d.exports=e}},b[10]={value:function(a,c,d){function e(a){return a.ctrlKey||a.metaKey||a.altKey?!1:a.keyCode>=65&&a.keyCode<=90?!0:a.keyCode>=48&&a.keyCode<=57?!0:229==a.keyCode?!0:void 0}function f(){var a=this.fsm,b=this.minder,c=this.receiver,d=this.container,f=c.element,h=this.hotbox;c.listen("normal",function(c){if("keydown"==c.type&&c.is("Space"))return c.preventDefault(),a.jump("hotbox","space-trigger");if("keydown"==c.type&&e(c)){if(b.getSelectedNode())return a.jump("input","user-input");f.innerHTML=""}return"keydown"==c.type?a.jump("normal","shortcut-handle",c):void 0}),c.listen("hotbox",function(b){b.preventDefault();h.dispatch(b);return h.state()==g.STATE_IDLE&&"hotbox"==a.state()?a.jump("normal","hotbox-idle"):void 0}),c.listen("input",function(b){if("keydown"==b.type){if(b.is("Enter"))return b.preventDefault(),a.jump("normal","input-commit");if(b.is("Esc"))return b.preventDefault(),a.jump("normal","input-cancel");(b.is("Tab")||b.is("Shift + Tab"))&&b.preventDefault()}});var i,j,k=2;d.addEventListener("mousedown",function(b){b.button==k&&b.preventDefault(),"hotbox"==a.state()?(h.active(g.STATE_IDLE),a.jump("normal","blur")):"normal"==a.state()&&b.button==k&&(i=b.clientX,j=b.clientY)},!1),d.addEventListener("contextmenu",function(a){a.preventDefault()}),d.addEventListener("mouseup",function(c){"normal"==a.state()&&c.button==k&&c.clientX==i&&c.clientY==j&&b.getSelectedNode()&&a.jump("hotbox","content-menu")},!1),h.$element.addEventListener("mousedown",function(a){a.stopPropagation()})}var g=b.r(2);return d.exports=f}},b[11]={value:function(a,c,d){function e(){var a=new f({enableKeyReceiver:!1,enableAnimation:!1});a.renderTo(this.selector),a.setTheme(null),a.select(a.getRoot(),!0),a.execCommand("text","中心主题"),this.minder=a}var f=b.r(4);return d.exports=e}},b[12]={value:function(a,b,c){function d(){var a=this,b=this.minder,c=this.hotbox,d=this.fsm,e=c.state("main"),f=["前移:Alt+Up:ArrangeUp","下级:Tab:AppendChildNode","同级:Enter:AppendSiblingNode","后移:Alt+Down:ArrangeDown","删除:Delete|Backspace:RemoveNode","归纳:Shift+Tab|Shift+Insert:AppendParentNode"];f.forEach(function(c){var f=c.split(":"),g=f.shift(),h=f.shift(),i=f.shift();e.button({position:"ring",label:g,key:h,action:function(){0===i.indexOf("Append")?(b.execCommand(i,"新主题"),a.editText()):(b.execCommand(i),d.jump("normal","command-executed"))},enable:function(){return-1!=b.queryCommandState(i)}})}),e.button({position:"ring",key:"/",action:function(){b.queryCommandState("expand")?b.queryCommandState("collapse")||b.execCommand("collapse"):b.execCommand("expand")},enable:function(){return-1!=b.queryCommandState("expand")||-1!=b.queryCommandState("collapse")},beforeShow:function(){b.queryCommandState("expand")?this.$button.children[0].innerHTML="收起":this.$button.children[0].innerHTML="展开"}})}return c.exports=d}},b[13]={value:function(a,b,c){function d(){var a=this.minder,b=this.hotbox,c=b.state("main");c.button({position:"top",label:"优先级",key:"P",next:"priority"});var d=b.state("priority");"123456789".replace(/./g,function(b){d.button({position:"ring",label:"P"+b,key:b,action:function(){a.execCommand("Priority",b)}})}),d.button({position:"center",label:"移除",key:"Del",action:function(){a.execCommand("Priority",0)}}),d.button({position:"top",label:"返回",key:"esc",next:"back"})}return c.exports=d}},b[14]={value:function(a,b,c){function d(){var a=this.minder,b=this.hotbox,c=b.state("main");c.button({position:"top",label:"进度",key:"G",next:"progress"});var d=b.state("progress");"012345678".replace(/./g,function(b){d.button({position:"ring",label:"G"+b,key:b,action:function(){a.execCommand("Progress",parseInt(b)+1)}})}),d.button({position:"center",label:"移除",key:"Del",action:function(){a.execCommand("Progress",0)}}),d.button({position:"top",label:"返回",key:"esc",next:"back"})}return c.exports=d}},b[15]={value:function(a,c,d){function e(){function a(a){a.is=function(a){for(var b=a.split("|"),c=0;c/g,">").replace(/\n/g,"
    ")}))}},b[19]={value:function(a,b,c){function d(a){return-1===a.indexOf("/")&&-1===a.indexOf("~")?a:a.replace(/~/g,"~0").replace(/\//g,"~1")}function e(a){return"object"==typeof a?JSON.parse(JSON.stringify(a)):a}function f(a,b,c,g){for(var i=h(b),j=h(a),k=!1,l=!1,m=j.length-1;m>=0;m--){var n=j[m],o=a[n];if(b.hasOwnProperty(n)){var p=b[n];"object"==typeof o&&null!=o&&"object"==typeof p&&null!=p?f(o,p,c,g+"/"+d(n)):o!=p&&(k=!0,c.push({op:"replace",path:g+"/"+d(n),value:e(p)}))}else c.push({op:"remove",path:g+"/"+d(n)}),l=!0}if(l||i.length!=j.length)for(var m=0;m
  • '),a.put("ui/directive/controlPanel/controlPanel.html",'
    '),a.put("ui/directive/fontOperator/fontOperator.html",'
    '),a.put("ui/directive/kityminderEditor/kityminderEditor.html",'
    '),a.put("ui/directive/layout/layout.html",' {{ \'resetlayout\' | lang: \'ui/command\' }}'),a.put("ui/directive/noteEditor/noteEditor.html",'

    请选择节点编辑备注

    '),a.put("ui/directive/notePreviewer/notePreviewer.html",'
    '),a.put("ui/directive/priorityEditor/priorityEditor.html",'
    '),a.put("ui/directive/progressEditor/progressEditor.html",'
    '),a.put("ui/directive/resourceEditor/resourceEditor.html",'
    '),a.put("ui/directive/styleOperator/styleOperator.html",' {{ \'clearstyle\' | lang: \'ui\' }}'),a.put("ui/directive/templateList/templateList.html",''),a.put("ui/directive/themeList/themeList.html",'')}]),angular.module("kityminderEditor").service("commandBinder",function(){return{bind:function(a,b,c){a.on("interactchange",function(){c.commandDisabled=-1===a.queryCommandState(b),c.commandValue=a.queryCommandValue(b),c.$apply()})}}}),angular.module("kityminderEditor").service("config",function(){return{_default:{ctrlPanelMin:250,ctrlPanelWidth:parseInt(window.localStorage.__dev_minder_ctrlPanelWidth)||250,dividerWidth:3,defaultLang:"zh-cn"},getConfig:function(a){return void 0==a?this._default:this._default[a]||null},setConfig:function(a){this._default=a}}}),angular.module("kityminderEditor").service("lang.zh-cn",function(){return{"zh-cn":{template:{"default":"思维导图",tianpan:"天盘图",structure:"组织结构图",filetree:"目录组织图",right:"逻辑结构图","fish-bone":"鱼骨头图"},theme:{classic:"脑图经典","classic-compact":"紧凑经典",snow:"温柔冷光","snow-compact":"紧凑冷光",fish:"鱼骨图",wire:"线框","fresh-red":"清新红","fresh-soil":"泥土黄","fresh-green":"文艺绿","fresh-blue":"天空蓝","fresh-purple":"浪漫紫","fresh-pink":"脑残粉","fresh-red-compat":"紧凑红","fresh-soil-compat":"紧凑黄","fresh-green-compat":"紧凑绿","fresh-blue-compat":"紧凑蓝","fresh-purple-compat":"紧凑紫","fresh-pink-compat":"紧凑粉",tianpan:"经典天盘","tianpan-compact":"紧凑天盘"},maintopic:"中心主题",topic:"分支主题",panels:{history:"历史",template:"模板",theme:"皮肤",layout:"布局",style:"样式",font:"文字",color:"颜色",background:"背景",insert:"插入",arrange:"调整",nodeop:"当前",priority:"优先级",progress:"进度",resource:"资源",note:"备注",attachment:"附件",word:"文字"},error_message:{title:"哎呀,脑图出错了",err_load:"加载脑图失败",err_save:"保存脑图失败",err_network:"网络错误",err_doc_resolve:"文档解析失败",err_unknown:"发生了奇怪的错误",err_localfile_read:"文件读取错误",err_download:"文件下载失败",err_remove_share:"取消分享失败",err_create_share:"分享失败",err_mkdir:"目录创建失败",err_ls:"读取目录失败",err_share_data:"加载分享内容出错",err_share_sync_fail:"分享内容同步失败",err_move_file:"文件移动失败",err_rename:"重命名失败",unknownreason:"可能是外星人篡改了代码...",pcs_code:{3:"不支持此接口",4:"没有权限执行此操作",5:"IP未授权",110:"用户会话已过期,请重新登录",31001:"数据库查询错误",31002:"数据库连接错误",31003:"数据库返回空结果",31021:"网络错误",31022:"暂时无法连接服务器",31023:"输入参数错误",31024:"app id为空",31025:"后端存储错误",31041:"用户的cookie不是合法的百度cookie",31042:"用户未登陆",31043:"用户未激活",31044:"用户未授权",31045:"用户不存在",31046:"用户已经存在",31061:"文件已经存在",31062:"文件名非法",31063:"文件父目录不存在",31064:"无权访问此文件",31065:"目录已满",31066:"文件不存在",31067:"文件处理出错",31068:"文件创建失败",31069:"文件拷贝失败",31070:"文件删除失败",31071:"不能读取文件元信息",31072:"文件移动失败",31073:"文件重命名失败",31079:"未找到文件MD5,请使用上传API上传整个文件。",31081:"superfile创建失败",31082:"superfile 块列表为空",31083:"superfile 更新失败",31101:"tag系统内部错误",31102:"tag参数错误",31103:"tag系统错误",31110:"未授权设置此目录配额",31111:"配额管理只支持两级目录",31112:"超出配额",31113:"配额不能超出目录祖先的配额",31114:"配额不能比子目录配额小",31141:"请求缩略图服务失败",31201:"签名错误",31202:"文件不存在",31203:"设置acl失败",31204:"请求acl验证失败",31205:"获取acl失败",31206:"acl不存在",31207:"bucket已存在",31208:"用户请求错误",31209:"服务器错误",31210:"服务器不支持",31211:"禁止访问",31212:"服务不可用",31213:"重试出错",31214:"上传文件data失败",31215:"上传文件meta失败",31216:"下载文件data失败",31217:"下载文件meta失败",31218:"容量超出限额",31219:"请求数超出限额",31220:"流量超出限额",31298:"服务器返回值KEY非法",31299:"服务器返回值KEY不存在"}},ui:{shared_file_title:"[分享的] {0} (只读)",load_share_for_edit:"正在加载分享的文件...",share_sync_success:"分享内容已同步",recycle_clear_confirm:"确认清空回收站么?清空后的文件无法恢复。",fullscreen_exit_hint:"按 Esc 或 F11 退出全屏",error_detail:"详细信息",copy_and_feedback:"复制并反馈",move_file_confirm:'确定把 "{0}" 移动到 "{1}" 吗?',rename:"重命名",rename_success:"{0} 重命名成功",move_success:"{0} 移动成功到 {1}",command:{appendsiblingnode:"插入同级主题",appendchildnode:"插入下级主题",removenode:"删除",editnode:"编辑",arrangeup:"上移",arrangedown:"下移",resetlayout:"整理布局",expandtoleaf:"展开全部节点",expandtolevel1:"展开到一级节点",expandtolevel2:"展开到二级节点",expandtolevel3:"展开到三级节点",expandtolevel4:"展开到四级节点",expandtolevel5:"展开到五级节点",expandtolevel6:"展开到六级节点",fullscreen:"全屏",outline:"大纲"},expandtoleaf:"展开",back:"返回",undo:"撤销 (Ctrl + Z)",redo:"重做 (Ctrl + Y)",tabs:{idea:"思路",appearence:"外观",view:"视图"},quickvisit:{"new":"新建 (Ctrl + Alt + N)",save:"保存 (Ctrl + S)",share:"分享 (Ctrl + Alt + S)",feedback:"反馈问题(F1)",editshare:"编辑"},menu:{mainmenutext:"百度脑图",newtab:"新建",opentab:"打开",savetab:"保存",sharetab:"分享",preferencetab:"设置",helptab:"帮助",feedbacktab:"反馈",recenttab:"最近使用",netdisktab:"百度云存储",localtab:"本地文件",drafttab:"草稿箱",downloadtab:"导出到本地",createsharetab:"当前脑图",managesharetab:"已分享",newheader:"新建脑图",openheader:"打开",saveheader:"保存到",draftheader:"草稿箱",shareheader:"分享我的脑图",downloadheader:"导出到指定格式",preferenceheader:"偏好设置",helpheader:"帮助",feedbackheader:"反馈"},mydocument:"我的文档",emptydir:"目录为空!",pickfile:"选择文件...",acceptfile:"支持的格式:{0}",dropfile:"或将文件拖至此处",unsupportedfile:"不支持的文件格式",untitleddoc:"未命名文档",overrideconfirm:"{0} 已存在,确认覆盖吗?",checklogin:"检查登录状态中...",loggingin:"正在登录...",recent:"最近打开",clearrecent:"清空",clearrecentconfirm:"确认清空最近文档列表?",cleardraft:"清空",cleardraftconfirm:"确认清空草稿箱?",none_share:"不分享",public_share:"公开分享",password_share:"私密分享",email_share:"邮件邀请",url_share:"脑图 URL 地址:",sns_share:"社交网络分享:",sns_share_text:"“{0}” - 我用百度脑图制作的思维导图,快看看吧!(地址:{1})",none_share_description:"不分享当前脑图",public_share_description:"创建任何人可见的分享",share_button_text:"创建",password_share_description:"创建需要密码才可见的分享",email_share_description:"创建指定人可见的分享,您还可以允许他们编辑",ondev:"敬请期待!",create_share_failed:"分享失败:{0}",remove_share_failed:"删除失败:{1}",copy:"复制",copied:"已复制",shared_tip:"当前脑图被 {0} 分享,你可以修改之后保存到自己的网盘上或再次分享",current_share:"当前脑图",manage_share:"我的分享",share_remove_action:"不分享该脑图",share_view_action:"打开分享地址",share_edit_action:"编辑分享的文件",login:"登录",logout:"注销",switchuser:"切换账户",userinfo:"个人信息",gotonetdisk:"我的网盘",requirelogin:'请 后使用',saveas:"保存为",filename:"文件名",fileformat:"保存格式",save:"保存",mkdir:"新建目录",recycle:"回收站",newdir:"未命名目录",bold:"加粗",italic:"斜体",forecolor:"字体颜色",fontfamily:"字体",fontsize:"字号",layoutstyle:"主题",node:"节点操作",saveto:"另存为",hand:"允许拖拽",camera:"定位根节点","zoom-in":"放大(Ctrl+)","zoom-out":"缩小(Ctrl-)",markers:"标签",resource:"资源",help:"帮助",preference:"偏好设置",expandnode:"展开到叶子",collapsenode:"收起到一级节点",template:"模板",theme:"皮肤",clearstyle:"清除样式",copystyle:"复制样式",pastestyle:"粘贴样式",appendsiblingnode:"同级主题",appendchildnode:"下级主题",arrangeup:"前调",arrangedown:"后调",editnode:"编辑",removenode:"移除",priority:"优先级",progress:{p1:"未开始",p2:"完成 1/8",p3:"完成 1/4",p4:"完成 3/8",p5:"完成一半",p6:"完成 5/8",p7:"完成 3/4",p8:"完成 7/8",p9:"已完成",p0:"清除进度"},link:"链接",image:"图片",note:"备注",removelink:"移除已有连接",removeimage:"移除已有图片",removenote:"移除已有备注",resetlayout:"整理",justnow:"刚刚",minutesago:"{0} 分钟前",hoursago:"{0} 小时前",yesterday:"昨天",daysago:"{0} 天前",longago:"很久之前",redirect:"您正在打开连接 {0},百度脑图不能保证连接的安全性,是否要继续?",navigator:"导航器",unsavedcontent:"当前文件还没有保存到网盘:\n\n{0}\n\n虽然未保存的数据会缓存在草稿箱,但是清除浏览器缓存会导致草稿箱清除。",shortcuts:"快捷键",contact:"联系与反馈",email:"邮件组",qq_group:"QQ 群",github_issue:"Github",baidu_tieba:"贴吧",clipboardunsupported:"您的浏览器不支持剪贴板,请使用快捷键复制",load_success:"{0} 加载成功",save_success:"{0} 已保存于 {1}",autosave_success:"{0} 已自动保存于 {1}",selectall:"全选",selectrevert:"反选",selectsiblings:"选择兄弟节点",selectlevel:"选择同级节点",selectpath:"选择路径",selecttree:"选择子树"},popupcolor:{clearColor:"清空颜色",standardColor:"标准颜色",themeColor:"主题颜色"},dialogs:{markers:{"static":{lang_input_text:"文本内容:",lang_input_url:"链接地址:",lang_input_title:"标题:",lang_input_target:"是否在新窗口:"},priority:"优先级",none:"无",progress:{title:"进度",notdone:"未完成",done1:"完成 1/8",done2:"完成 1/4",done3:"完成 3/8",done4:"完成 1/2",done5:"完成 5/8",done6:"完成 3/4",done7:"完成 7/8",done:"已完成"}},help:{},hyperlink:{},image:{},resource:{}},hyperlink:{hyperlink:"链接...",unhyperlink:"移除链接"},image:{image:"图片...",removeimage:"移除图片"},marker:{marker:"进度/优先级..."},resource:{resource:"资源..."}}}}),angular.module("kityminderEditor").filter("commandState",function(){return function(a,b){return a.queryCommandState(b)}}).filter("commandValue",function(){return function(a,b){return a.queryCommandValue(b)}}),angular.module("kityminderEditor").filter("lang",["config","lang.zh-cn",function(a,b){return function(c,d){var e=a.getConfig("defaultLang");if(void 0==b[e])return"未发现对应语言包,请检查 lang.xxx.service.js!";var f=b[e];return d.split("/").forEach(function(a,b){f=f[a]}),f[c]||null}}]),angular.module("kityminderEditor").directive("colorPanel",function(){return{restrict:"E",templateUrl:"ui/directive/colorPanel/colorPanel.html",scope:{minder:"="},link:function(a){var b=a.minder,c=b.getThemeItems();a.hexPicker=a.hexPicker||c.background,a.seriesColor=["#e75d66","#fac75b","#99ca6a","#00c5ad","#3bbce0","#425b71","#ffffff"],a.$on("colorpicker-selected",function(c,d){b.execCommand("background",d.value),a.customColor=d.value}),b.on("interactchange",function(){var c=b.queryCommandValue("background")||"#000000";a.customColor=-1==a.seriesColor.indexOf(c)?c:null})}}}),angular.module("kityminderEditor").directive("controlPanel",function(){return{templateUrl:"ui/directive/controlPanel/controlPanel.html",restrict:"A",link:function(a){a.refreshNotePanel=function(){a.$broadcast("notePanelActived")}}}}),angular.module("kityminderEditor").directive("fontOperator",function(){return{restrict:"E",templateUrl:"ui/directive/fontOperator/fontOperator.html",scope:{minder:"="},link:function(a){var b=a.minder,c=b.getThemeItems();a.hexPicker=a.hexPicker||c["main-color"],a.fontSizeList=[10,12,16,18,24,32,48],a.$on("colorpicker-selected",function(c,d){b.execCommand("forecolor",d.value),a.customColor=d.value}),b.on("interactchange",function(){a.customColor=b.queryCommandValue("forecolor")||"#000000"})}}}),angular.module("kityminderEditor").directive("kityminderEditor",["config",function(a){return{restrict:"EA",templateUrl:"ui/directive/kityminderEditor/kityminderEditor.html",replace:!0,scope:{onInit:"&"},link:function(b,c,d){function e(a,c){b.onInit({editor:a,minder:c})}var f=c.children(".minder-editor")[0];if("undefined"!=typeof seajs)seajs.config({base:"./src"}),define("demo",function(a){var c=a("editor"),d=window.editor=new c(f);window.localStorage.__dev_minder_content&&d.minder.importJson(JSON.parse(window.localStorage.__dev_minder_content)), +d.minder.on("contentchange",function(){window.localStorage.__dev_minder_content=JSON.stringify(d.minder.exportJson())}),window.minder=window.km=d.minder,b.editor=d,b.minder=minder,b.$apply(),e(d,minder)}),seajs.use("demo");else if(window.kityminder&&window.kityminder.Editor){var g=new kityminder.Editor(f);window.editor=b.editor=g,window.minder=b.minder=g.minder,e(g,g.minder)}b.config=a.getConfig()}}}]),angular.module("kityminderEditor").directive("layout",function(){return{restrict:"E",templateUrl:"ui/directive/layout/layout.html",scope:{minder:"="},link:function(a){}}}),angular.module("kityminderEditor").directive("minderDivider",["config",function(a){return{scope:{config:"=minderDivider",minder:"="},link:function(b,c){var d,e,f=b.minder,g=a.getConfig("ctrlPanelMin"),h=a.getConfig("dividerWidth"),i=!1,j=document.body.clientWidth,k=b.config.ctrlPanelWidth;c.on("mousedown",function(a){d=a.pageX,i=!0}),$("body").on("mousemove",function(a){if(i){e=a.clientX;var c=d-e,l=j-k,m=g+h-k;c=c>l?l:c,c=m>c?m:c,b.config.ctrlPanelWidth=k+c,b.$apply(),f.fire("resize")}}),window.addEventListener("mouseup",function(a){k=b.config.ctrlPanelWidth,window.localStorage.__dev_minder_ctrlPanelWidth=k,i=!1,b.$apply()})}}}]),angular.module("kityminderEditor").directive("noteEditor",function(){return{restrict:"E",templateUrl:"ui/directive/noteEditor/noteEditor.html",scope:{minder:"="},controller:["$scope",function(a){function b(){var b=a.noteEnabled=-1!=d.queryCommandState("note"),c=d.queryCommandValue("note")||"";b&&(a.noteContent=c),e=!0,a.$apply(),e=!1}var c,d=a.minder,e=!1;a.codemirrorLoaded=function(b){c=a.cmEditor=b,b.setSize("100%","100%")},a.$watch("noteContent",function(a){var b=-1!=d.queryCommandState("note");a&&b&&!e&&d.execCommand("note",a),setTimeout(function(){c.refresh()})}),a.$on("notePanelActived",function(){setTimeout(function(){c.refresh(),c.focus()})}),d.on("interactchange",b)}]}}),angular.module("kityminderEditor").directive("notePreviewer",["$sce",function(a){return{restrict:"A",templateUrl:"ui/directive/notePreviewer/notePreviewer.html",link:function(b,c){function d(c,d){var e=c.getRenderer("NoteIconRenderer").getRenderShape(),h=e.getRenderBox("screen"),j=c.getData("note");g[0].scrollTop=0;var k=marked(j);d&&(k=k.replace(new RegExp("("+d+")","ig"),'$1')),b.noteContent=a.trustAsHtml(k),b.$apply();var l=$(f[0]).width(),m=$(f[0]).height(),n=$(g).outerWidth(),o=$(g).outerHeight(),p=h.cx-n/2-f[0].offsetLeft,q=h.bottom+10-f[0].offsetTop;0>p&&(p=10),p+n>l&&(p=h.left-n-10-f[0].offsetLeft),q+o>m&&(q=h.top-o-10-f[0].offsetTop),b.previewerStyle={left:Math.round(p)+"px",top:Math.round(q)+"px"},b.showNotePreviewer=!0;var r=g[0].querySelector(".highlight");r&&r.scrollIntoView(),i=!0,b.$apply()}var e=b.minder,f=c.parent(),g=c.children();b.showNotePreviewer=!1,marked.setOptions({gfm:!0,breaks:!0});var h;e.on("shownoterequest",function(a){h=setTimeout(function(){d(a.node)},300)}),e.on("hidenoterequest",function(){clearTimeout(h)});var i=!1;$(document).on("mousedown mousewheel DOMMouseScroll",function(){i&&(b.showNotePreviewer=!1,b.$apply())}),c.on("mousedown mousewheel DOMMouseScroll",function(a){a.stopPropagation()})}}}]),angular.module("kityminderEditor").directive("priorityEditor",["commandBinder",function(a){return{restrict:"E",templateUrl:"ui/directive/priorityEditor/priorityEditor.html",scope:{minder:"="},link:function(b){for(var c=b.minder,d=[],e=0;10>e;e++)d.push(e);a.bind(c,"priority",b),b.priorities=d,b.getPriorityTitle=function(a){switch(a){case 0:return"移除优先级";default:return"优先级"+a}}}}}]),angular.module("kityminderEditor").directive("progressEditor",["commandBinder",function(a){return{restrict:"E",templateUrl:"ui/directive/progressEditor/progressEditor.html",scope:{minder:"="},link:function(b){for(var c=b.minder,d=[],e=0;10>e;e++)d.push(e);a.bind(c,"progress",b),b.progresses=d,b.getProgressTitle=function(a){switch(a){case 0:return"移除进度";case 1:return"未开始";case 9:return"全部完成";default:return"完成"+(a-1)+"/8"}}}}}]),angular.module("kityminderEditor").directive("resourceEditor",function(){return{restrict:"E",templateUrl:"ui/directive/resourceEditor/resourceEditor.html",scope:{minder:"="},controller:["$scope",function(a){var b=a.minder,c=!1;b.on("interactchange",function(){var d=a.enabled=-1!=b.queryCommandState("resource"),e=d?b.queryCommandValue("resource"):[],f=b.getUsedResource().map(function(a){return{name:a,selected:e.indexOf(a)>-1}});a.used=f,c=!0,a.$apply(),c=!1}),a.$watch("used",function(a){if(-1!=b.queryCommandState("resource")&&a){var d=a.filter(function(a){return a.selected}).map(function(a){return a.name});if(c)return;b.execCommand("resource",d)}},!0),a.resourceColor=function(a){return b.getResourceColor(a).toHEX()},a.addResource=function(c){var d=b.queryCommandValue("resource");c&&/\S/.test(c)&&(-1==d.indexOf(c)&&a.used.push({name:c,selected:!0}),a.newResourceName=null)}}]}}),angular.module("kityminderEditor").directive("styleOperator",function(){return{restrict:"E",templateUrl:"ui/directive/styleOperator/styleOperator.html",scope:{minder:"="}}}),angular.module("kityminderEditor").directive("templateList",function(){return{restrict:"E",templateUrl:"ui/directive/templateList/templateList.html",scope:{minder:"="},link:function(a){a.templateList=kityminder.Minder.getTemplateList()}}}),angular.module("kityminderEditor").directive("themeList",function(){return{restrict:"E",templateUrl:"ui/directive/themeList/themeList.html",link:function(a){var b=kityminder.Minder.getThemeList();a.getThemeThumbStyle=function(a){var c=b[a],d={color:c["root-color"],"border-radius":c["root-radius"]/2};return c["root-background"]&&(d.background=c["root-background"].toString()),d},a.themeKeyList=["classic","classic-compact","fresh-blue","fresh-blue-compat","fresh-green","fresh-green-compat","fresh-pink","fresh-pink-compat","fresh-purple","fresh-purple-compat","fresh-red","fresh-red-compat","fresh-soil","fresh-soil-compat","snow","snow-compact","fish","wire"]}}}),a("expose-editor")}(); \ No newline at end of file diff --git a/package.json b/package.json index 81bdc911..f32dd970 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "km-editor", - "version": "0.0.1", + "name": "kityminder-editor", + "version": "1.0.19", "description": "A powerful mind map editor", "main": "kityminder.editor.js", "scripts": { diff --git a/ui/templates.js b/ui/templates.js index 53df8268..46568279 100644 --- a/ui/templates.js +++ b/ui/templates.js @@ -17,7 +17,7 @@ angular.module('kityminderEditor').run(['$templateCache', function($templateCach $templateCache.put('ui/directive/kityminderEditor/kityminderEditor.html', - "
    " + "
    " ); @@ -27,20 +27,13 @@ angular.module('kityminderEditor').run(['$templateCache', function($templateCach $templateCache.put('ui/directive/noteEditor/noteEditor.html', - "

    请选择节点编辑备注

    " );