Commit 37eac962 authored by techird's avatar techird

Merge commit v1.3.1

parents 00fae476 201b0f5e
......@@ -2,5 +2,6 @@
.DS_Store
*.sublime-project
*.sublime-workspace
dist/
node_modules/
_drafts/
\ No newline at end of file
[submodule "kity"]
path = kity
url = https://github.com/fex-team/kity.git
[submodule "lib/kity"]
path = lib/kity
url = https://github.com/fex-team/kity
[submodule "lib/fui"]
path = lib/fui
url = https://github.com/fex-team/fui
[submodule "lib/fio"]
path = lib/fio
url = https://github.com/fex-team/fio
......@@ -66,7 +66,7 @@
"disallowSpacesInsideParentheses": true,
// 行尾「MUST NOT」使用空格
"disallowTrailingWhitespace": true,
"disallowTrailingWhitespace": false,
// 每行「MUST NOT」超过 120 个字符
"maximumLineLength": 120,
......
......@@ -27,6 +27,9 @@
"KM",
"keymap",
"baidu",
"browser"
"browser",
"FUI",
"fio",
"Promise"
]
}
\ No newline at end of file
# KityMinder 更新日志
## v1.3.0
### 功能更新
1. 全新的 Ribbon 风格 UI 界面
2. 思维导图模板下,智能选择子节点的布局
3. 文本输入支持软回车(`Shift` + `Enter`)换行
4. 打开和保存文件到网盘支持目录选择和创建
5. 增加了逻辑结构图的模板
6. 增加视野导航控件的支持,并且支持 `Ctrl` + `方向键` 来导航视野
7. 分享的文件支持列出以及取消(登陆后)
8. 移动端分享页面的查看
9. 编辑过程支持自动保存(仅限已保存到网盘过的文件)
10. 点击超链接跳转前提示连接地址
11. 直接搜索节点(右上角搜索框或 `Ctrl` + `F`
12. 增加了「紧凑」系列的皮肤
### BUG 修复
1. 修复文字不能删空的 BUG
## v1.2.1
### 体验优化
......@@ -63,6 +85,7 @@
## v1.1.3
### 功能更新
1. 保存时可自定义文件名
2. 添加/删除超链接,导入第三方格式支持超链接
3. 选中节点时,按F2直接进入文字编辑状态
......@@ -73,6 +96,7 @@
## 问题修复
1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题
2. 优化了拖拽节点操作体验
3. 修复回退操作后所选节点未回选问题
......
......@@ -3,12 +3,11 @@
*-----------------------------------------------------*/
'use strict';
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
/*-----------------------------------------------------
* Module Setting
*-----------------------------------------------------*/
module.exports = function (grunt) {
module.exports = function(grunt) {
var banner = '/*!\n' +
' * ====================================================\n' +
......@@ -19,24 +18,41 @@ module.exports = function (grunt) {
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n' +
' * ====================================================\n' +
' */\n\n',
buildPath = 'import.js',
srcPath = 'src/',
distPath = 'dist/';
var getPath = function (readFile) {
var sources = require("fs").readFileSync(readFile);
sources = /paths\s=\s\[([\s\S]*?)\]/ig.exec(sources);
sources = sources[1].replace(/\/\/.*\n/g, '\n').replace(/'|"|\n|\t|\s/g, '');
sources = sources.split(",");
sources.forEach(function (filepath, index) {
sources[index] = srcPath + filepath;
' */\n\n';
var packs = ['index', 'edit', 'share', 'm-share'];
var sources = require('./import.js');
var srcPath = 'src/';
var distPath = 'dist/';
var distPages = ['index', 'edit', 'viewshare', 'm-share'].map(function(name) {
return distPath + name + '.html';
});
return sources;
var concatConfigs = {};
packs.forEach(function(pack) {
concatConfigs[pack] = {
options: {
banner: banner + '(function(window) {\n\n',
footer: '\n\n})(window)',
process: function(src, filepath) {
return ['\n',
'/* ' + filepath + ' */',
src.replace(/^.+$/mg, ' $&'),
'/* ' + filepath + ' end */',
'\n',
].join('\n');
}
},
src: sources.filter(function(source) {
return source.pack == '*' || source.pack.split('|').indexOf(pack) !== -1;
}).map(function(source) {
return source.path;
}),
dest: distPath + 'kityminder.' + pack + '.js'
};
});
// Project configuration.
grunt.initConfig({
......@@ -44,44 +60,45 @@ module.exports = function (grunt) {
// Metadata.
pkg: grunt.file.readJSON('package.json'),
concat: {
js: {
options: {
banner: banner + '(function(kity, window) {\n\n',
footer: '\n\n})(kity, window)',
process: function (src, filepath) {
return src + "\n";
}
},
src: getPath(buildPath),
dest: distPath + 'kityminder.all.js'
}
},
clean: ['dist'],
concat: concatConfigs,
uglify: {
minimize: {
options: {
banner: banner
},
files: (function () {
files: (function() {
var files = {};
files[distPath + 'kityminder.all.min.js'] = distPath + 'kityminder.all.js';
packs.forEach(function(pack) {
files[distPath + 'kityminder.' + pack + '.min.js'] = distPath + 'kityminder.' + pack + '.js';
});
return files;
})()
}
},
copy: {
dir: {
files: [{
src: ['dialogs/**', 'lang/**', 'lib/**', 'social/**', 'themes/**', 'index.html', 'download.php'],
src: [
'ui/theme/**/css/*.css',
'ui/theme/**/css/*.css.map',
'ui/theme/**/images/*',
'lang/**/*',
'static/**/*',
'lib/ZeroClipboard.swf',
'lib/inflate.js',
'index.html',
'edit.html',
'viewshare.html',
'm-share.html',
'download.php'
],
dest: distPath
}]
},
kity: {
expand: true,
cwd: 'kity/dist/',
src: '**',
dest: distPath + 'lib/'
},
km_config: {
expand: true,
src: 'kityminder.config.js',
......@@ -89,79 +106,70 @@ module.exports = function (grunt) {
},
mise: {
files: [{
src: ['LICENSE', 'favicon.ico', 'README.md'],
src: ['LICENSE', 'favicon.ico', 'README.md', 'CHANGELOG.md'],
dest: distPath
}]
}
},
replace: {
online: {
src: distPath + 'index.html',
src: distPages,
overwrite: true,
replacements: [{
from: /kity\/dist\/kity\.js/ig,
to: 'lib/kity.min.js'
}, {
from: /import\.js/,
to: 'kityminder.all.min.js'
from: /import\.js\?pack=([\w-]+)\"/,
to: 'kityminder.$1.min.js"'
}]
},
noCache: {
src: distPath + 'index.html',
src: distPages,
overwrite: true,
replacements: [{
from: /src=\"(.+?)\.js\"/ig,
to: 'src="$1.js?_=' + +new Date() + '"'
to: 'src="$1.js?_=' + (+new Date()) + '"'
}]
}
},
/* Start [Task liverload] ------------------------------------*/
livereload: {
port: 35729 // Default livereload listening port.
watch: {
less: {
files: ['ui/theme/**/*.less'],
tasks: ['less:compile']
}
},
less: {
compile: {
files: {
'ui/theme/default/css/default.all.css': [
'ui/theme/default/css/import.less'
]
},
connect: {
livereload: {
options: {
hostname: '*',
port: 9001,
base: '.',
middleware: function (connect, options, middlewares) {
return [
lrSnippet,
connect.static(options.base.toString()),
connect.directory(options.base.toString())
];
}
sourceMap: true,
sourceMapFilename: 'ui/theme/default/css/default.all.css.map',
sourceMapBasepath: 'ui/theme/default/css/'
// compress: true,
// cleancss: true
}
}
},
regarde: {
js: {
files: 'src/**/*.js',
tasks: ['default', 'livereload']
}
}
/* End [Task liverload] ------------------------------------*/
});
// These plugins provide necessary tasks.
/* [Build plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-text-replace');
/* [liverload plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-regarde');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-livereload');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
// Build task(s).
grunt.registerTask('default', ['concat', 'uglify', 'copy', 'replace']);
grunt.registerTask('live', ['livereload-start', 'connect', 'regarde']);
grunt.registerTask('default', ['clean', 'concat', 'uglify', 'less', 'copy', 'replace']);
grunt.registerTask('dev', ['less', 'watch']);
};
\ No newline at end of file
......@@ -12,43 +12,29 @@ KityMinder 基于 SVG 技术实现,支持绝大多数的主流浏览器,包
1. Chrome
2. Firefox
3. Safari
4. IE9+<sup>*</sup>
*: IE9 不支持部分导出功能。
4. Internet Explorer 10 或以上
## 线上版本
产品地址:[http://naotu.baidu.com](http://naotu.baidu.com)
注意:由于历史原因,有三个发布过的公开地址:
1. [~~http://fex-team.baidu.com/kityminder/dist~~](http://fex-team.baidu.com/kityminder/dist)
2. [~~http://kitygraph.github.io/kityminder/dist~~](http://kitygraph.github.io/kityminder/dist)
3. [http://fex.baidu.com/kityminder/dist](http://fex.baidu.com/kityminder/dist)
第 1 个地址已经失效;
第 2 个地址不再维护更新(原因是我们项目地址迁移到了 fex-team);
第 3 个地址是更新频率最高的地址,新功能可以在这里尝鲜;
[产品地址](http://naotu.baidu.com)已经稳定,请大家放心使用。地址变动频繁带来的不便,请谅解。
## 依赖说明
KityMinder 依赖 Kity 库。刚下载的压缩包或者刚从 github 拉下来的代码会有一个空的 Kity 目录。要运行调试,必须加载 Kity 的依赖
KityMinder 依赖 Kity、FIO、FUI 库。需要二次开发 KityMinder,需要先从 Github 上拉代码下来
1. 如果你下载的是 KityMinder 的压缩包,那么需要手动下载 [Kity](http://fex.baidu.com/kityminder/kity/dist/kity.js) 库到 kity/dist/kity.js
```bash
git clone https://github.com/fex-team/kityminder.git
```
2. 如果你是从 github 上拉源代码下来的,那么可以更新一下子模块:
紧接着,需要初始化并更新子模块:
```bash
cd YOUR_KITYMINDER_PATH
git submodule init
git submodule update
```
## 联系我们
问题和建议反馈:[Github Issues](https://github.com/fex-team/kityminder/issues/new)
邮件组: kity@baidu.com
讨论群: 374918234
QQ 讨论群: 374918234
(function() {
// 用于存储整个快捷菜单的机构信息的字符串
var helpInfo = '';
$.ajax({
type: 'get',
dataType: 'text',
url: 'dialogs/help/operation.txt',
success: function(text) {
createHelpHtml(text);
}
});
function createHelpHtml(text) {
var txt = text;
// 用于存储获取的某一行数据
var line = '';
// 用于临时存储处理一条line字符串之后的结果
var result = '';
// 判断是否为第一个份菜单,用于控制div.shortcuts-table标签前是否添加</div>。
var isFirstTable = true;
// // 判断是否为每份菜单的第一项
// var isFirstTr = true;
// 正则表达式 start
// 1、匹配菜单分类标题
var reg_thead = /^##/g;
// 2、匹配菜单项
var reg_tcell = /\:/g;
// 3、匹配键值
var reg_key = /\`(.+?)\`/g;
// var 4、匹配快捷键组合选择
var reg_opt = /or|\+|,/gi;
// 菜单分类标题1
var temp = '';
var xmlhttp;
var arr, keys, info;
// help-container start
helpInfo += '<div class="help-container' + (kity.Browser.mac ? ' mac' : '') + '">';
// help-header start
helpInfo += '<h2 class="help-header">操作说明</h2>';
// help-header end
// help-article start
helpInfo += '<div class="help-article row">';
// 开始读取operation.txt文件信息
txt.split('\n').forEach(function(line) {
result = '';
// 如果line以##开头,表明是菜单分类标题
if (reg_thead.test(line)) {
// isFirstTr = true;
// 如果不是第一个分类菜单,那么就需要在添加下一个开始标签之前,为上一个菜单添加结束标签
if (!isFirstTable) {
result += '</table>';
}
// 处理第一个分类菜单后,就需要把标示第一个分类菜单的变量改变
else {
isFirstTable = false;
}
temp = line.substring(line.lastIndexOf(' '));
result += '<table class="shortcuts-table "><tr><td></td><td><span class="shortcuts-thead">' + temp + '</span></td>';
} else if (/\S/.test(line)) {
// else if(reg_tcell.test(line)) {
result += '<tr class="shortcuts-tbody"><td class="shortcuts-group"><div class="right">';
arr = line.split(':');
keys = arr[0];
info = arr[1];
keys = keys.toLowerCase().replace(reg_key, '<span class="shortcuts-key label $1">$1</span>');
result += keys;
result += '</div></td><td class="shortcuts-use">' + info + '</td>';
// 加最后一项的结尾标签
result += '</tr>';
}
// 处理完每一行之后,将result添加到helpInfo之后
helpInfo += result;
result = '';
});
// 要在处理完最后一个分类菜单后,为这个菜单添加结束标签
helpInfo += '<table>';
// 读取operation.txt文件信息完毕
helpInfo += '</div>';
// help-article end
helpInfo += '</div>';
// // help-container end
// $("#help").html(helpInfo);
KM.registerWidget('help', {
tpl: helpInfo,
initContent: function(km) {
var lang = km.getLang('dialogs.help'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, lang);
}
this.root().html(html);
},
initEvent: function(km, $w) {
}
});
}
})();
\ No newline at end of file
## 节点操作
`Enter`: 插入兄弟节点
`Tab`: 插入子节点
`Delete`: 删除节点
`Up`, `Down`, `Left`, `Right`: 节点导航
`Alt` + `Up`, `Alt` + `Down`: 向上/向下调整顺序
`/`: 展开/收起节点
`F2`: 编辑节点
`Ctrl` + `A`: 全选节点
`Ctrl` + `C`: 复制节点
`Ctrl` + `X`: 剪切节点
`Ctrl` + `V`: 粘贴节点
`Ctrl` + `B`: 加粗
`Ctrl` + `I`: 斜体
## 视野控制
`Space`: 切换编辑/抓手模式
`滚轮`: 移动视野
`右键拖动`: 拖动视野
`空白处双击`: 居中根节点
`+`, `-`: 放大/缩小视野
## 文件操作
`Ctrl` + `N`: 新建
`Ctrl` + `S`: 保存
`Ctrl` + `Shift` + `S`: 分享
## 后悔药
`Ctrl` + `Z`: 撤销
`Ctrl` + `Y`: 重做
\ No newline at end of file
(function(utils) {
//todo 这里先写死成中文
var content = '<div class="hyperlink-content" style="padding:20px;width:360px;">';
content += '<style>';
content += '.kmui-dialog-<%= container %> input{';
content += 'width: 74%;';
content += 'padding: 6px 12px;';
content += 'font-size: 14px;';
content += 'line-height: 1.42857143;';
content += 'color: #555;';
content += 'background-color: #fff;';
content += 'background-image: none;';
content += 'border: 1px solid #ccc;';
content += 'border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 );'
content += 'box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 ); -webkit-transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += 'transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += '}';
content += '.kmui-dialog-<%= container %> input:focus{';
content += 'border-color: #66afe9;';
content += 'outline: 0;';
content += '-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += 'box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += '}';
content += '.kmui-dialog-<%= container %> button{';
content += 'height:34px;';
content += 'line-height:34px;';
content += 'vertical-align:1px';
content += '}';
content += '</style>';
content += '<input id="hyperlink_href"/>';
content += '<button id="hyperlink_insert">插入</button>';
content += '</div>';
KM.registerWidget('hyperlink', {
tpl: content,
initContent: function(km) {
var lang = km.getLang('dialogs.hyperlink'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, utils.extend({
'container': 'hyperlink'
}, lang));
}
this.root().html(html);
},
initEvent: function(km, $w) {
var $btn = $w.find('#hyperlink_insert');
$btn.attr('disabled', 'disabled');
var $href = $w.find('#hyperlink_href').on('input', function() {
var url = $href.val();
if (!/^https?\:\/\/(\w+\.)+\w+/.test(url)) {
$href.css('color', 'red');
$href.data('error', true);
$btn.attr('disabled', 'disabled');
} else {
$href.css('color', 'black');
$href.data('error', false);
$btn.removeAttr('disabled');
}
});
$btn.on('click', function() {
if ($btn.attr('disabled')) return;
var url = $w.find('#hyperlink_href').val();
km.execCommand('hyperlink', url);
$w.kmui().hide();
});
$w.find('#hyperlink_href').on('keydown', function(e) {
if (e.keyCode === 13) {
$btn.click();
}
});
var url = km.queryCommandValue('hyperlink');
var $input = $w.find('#hyperlink_href');
$input.val(url || 'http://');
setTimeout(function() {
$input.select();
});
},
width: 400
});
})(KM.Utils);
\ No newline at end of file
(function(utils) {
var content = '<div class="image-content" style="padding:20px;width:360px;">';
content += '<style>';
content += '.kmui-dialog-<%= container %> input{';
content += 'width: 74%;';
content += 'padding: 6px 12px;';
content += 'font-size: 14px;';
content += 'line-height: 1.42857143;';
content += 'color: #555;';
content += 'background-color: #fff;';
content += 'background-image: none;';
content += 'border: 1px solid #ccc;';
content += 'border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 );'
content += 'box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 ); -webkit-transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += 'transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += '}';
content += '.kmui-dialog-<%= container %> input:focus{';
content += 'border-color: #66afe9;';
content += 'outline: 0;';
content += '-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += 'box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += '}';
content += '.kmui-dialog-<%= container %> button{';
content += 'height:34px;';
content += 'line-height:34px;';
content += 'vertical-align:1px';
content += '}';
content += '</style>';
content += '<input id="image_href"/>';
content += '<button id="image_insert">插入</button>';
content += '<hr style="height: 0; border: none; border-top: 1px solid #ccc;">';
content += '<img id="image_preview" style="max-width: 360px;"/>';
content += '</div>';
KM.registerWidget('image', {
tpl: content,
initContent: function(km) {
var lang = km.getLang('dialogs.image'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, utils.extend({
'container': 'image'
}, lang));
}
this.root().html(html);
},
initEvent: function(km, $w) {
var $btn = $w.find('#image_insert').attr('disabled', 'disabled');
var $href = $w.find('#image_href').on('input', function() {
var url = $href.val();
if (!/^https?\:\/\/(\w+\.)+\w+/.test(url)) {
$href.css('color', 'red');
$href.data('error', true);
} else {
$href.css('color', 'black');
$href.data('error', false);
}
$w.find('#image_preview').attr('src', $href.val());
});
$w.find('#image_preview').on('load', function() {
$btn.removeAttr('disabled');
}).on('error', function() {
$btn.attr('disabled', 'disabled');
});
$btn.on('click', function() {
if ($btn.attr('disabled')) return;
km.execCommand('image', $href.val());
$w.kmui().hide();
});
$href.on('keydown', function(e) {
if (e.keyCode === 13) {
$btn.click();
}
});
var url = km.queryCommandValue('image');
var $input = $w.find('#image_href');
$input.val(url || 'http://');
if (url) $w.find('#image_preview').attr('src', url);
setTimeout(function() {
$input.select();
});
},
width: 400
});
})(KM.Utils);
\ No newline at end of file
(function (utils) {
KM.registerWidget('markers', {
tpl: "<style>" +
".kmui-dialog-<%= container %> .priority .icon{background:url(dialogs/markers/images/iconpriority.png) 0 0}" +
".kmui-dialog-<%= container %> .progress .icon{background:url(dialogs/markers/images/iconprogress.png) 0 0}" +
".kmui-dialog-<%= container %> .icon.p2{background-position: -20px 0}" +
".kmui-dialog-<%= container %> .icon.p3{background-position: -40px 0}" +
".kmui-dialog-<%= container %> .icon.p4{background-position: -60px 0}" +
".kmui-dialog-<%= container %> .icon.p5{background-position: -80px 0}" +
".kmui-dialog-<%= container %> .icon.p6{background-position: -100px 0}" +
".kmui-dialog-<%= container %> .icon.p7{background-position: -120px 0}" +
".kmui-dialog-<%= container %> .icon.p8{background-position: -140px 0}" +
".kmui-dialog-<%= container %> .icon.p9{background-position: -160px 0}" +
".kmui-dialog-<%= container %> .icon.p0{background-position: -180px 0}" +
".kmui-dialog-<%= container %> ul li{width:40%;display:inline-block}" +
".kmui-dialog-<%= container %> h4{padding:5px 10px; margin:0; background:#eee}" +
"</style>" +
"<h4><%= priority %></h3>" +
"<ul class='icon-list priority'>" +
"<li value='1' type='priority'><span class='icon p1'></span><span><%= priority %>1</span></li>" +
"<li value='2' type='priority'><span class='icon p2'></span><span><%= priority %>2</span></li>" +
"<li value='3' type='priority'><span class='icon p3'></span><span><%= priority %>3</span></li>" +
"<li value='4' type='priority'><span class='icon p4'></span><span><%= priority %>4</span></li>" +
"<li value='5' type='priority'><span class='icon p5'></span><span><%= priority %>5</span></li>" +
"<li value='6' type='priority'><span class='icon p6'></span><span><%= priority %>6</span></li>" +
"<li value='7' type='priority'><span class='icon p7'></span><span><%= priority %>7</span></li>" +
"<li value='8' type='priority'><span class='icon p8'></span><span><%= priority %>8</span></li>" +
"<li value='9' type='priority'><span class='icon p9'></span><span><%= priority %>9</span></li>" +
"<li value='0' type='priority'><span class='icon p0'></span><span><%= none %></span></li>" +
"</ul>" +
"<h4><%= progress.title %></h4>" +
"<ul class='icon-list progress'>" +
"<li value='1' type='progress'><span class='icon p1'></span><span><%= progress.notdone %></span></li>" +
"<li value='2' type='progress'><span class='icon p2'></span><span><%= progress.done1 %></span></li>" +
"<li value='3' type='progress'><span class='icon p3'></span><span><%= progress.done2 %></span></li>" +
"<li value='4' type='progress'><span class='icon p4'></span><span><%= progress.done3 %></span></li>" +
"<li value='5' type='progress'><span class='icon p5'></span><span><%= progress.done4 %></span></li>" +
"<li value='6' type='progress'><span class='icon p6'></span><span><%= progress.done5 %></span></li>" +
"<li value='7' type='progress'><span class='icon p7'></span><span><%= progress.done6 %></span></li>" +
"<li value='8' type='progress'><span class='icon p8'></span><span><%= progress.done7 %></span></li>" +
"<li value='9' type='progress'><span class='icon p9'></span><span><%= progress.done %></span></li>" +
"<li value='0' type='progress'><span class='icon p0'></span><span><%= none %></span></li>" +
"</ul>",
initContent: function (km, $w) {
var lang = km.getLang('dialogs.markers');
if (lang) {
var html = $.parseTmpl(this.tpl, utils.extend({
'container': 'markers'
}, lang));
}
this.root().html(html);
var valPri = km.queryCommandValue("priority") || 0;
var valPro = km.queryCommandValue("progress") || 0;
$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");
},
initEvent: function (km, $w) {
$w.on("click", "li", function () {
var $this = $(this);
$this.siblings().removeClass("active");
var val = $this.val();
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");
});
},
width: 200
})
})(KM.Utils);
\ No newline at end of file
( function () {
//todo 这里先写死成中文
var preferenceContent = '<div class="help-content" style="padding:20px;width:360px;">';
preferenceContent += '<h3>展开属性设置</h3>';
preferenceContent += '<p><label><input type="checkbox" name="expand" />打开时展开全部节点(刷新页面生效)</label></p>';
preferenceContent += '<p><hr/></p>';
preferenceContent += '<p><button id="reset_preference">重置</button></p>';
//preferenceContent += '<p><label><b style="color:red">有些偏好设置会在你下次刷新页面时生效</b></label></p>';
preferenceContent += '</div>';
//todo 偏好设置暂时都在这里处理
//用于在reset所有偏好时,清除这个dialog下的所有偏好
var allPreferences = {};
function checkEverything( km, $w ) {
checkExpand( km, $w )
}
function initEverything( km, $w ) {
initExpand( km, $w )
}
//展开
function initExpand( km, $w ) {
var expand = km.getOptions( 'defaultExpand' );
$w.find( '[name=expand]' )[ 0 ].checked = expand && expand.defaultLayer == 0;
allPreferences[ 'defaultExpand' ] = null;
}
function checkExpand( km, $w ) {
var checked = $w.find( '[name=expand]' )[ 0 ].checked;
if ( checked ) {
km.setPreferences( 'defaultExpand', {
'defaultLayer': 0,
'defaultSubShow': 0
} )
} else {
km.setPreferences( 'defaultExpand' )
}
}
//重置偏好
function resetPreferences( km ) {
km.setPreferences( allPreferences )
}
KM.registerWidget( 'preference', {
tpl: preferenceContent,
initContent: function ( km ) {
var lang = km.getLang( 'dialogs.help' ),
html;
if ( lang ) {
html = $.parseTmpl( this.tpl, lang );
}
this.root().html( html );
},
initEvent: function ( km, $w ) {
//绑定默认值
initEverything( km, $w );
$w.find( '#reset_preference' ).on( 'click', function ( e ) {
resetPreferences( km );
//重置系统默认的偏好设置
initEverything( km, $w )
} );
$w.on( 'click', '.kmui-close', function ( e ) {
checkEverything( km, $w );
km.fire( 'preferencechange' )
} );
},
width: 400
} );
} )();
\ No newline at end of file
(function(utils) {
KM.registerWidget('resource', {
tpl: '<div class="resource-container">' +
'<div class="add-resource">' +
'<input type="text" /><button class="button">添加</button>' +
'<ul class="global-resource"></ul>' +
'</div>' +
'</div>' +
'<div class="no-selected">未选中节点</div>',
initContent: function(km, $w) {
var lang = km.getLang('dialogs.resource'),
html = $.parseTmpl(this.tpl, lang);
this.root().html(html);
},
initEvent: function(km, $w) {
var $container = $w.find('.resource-container');
var $noSelected = $w.find('.no-selected');
var $current = $w.find('.current-resource').hide();
var $addInput = $w.find('.add-resource input');
var $addButton = $w.find('.add-resource button');
var $global = $w.find('.global-resource');
function switchDisplay() {
if (!km.getSelectedNodes().length) {
$container.hide();
$noSelected.show();
} else {
$container.show();
$noSelected.hide();
}
}
function addResource() {
var resource = $addInput.val();
var origin = km.queryCommandValue('resource');
if (resource) {
origin.push(resource);
km.execCommand('resource', origin);
}
$addInput.val(null);
}
$addInput.on('keydown', function(e) {
if (e.keyCode == 13) addResource();
});
$addButton.click(addResource);
switchDisplay();
$global.delegate('input[type=checkbox]', 'change', function() {
km.execCommand('resource', $global.find('input[type=checkbox]:checked').map(function(index, chk) {
return $(chk).data('resource');
}).toArray());
});
km.on('interactchange', function(e) {
var resource = this.queryCommandValue("resource");
var used = this.getUsedResource();
switchDisplay();
$global.empty().append(used.map(function(name) {
var $li = $('<li></li>'),
$label = $('<label></label>').appendTo($li),
$chk = $('<input type="checkbox" />')
.data('resource', name)
.prop('checked', ~resource.indexOf(name))
.appendTo($label);
$label.append(name);
var color = km.getResourceColor(name);
return $li.css({
color: color.dec('l', 60).toString(),
backgroundColor: ~resource.indexOf(name) ? color : color.dec('a', 0.85).toRGBA()
});
}));
}).fire('interactchange');
},
width: 250
});
})(KM.Utils);
\ No newline at end of file
Copyright (c) 2014, FEX, Baidu.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the KityMinder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
Kity Minder
==========
## 简介
KityMinder 是百度 FEX 团队的 f-cube 小组(原 UEditor 小组)的又一力作。作为一款在线的脑图编辑工具,它有着不亚于 native 脑图工具的交互体验。同时,它充分发挥了 Web 云存储的优势,可以直接将编辑中的脑图同步到云端。此外,借由独创的 “云盘分享”功能,用户可以一键将当前编辑的脑图直接生成在线链接共享给其他用户,实现无缝沟通。
![KityMinder](snap.png "KityMinder 界面")
KityMinder 基于 SVG 技术实现,支持绝大多数的主流浏览器,包括:
1. Chrome
2. Firefox
3. Safari
4. IE9+<sup>*</sup>
*: IE9 不支持部分导出功能。
## 线上版本
产品地址:[http://naotu.baidu.com](http://naotu.baidu.com)
注意:由于历史原因,有三个发布过的公开地址:
1. [~~http://fex-team.baidu.com/kityminder/dist~~](http://fex-team.baidu.com/kityminder/dist)
2. [~~http://kitygraph.github.io/kityminder/dist~~](http://kitygraph.github.io/kityminder/dist)
3. [http://fex.baidu.com/kityminder/dist](http://fex.baidu.com/kityminder/dist)
第 1 个地址已经失效;
第 2 个地址不再维护更新(原因是我们项目地址迁移到了 fex-team);
第 3 个地址是更新频率最高的地址,新功能可以在这里尝鲜;
[产品地址](http://naotu.baidu.com)已经稳定,请大家放心使用。地址变动频繁带来的不便,请谅解。
## 依赖说明
KityMinder 依赖 Kity 库。刚下载的压缩包或者刚从 github 拉下来的代码会有一个空的 Kity 目录。要运行调试,必须加载 Kity 的依赖:
1. 如果你下载的是 KityMinder 的压缩包,那么需要手动下载 [Kity](http://fex.baidu.com/kityminder/kity/dist/kity.js) 库到 kity/dist/kity.js
2. 如果你是从 github 上拉源代码下来的,那么可以更新一下子模块:
```bash
cd YOUR_KITYMINDER_PATH
git submodule init
git submodule update
```
## 联系我们
邮件组: kity@baidu.com
讨论群: 374918234
(function() {
// 用于存储整个快捷菜单的机构信息的字符串
var helpInfo = '';
$.ajax({
type: 'get',
dataType: 'text',
url: 'dialogs/help/operation.txt',
success: function(text) {
createHelpHtml(text);
}
});
function createHelpHtml(text) {
var txt = text;
// 用于存储获取的某一行数据
var line = '';
// 用于临时存储处理一条line字符串之后的结果
var result = '';
// 判断是否为第一个份菜单,用于控制div.shortcuts-table标签前是否添加</div>。
var isFirstTable = true;
// // 判断是否为每份菜单的第一项
// var isFirstTr = true;
// 正则表达式 start
// 1、匹配菜单分类标题
var reg_thead = /^##/g;
// 2、匹配菜单项
var reg_tcell = /\:/g;
// 3、匹配键值
var reg_key = /\`(.+?)\`/g;
// var 4、匹配快捷键组合选择
var reg_opt = /or|\+|,/gi;
// 菜单分类标题1
var temp = '';
var xmlhttp;
var arr, keys, info;
// help-container start
helpInfo += '<div class="help-container' + (kity.Browser.mac ? ' mac' : '') + '">';
// help-header start
helpInfo += '<h2 class="help-header">操作说明</h2>';
// help-header end
// help-article start
helpInfo += '<div class="help-article row">';
// 开始读取operation.txt文件信息
txt.split('\n').forEach(function(line) {
result = '';
// 如果line以##开头,表明是菜单分类标题
if (reg_thead.test(line)) {
// isFirstTr = true;
// 如果不是第一个分类菜单,那么就需要在添加下一个开始标签之前,为上一个菜单添加结束标签
if (!isFirstTable) {
result += '</table>';
}
// 处理第一个分类菜单后,就需要把标示第一个分类菜单的变量改变
else {
isFirstTable = false;
}
temp = line.substring(line.lastIndexOf(' '));
result += '<table class="shortcuts-table "><tr><td></td><td><span class="shortcuts-thead">' + temp + '</span></td>';
} else if (/\S/.test(line)) {
// else if(reg_tcell.test(line)) {
result += '<tr class="shortcuts-tbody"><td class="shortcuts-group"><div class="right">';
arr = line.split(':');
keys = arr[0];
info = arr[1];
keys = keys.toLowerCase().replace(reg_key, '<span class="shortcuts-key label $1">$1</span>');
result += keys;
result += '</div></td><td class="shortcuts-use">' + info + '</td>';
// 加最后一项的结尾标签
result += '</tr>';
}
// 处理完每一行之后,将result添加到helpInfo之后
helpInfo += result;
result = '';
});
// 要在处理完最后一个分类菜单后,为这个菜单添加结束标签
helpInfo += '<table>';
// 读取operation.txt文件信息完毕
helpInfo += '</div>';
// help-article end
helpInfo += '</div>';
// // help-container end
// $("#help").html(helpInfo);
KM.registerWidget('help', {
tpl: helpInfo,
initContent: function(km) {
var lang = km.getLang('dialogs.help'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, lang);
}
this.root().html(html);
},
initEvent: function(km, $w) {
}
});
}
})();
\ No newline at end of file
(function(utils) {
//todo 这里先写死成中文
var content = '<div class="hyperlink-content" style="padding:20px;width:360px;">';
content += '<style>';
content += '.kmui-dialog-<%= container %> input{';
content += 'width: 74%;';
content += 'padding: 6px 12px;';
content += 'font-size: 14px;';
content += 'line-height: 1.42857143;';
content += 'color: #555;';
content += 'background-color: #fff;';
content += 'background-image: none;';
content += 'border: 1px solid #ccc;';
content += 'border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 );'
content += 'box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 ); -webkit-transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += 'transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += '}';
content += '.kmui-dialog-<%= container %> input:focus{';
content += 'border-color: #66afe9;';
content += 'outline: 0;';
content += '-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += 'box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += '}';
content += '.kmui-dialog-<%= container %> button{';
content += 'height:34px;';
content += 'line-height:34px;';
content += 'vertical-align:1px';
content += '}';
content += '</style>';
content += '<input id="hyperlink_href"/>';
content += '<button id="hyperlink_insert">插入</button>';
content += '</div>';
KM.registerWidget('hyperlink', {
tpl: content,
initContent: function(km) {
var lang = km.getLang('dialogs.hyperlink'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, utils.extend({
'container': 'hyperlink'
}, lang));
}
this.root().html(html);
},
initEvent: function(km, $w) {
var $btn = $w.find('#hyperlink_insert');
$btn.attr('disabled', 'disabled');
var $href = $w.find('#hyperlink_href').on('input', function() {
var url = $href.val();
if (!/^https?\:\/\/(\w+\.)+\w+/.test(url)) {
$href.css('color', 'red');
$href.data('error', true);
$btn.attr('disabled', 'disabled');
} else {
$href.css('color', 'black');
$href.data('error', false);
$btn.removeAttr('disabled');
}
});
$btn.on('click', function() {
if ($btn.attr('disabled')) return;
var url = $w.find('#hyperlink_href').val();
km.execCommand('hyperlink', url);
$w.kmui().hide();
});
$w.find('#hyperlink_href').on('keydown', function(e) {
if (e.keyCode === 13) {
$btn.click();
}
});
var url = km.queryCommandValue('hyperlink');
var $input = $w.find('#hyperlink_href');
$input.val(url || 'http://');
setTimeout(function() {
$input.select();
});
},
width: 400
});
})(KM.Utils);
\ No newline at end of file
(function(utils) {
var content = '<div class="image-content" style="padding:20px;width:360px;">';
content += '<style>';
content += '.kmui-dialog-<%= container %> input{';
content += 'width: 74%;';
content += 'padding: 6px 12px;';
content += 'font-size: 14px;';
content += 'line-height: 1.42857143;';
content += 'color: #555;';
content += 'background-color: #fff;';
content += 'background-image: none;';
content += 'border: 1px solid #ccc;';
content += 'border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 );'
content += 'box-shadow: inset 0 1px 1px rgba( 0, 0, 0, .075 ); -webkit-transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += 'transition: border-color ease-in-out .15s,';
content += 'box-shadow ease-in-out .15s;';
content += '}';
content += '.kmui-dialog-<%= container %> input:focus{';
content += 'border-color: #66afe9;';
content += 'outline: 0;';
content += '-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += 'box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);';
content += '}';
content += '.kmui-dialog-<%= container %> button{';
content += 'height:34px;';
content += 'line-height:34px;';
content += 'vertical-align:1px';
content += '}';
content += '</style>';
content += '<input id="image_href"/>';
content += '<button id="image_insert">插入</button>';
content += '<hr style="height: 0; border: none; border-top: 1px solid #ccc;">';
content += '<img id="image_preview" style="max-width: 360px;"/>';
content += '</div>';
KM.registerWidget('image', {
tpl: content,
initContent: function(km) {
var lang = km.getLang('dialogs.image'),
html;
if (lang) {
html = $.parseTmpl(this.tpl, utils.extend({
'container': 'image'
}, lang));
}
this.root().html(html);
},
initEvent: function(km, $w) {
var $btn = $w.find('#image_insert').attr('disabled', 'disabled');
var $href = $w.find('#image_href').on('input', function() {
var url = $href.val();
if (!/^https?\:\/\/(\w+\.)+\w+/.test(url)) {
$href.css('color', 'red');
$href.data('error', true);
} else {
$href.css('color', 'black');
$href.data('error', false);
}
$w.find('#image_preview').attr('src', $href.val());
});
$w.find('#image_preview').on('load', function() {
$btn.removeAttr('disabled');
}).on('error', function() {
$btn.attr('disabled', 'disabled');
});
$btn.on('click', function() {
if ($btn.attr('disabled')) return;
km.execCommand('image', $href.val());
$w.kmui().hide();
});
$href.on('keydown', function(e) {
if (e.keyCode === 13) {
$btn.click();
}
});
var url = km.queryCommandValue('image');
var $input = $w.find('#image_href');
$input.val(url || 'http://');
if (url) $w.find('#image_preview').attr('src', url);
setTimeout(function() {
$input.select();
});
},
width: 400
});
})(KM.Utils);
\ No newline at end of file
(function (utils) {
KM.registerWidget('markers', {
tpl: "<style>" +
".kmui-dialog-<%= container %> .priority .icon{background:url(dialogs/markers/images/iconpriority.png) 0 0}" +
".kmui-dialog-<%= container %> .progress .icon{background:url(dialogs/markers/images/iconprogress.png) 0 0}" +
".kmui-dialog-<%= container %> .icon.p2{background-position: -20px 0}" +
".kmui-dialog-<%= container %> .icon.p3{background-position: -40px 0}" +
".kmui-dialog-<%= container %> .icon.p4{background-position: -60px 0}" +
".kmui-dialog-<%= container %> .icon.p5{background-position: -80px 0}" +
".kmui-dialog-<%= container %> .icon.p6{background-position: -100px 0}" +
".kmui-dialog-<%= container %> .icon.p7{background-position: -120px 0}" +
".kmui-dialog-<%= container %> .icon.p8{background-position: -140px 0}" +
".kmui-dialog-<%= container %> .icon.p9{background-position: -160px 0}" +
".kmui-dialog-<%= container %> .icon.p0{background-position: -180px 0}" +
".kmui-dialog-<%= container %> ul li{width:40%;display:inline-block}" +
".kmui-dialog-<%= container %> h4{padding:5px 10px; margin:0; background:#eee}" +
"</style>" +
"<h4><%= priority %></h3>" +
"<ul class='icon-list priority'>" +
"<li value='1' type='priority'><span class='icon p1'></span><span><%= priority %>1</span></li>" +
"<li value='2' type='priority'><span class='icon p2'></span><span><%= priority %>2</span></li>" +
"<li value='3' type='priority'><span class='icon p3'></span><span><%= priority %>3</span></li>" +
"<li value='4' type='priority'><span class='icon p4'></span><span><%= priority %>4</span></li>" +
"<li value='5' type='priority'><span class='icon p5'></span><span><%= priority %>5</span></li>" +
"<li value='6' type='priority'><span class='icon p6'></span><span><%= priority %>6</span></li>" +
"<li value='7' type='priority'><span class='icon p7'></span><span><%= priority %>7</span></li>" +
"<li value='8' type='priority'><span class='icon p8'></span><span><%= priority %>8</span></li>" +
"<li value='9' type='priority'><span class='icon p9'></span><span><%= priority %>9</span></li>" +
"<li value='0' type='priority'><span class='icon p0'></span><span><%= none %></span></li>" +
"</ul>" +
"<h4><%= progress.title %></h4>" +
"<ul class='icon-list progress'>" +
"<li value='1' type='progress'><span class='icon p1'></span><span><%= progress.notdone %></span></li>" +
"<li value='2' type='progress'><span class='icon p2'></span><span><%= progress.done1 %></span></li>" +
"<li value='3' type='progress'><span class='icon p3'></span><span><%= progress.done2 %></span></li>" +
"<li value='4' type='progress'><span class='icon p4'></span><span><%= progress.done3 %></span></li>" +
"<li value='5' type='progress'><span class='icon p5'></span><span><%= progress.done4 %></span></li>" +
"<li value='6' type='progress'><span class='icon p6'></span><span><%= progress.done5 %></span></li>" +
"<li value='7' type='progress'><span class='icon p7'></span><span><%= progress.done6 %></span></li>" +
"<li value='8' type='progress'><span class='icon p8'></span><span><%= progress.done7 %></span></li>" +
"<li value='9' type='progress'><span class='icon p9'></span><span><%= progress.done %></span></li>" +
"<li value='0' type='progress'><span class='icon p0'></span><span><%= none %></span></li>" +
"</ul>",
initContent: function (km, $w) {
var lang = km.getLang('dialogs.markers');
if (lang) {
var html = $.parseTmpl(this.tpl, utils.extend({
'container': 'markers'
}, lang));
}
this.root().html(html);
var valPri = km.queryCommandValue("priority") || 0;
var valPro = km.queryCommandValue("progress") || 0;
$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");
},
initEvent: function (km, $w) {
$w.on("click", "li", function () {
var $this = $(this);
$this.siblings().removeClass("active");
var val = $this.val();
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");
});
},
width: 200
})
})(KM.Utils);
\ No newline at end of file
( function () {
//todo 这里先写死成中文
var preferenceContent = '<div class="help-content" style="padding:20px;width:360px;">';
preferenceContent += '<h3>展开属性设置</h3>';
preferenceContent += '<p><label><input type="checkbox" name="expand" />打开时展开全部节点(刷新页面生效)</label></p>';
preferenceContent += '<p><hr/></p>';
preferenceContent += '<p><button id="reset_preference">重置</button></p>';
//preferenceContent += '<p><label><b style="color:red">有些偏好设置会在你下次刷新页面时生效</b></label></p>';
preferenceContent += '</div>';
//todo 偏好设置暂时都在这里处理
//用于在reset所有偏好时,清除这个dialog下的所有偏好
var allPreferences = {};
function checkEverything( km, $w ) {
checkExpand( km, $w )
}
function initEverything( km, $w ) {
initExpand( km, $w )
}
//展开
function initExpand( km, $w ) {
var expand = km.getOptions( 'defaultExpand' );
$w.find( '[name=expand]' )[ 0 ].checked = expand && expand.defaultLayer == 0;
allPreferences[ 'defaultExpand' ] = null;
}
function checkExpand( km, $w ) {
var checked = $w.find( '[name=expand]' )[ 0 ].checked;
if ( checked ) {
km.setPreferences( 'defaultExpand', {
'defaultLayer': 0,
'defaultSubShow': 0
} )
} else {
km.setPreferences( 'defaultExpand' )
}
}
//重置偏好
function resetPreferences( km ) {
km.setPreferences( allPreferences )
}
KM.registerWidget( 'preference', {
tpl: preferenceContent,
initContent: function ( km ) {
var lang = km.getLang( 'dialogs.help' ),
html;
if ( lang ) {
html = $.parseTmpl( this.tpl, lang );
}
this.root().html( html );
},
initEvent: function ( km, $w ) {
//绑定默认值
initEverything( km, $w );
$w.find( '#reset_preference' ).on( 'click', function ( e ) {
resetPreferences( km );
//重置系统默认的偏好设置
initEverything( km, $w )
} );
$w.on( 'click', '.kmui-close', function ( e ) {
checkEverything( km, $w );
km.fire( 'preferencechange' )
} );
},
width: 400
} );
} )();
\ No newline at end of file
(function(utils) {
KM.registerWidget('resource', {
tpl: '<div class="resource-container">' +
'<div class="add-resource">' +
'<input type="text" /><button class="button">添加</button>' +
'<ul class="global-resource"></ul>' +
'</div>' +
'</div>' +
'<div class="no-selected">未选中节点</div>',
initContent: function(km, $w) {
var lang = km.getLang('dialogs.resource'),
html = $.parseTmpl(this.tpl, lang);
this.root().html(html);
},
initEvent: function(km, $w) {
var $container = $w.find('.resource-container');
var $noSelected = $w.find('.no-selected');
var $current = $w.find('.current-resource').hide();
var $addInput = $w.find('.add-resource input');
var $addButton = $w.find('.add-resource button');
var $global = $w.find('.global-resource');
function switchDisplay() {
if (!km.getSelectedNodes().length) {
$container.hide();
$noSelected.show();
} else {
$container.show();
$noSelected.hide();
}
}
function addResource() {
var resource = $addInput.val();
var origin = km.queryCommandValue('resource');
if (resource) {
origin.push(resource);
km.execCommand('resource', origin);
}
$addInput.val(null);
}
$addInput.on('keydown', function(e) {
if (e.keyCode == 13) addResource();
});
$addButton.click(addResource);
switchDisplay();
$global.delegate('input[type=checkbox]', 'change', function() {
km.execCommand('resource', $global.find('input[type=checkbox]:checked').map(function(index, chk) {
return $(chk).data('resource');
}).toArray());
});
km.on('interactchange', function(e) {
var resource = this.queryCommandValue("resource");
var used = this.getUsedResource();
switchDisplay();
$global.empty().append(used.map(function(name) {
var $li = $('<li></li>'),
$label = $('<label></label>').appendTo($li),
$chk = $('<input type="checkbox" />')
.data('resource', name)
.prop('checked', ~resource.indexOf(name))
.appendTo($label);
$label.append(name);
var color = km.getResourceColor(name);
return $li.css({
color: color.dec('l', 60).toString(),
backgroundColor: ~resource.indexOf(name) ? color : color.dec('a', 0.85).toRGBA()
});
}));
}).fire('interactchange');
},
width: 250
});
})(KM.Utils);
\ No newline at end of file
<?php
/**
* 导出文件代理
*
* @author Jinqn, techird
*/
$type = $_REQUEST['type'];
if (isset($_REQUEST['content'])) {
$content = $_REQUEST['content'];
if ($type == 'base64') {
$content = base64_decode($content);
}
$filename = htmlspecialchars($_REQUEST["filename"]);
if (!$filename) {
$filename = "kikyminder";
}
header("Content-type: application/octet-stream; charset=utf8; name=".urlencode($filename));
header("Accept-Length: ".strlen($content));
header("Content-Length: ".strlen($content));
header("Content-Disposition: attachment; filename=".urlencode($filename));
header('Content-Description: File Transfer');
echo $content;
} else {
echo 'Empty Content!';
}
?>
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
(function() {
function getKMBasePath(docUrl, confUrl) {
return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
}
function getConfigFilePath() {
var configPath = document.getElementsByTagName('script');
return configPath[configPath.length - 1].src;
}
function getBasePath(docUrl, confUrl) {
var basePath = confUrl;
if (/^(\/|\\\\)/.test(confUrl)) {
basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
} else if (!/^[a-z]+:/i.test(confUrl)) {
docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
basePath = docUrl + "" + confUrl;
}
return optimizationPath(basePath);
}
function optimizationPath(path) {
var protocol = /^[a-z]+:\/\//.exec(path)[0],
tmp = null,
res = [];
path = path.replace(protocol, "").split("?")[0].split("#")[0];
path = path.replace(/\\/g, '/').split(/\//);
path[path.length - 1] = "";
while (path.length) {
if ((tmp = path.shift()) === "..") {
res.pop();
} else if (tmp !== ".") {
res.push(tmp);
}
}
return protocol + res.join("/");
}
window.KITYMINDER_CONFIG = {
'KITYMINDER_HOME_URL': getKMBasePath(),
//定义工具栏
toolbars: [
'undo redo | template theme | fontfamily fontsize bold italic forecolor | node hyperlink unhyperlink image removeimage markers resource | collapsenode expandnode | hand zoom-in zoom zoom-out | help'
]
//只读模式,默认是false
//readOnly: true
//设置主题
//,defaultTemplate : 'default' //设置默认的主题
//,defaultTheme : 'fresh-blue' //添加有那些主图
//回退相关选项
//,maxUndoCount:20 //最大可回退的次数,默认20
//语言默认是zh-cn
//,lang:'zh-cn'
//设置km整体的z-index大小
//,zIndex : 1000
//设置初始加载时展开的层数和子节点数目阈值
//默认是全部展开,0表示全部展开
// ,
// defaultExpand: {
// defaultLayer: 2,
// defaultSubShow: 5
// }
//配置放大缩小的比例
//,zoom:[50,80,100,120,150,200]
//
//图片尺寸限制
//,maxImageWidth: 200
//,maxImageHeight: 200
//
};
})();
\ No newline at end of file
KityMinder.LANG['zh-cn'] = {
'template': {
'default': '思维导图',
'structure': '组织结构图',
'filetree': '文件夹'
},
'theme': {
'classic': '脑图经典',
'snow': '温柔冷光',
'fresh-red': '清新红',
'fresh-soil': '泥土黄',
'fresh-green': '文艺绿',
'fresh-blue': '天空蓝',
'fresh-purple': '浪漫紫',
'fresh-pink': '脑残粉'
},
'maintopic': '中心主题',
'topic': '分支主题',
'tooltips': {
'undo': '撤销',
'redo': '重做',
'bold': '加粗',
'italic': '斜体',
'forecolor': '字体颜色',
'fontfamily': '字体',
'fontsize': '字号',
'layoutstyle': '主题',
'node': '节点操作',
'saveto': '另存为',
'hand': '允许拖拽',
'zoom': '放大缩小',
'markers': '标签',
'resource': '资源',
'help': '帮助',
'preference': '偏好设置',
'image': '插入图片',
'hyperlink': '插入链接',
'unhyperlink': '删除链接',
'expandnode': '展开到叶子',
'collapsenode': '收起到一级节点',
'template': '模板',
'theme': '皮肤'
},
'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': {}
},
'node': {
'appendsiblingnode': '插入兄弟节点',
'appendchildnode': '插入子节点',
'removenode': '删除',
'editnode': '编辑'
},
'hyperlink': {
'hyperlink': '链接...',
'unhyperlink': '移除链接'
},
'image': {
'image': '图片...',
'removeimage': '移除图片'
},
'marker': {
'marker': '进度/优先级...'
},
'resource': {
'resource': '资源...'
}
};
\ No newline at end of file
/*!
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
* Copyright (c) 2013 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v1.2.3
*/
!function(){"use strict";var a,b=function(){var a=/\-([a-z])/g,b=function(a,b){return b.toUpperCase()};return function(c){return c.replace(a,b)}}(),c=function(a,c){var d,e,f,g,h,i;if(window.getComputedStyle?d=window.getComputedStyle(a,null).getPropertyValue(c):(e=b(c),d=a.currentStyle?a.currentStyle[e]:a.style[e]),"cursor"===c&&(!d||"auto"===d))for(f=a.tagName.toLowerCase(),g=["a"],h=0,i=g.length;i>h;h++)if(f===g[h])return"pointer";return d},d=function(a){if(p.prototype._singleton){a||(a=window.event);var b;this!==window?b=this:a.target?b=a.target:a.srcElement&&(b=a.srcElement),p.prototype._singleton.setCurrent(b)}},e=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},f=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},g=function(a,b){if(a.addClass)return a.addClass(b),a;if(b&&"string"==typeof b){var c=(b||"").split(/\s+/);if(1===a.nodeType)if(a.className){for(var d=" "+a.className+" ",e=a.className,f=0,g=c.length;g>f;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}else a.className=b}return a},h=function(a,b){if(a.removeClass)return a.removeClass(b),a;if(b&&"string"==typeof b||void 0===b){var c=(b||"").split(/\s+/);if(1===a.nodeType&&a.className)if(b){for(var d=(" "+a.className+" ").replace(/[\n\t]/g," "),e=0,f=c.length;f>e;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},i=function(){var a,b,c,d=1;return"function"==typeof document.body.getBoundingClientRect&&(a=document.body.getBoundingClientRect(),b=a.right-a.left,c=document.body.offsetWidth,d=Math.round(100*(b/c))/100),d},j=function(a){var b={left:0,top:0,width:0,height:0,zIndex:999999999},d=c(a,"z-index");if(d&&"auto"!==d&&(b.zIndex=parseInt(d,10)),a.getBoundingClientRect){var e,f,g,h=a.getBoundingClientRect();"pageXOffset"in window&&"pageYOffset"in window?(e=window.pageXOffset,f=window.pageYOffset):(g=i(),e=Math.round(document.documentElement.scrollLeft/g),f=Math.round(document.documentElement.scrollTop/g));var j=document.documentElement.clientLeft||0,k=document.documentElement.clientTop||0;b.left=h.left+e-j,b.top=h.top+f-k,b.width="width"in h?h.width:h.right-h.left,b.height="height"in h?h.height:h.bottom-h.top}return b},k=function(a,b){var c=!(b&&b.useNoCache===!1);return c?(-1===a.indexOf("?")?"?":"&")+"nocache="+(new Date).getTime():""},l=function(a){var b=[],c=[];return a.trustedOrigins&&("string"==typeof a.trustedOrigins?c.push(a.trustedOrigins):"object"==typeof a.trustedOrigins&&"length"in a.trustedOrigins&&(c=c.concat(a.trustedOrigins))),a.trustedDomains&&("string"==typeof a.trustedDomains?c.push(a.trustedDomains):"object"==typeof a.trustedDomains&&"length"in a.trustedDomains&&(c=c.concat(a.trustedDomains))),c.length&&b.push("trustedOrigins="+encodeURIComponent(c.join(","))),"string"==typeof a.amdModuleId&&a.amdModuleId&&b.push("amdModuleId="+encodeURIComponent(a.amdModuleId)),"string"==typeof a.cjsModuleId&&a.cjsModuleId&&b.push("cjsModuleId="+encodeURIComponent(a.cjsModuleId)),b.join("&")},m=function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;d>c;c++)if(b[c]===a)return c;return-1},n=function(a){if("string"==typeof a)throw new TypeError("ZeroClipboard doesn't accept query strings.");return a.length?a:[a]},o=function(a,b,c,d,e){e?window.setTimeout(function(){a.call(b,c,d)},0):a.call(b,c,d)},p=function(a,b){if(a&&(p.prototype._singleton||this).glue(a),p.prototype._singleton)return p.prototype._singleton;p.prototype._singleton=this,this.options={};for(var c in s)this.options[c]=s[c];for(var d in b)this.options[d]=b[d];this.handlers={},p.detectFlashSupport()&&v()},q=[];p.prototype.setCurrent=function(b){a=b,this.reposition();var d=b.getAttribute("title");d&&this.setTitle(d);var e=this.options.forceHandCursor===!0||"pointer"===c(b,"cursor");return r.call(this,e),this},p.prototype.setText=function(a){return a&&""!==a&&(this.options.text=a,this.ready()&&this.flashBridge.setText(a)),this},p.prototype.setTitle=function(a){return a&&""!==a&&this.htmlBridge.setAttribute("title",a),this},p.prototype.setSize=function(a,b){return this.ready()&&this.flashBridge.setSize(a,b),this},p.prototype.setHandCursor=function(a){return a="boolean"==typeof a?a:!!a,r.call(this,a),this.options.forceHandCursor=a,this};var r=function(a){this.ready()&&this.flashBridge.setHandCursor(a)};p.version="1.2.3";var s={moviePath:"ZeroClipboard.swf",trustedOrigins:null,text:null,hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",allowScriptAccess:"sameDomain",useNoCache:!0,forceHandCursor:!1};p.setDefaults=function(a){for(var b in a)s[b]=a[b]},p.destroy=function(){p.prototype._singleton.unglue(q);var a=p.prototype._singleton.htmlBridge;a.parentNode.removeChild(a),delete p.prototype._singleton},p.detectFlashSupport=function(){var a=!1;if("function"==typeof ActiveXObject)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){}return!a&&navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0),a};var t=null,u=null,v=function(){var a,b,c=p.prototype._singleton,d=document.getElementById("global-zeroclipboard-html-bridge");if(!d){var e={};for(var f in c.options)e[f]=c.options[f];e.amdModuleId=t,e.cjsModuleId=u;var g=l(e),h=' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%"> <param name="movie" value="'+c.options.moviePath+k(c.options.moviePath,c.options)+'"/> <param name="allowScriptAccess" value="'+c.options.allowScriptAccess+'"/> <param name="scale" value="exactfit"/> <param name="loop" value="false"/> <param name="menu" value="false"/> <param name="quality" value="best" /> <param name="bgcolor" value="#ffffff"/> <param name="wmode" value="transparent"/> <param name="flashvars" value="'+g+'"/> <embed src="'+c.options.moviePath+k(c.options.moviePath,c.options)+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="global-zeroclipboard-flash-bridge" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+g+'" scale="exactfit"> </embed> </object>';d=document.createElement("div"),d.id="global-zeroclipboard-html-bridge",d.setAttribute("class","global-zeroclipboard-container"),d.setAttribute("data-clipboard-ready",!1),d.style.position="absolute",d.style.left="-9999px",d.style.top="-9999px",d.style.width="15px",d.style.height="15px",d.style.zIndex="9999",d.innerHTML=h,document.body.appendChild(d)}c.htmlBridge=d,a=document["global-zeroclipboard-flash-bridge"],a&&(b=a.length)&&(a=a[b-1]),c.flashBridge=a||d.children[0].lastElementChild};p.prototype.resetBridge=function(){return this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.removeAttribute("title"),this.htmlBridge.removeAttribute("data-clipboard-text"),h(a,this.options.activeClass),a=null,this.options.text=null,this},p.prototype.ready=function(){var a=this.htmlBridge.getAttribute("data-clipboard-ready");return"true"===a||a===!0},p.prototype.reposition=function(){if(!a)return!1;var b=j(a);return this.htmlBridge.style.top=b.top+"px",this.htmlBridge.style.left=b.left+"px",this.htmlBridge.style.width=b.width+"px",this.htmlBridge.style.height=b.height+"px",this.htmlBridge.style.zIndex=b.zIndex+1,this.setSize(b.width,b.height),this},p.dispatch=function(a,b){p.prototype._singleton.receiveEvent(a,b)},p.prototype.on=function(a,b){for(var c=a.toString().split(/\s/g),d=0;d<c.length;d++)a=c[d].toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=b);return this.handlers.noflash&&!p.detectFlashSupport()&&this.receiveEvent("onNoFlash",null),this},p.prototype.addEventListener=p.prototype.on,p.prototype.off=function(a,b){for(var c=a.toString().split(/\s/g),d=0;d<c.length;d++){a=c[d].toLowerCase().replace(/^on/,"");for(var e in this.handlers)e===a&&this.handlers[e]===b&&delete this.handlers[e]}return this},p.prototype.removeEventListener=p.prototype.off,p.prototype.receiveEvent=function(b,c){b=b.toString().toLowerCase().replace(/^on/,"");var d=a,e=!0;switch(b){case"load":if(c&&parseFloat(c.flashVersion.replace(",",".").replace(/[^0-9\.]/gi,""))<10)return this.receiveEvent("onWrongFlash",{flashVersion:c.flashVersion}),void 0;this.htmlBridge.setAttribute("data-clipboard-ready",!0);break;case"mouseover":g(d,this.options.hoverClass);break;case"mouseout":h(d,this.options.hoverClass),this.resetBridge();break;case"mousedown":g(d,this.options.activeClass);break;case"mouseup":h(d,this.options.activeClass);break;case"datarequested":var f=d.getAttribute("data-clipboard-target"),i=f?document.getElementById(f):null;if(i){var j=i.value||i.textContent||i.innerText;j&&this.setText(j)}else{var k=d.getAttribute("data-clipboard-text");k&&this.setText(k)}e=!1;break;case"complete":this.options.text=null}if(this.handlers[b]){var l=this.handlers[b];"string"==typeof l&&"function"==typeof window[l]&&(l=window[l]),"function"==typeof l&&o(l,d,this,c,e)}},p.prototype.glue=function(a){a=n(a);for(var b=0;b<a.length;b++)-1==m(a[b],q)&&(q.push(a[b]),e(a[b],"mouseover",d));return this},p.prototype.unglue=function(a){a=n(a);for(var b=0;b<a.length;b++){f(a[b],"mouseover",d);var c=m(a[b],q);-1!=c&&q.splice(c,1)}return this},"function"==typeof define&&define.amd?define(["require","exports","module"],function(a,b,c){return t=c&&c.id||null,p}):"object"==typeof module&&module&&"object"==typeof module.exports&&module.exports?(u=module.id||null,module.exports=p):window.ZeroClipboard=p}();
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
### jQuery XML to JSON Plugin v1.3 - 2013-02-18 ###
* http://www.fyneworks.com/ - diego@fyneworks.com
* Licensed under http://en.wikipedia.org/wiki/MIT_License
###
Website: http://www.fyneworks.com/jquery/xml-to-json/
*//*
# INSPIRED BY: http://www.terracoder.com/
AND: http://www.thomasfrank.se/xml_to_json.html
AND: http://www.kawa.net/works/js/xml/objtree-e.html
*//*
This simple script converts XML (document of code) into a JSON object. It is the combination of 2
'xml to json' great parsers (see below) which allows for both 'simple' and 'extended' parsing modes.
*/
// Avoid collisions
;if(window.jQuery) (function($){
// Add function to jQuery namespace
$.extend({
// converts xml documents and xml text to json object
xml2json: function(xml, extended) {
if(!xml) return {}; // quick fail
//### PARSER LIBRARY
// Core function
function parseXML(node, simple){
if(!node) return null;
var txt = '', obj = null, att = null;
var nt = node.nodeType, nn = jsVar(node.localName || node.nodeName);
var nv = node.text || node.nodeValue || '';
/*DBG*/ //if(window.console) console.log(['x2j',nn,nt,nv.length+' bytes']);
if(node.childNodes){
if(node.childNodes.length>0){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'CHILDREN',node.childNodes]);
$.each(node.childNodes, function(n,cn){
var cnt = cn.nodeType, cnn = jsVar(cn.localName || cn.nodeName);
var cnv = cn.text || cn.nodeValue || '';
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>a',cnn,cnt,cnv]);
if(cnt == 8){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>b',cnn,'COMMENT (ignore)']);
return; // ignore comment node
}
else if(cnt == 3 || cnt == 4 || !cnn){
// ignore white-space in between tags
if(cnv.match(/^\s+$/)){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>c',cnn,'WHITE-SPACE (ignore)']);
return;
};
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>d',cnn,'TEXT']);
txt += cnv.replace(/^\s+/,'').replace(/\s+$/,'');
// make sure we ditch trailing spaces from markup
}
else{
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>e',cnn,'OBJECT']);
obj = obj || {};
if(obj[cnn]){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>f',cnn,'ARRAY']);
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
if(!obj[cnn].length) obj[cnn] = myArr(obj[cnn]);
obj[cnn] = myArr(obj[cnn]);
obj[cnn][ obj[cnn].length ] = parseXML(cn, true/* simple */);
obj[cnn].length = obj[cnn].length;
}
else{
/*DBG*/ //if(window.console) console.log(['x2j',nn,'node>g',cnn,'dig deeper...']);
obj[cnn] = parseXML(cn);
};
};
});
};//node.childNodes.length>0
};//node.childNodes
if(node.attributes){
if(node.attributes.length>0){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'ATTRIBUTES',node.attributes])
att = {}; obj = obj || {};
$.each(node.attributes, function(a,at){
var atn = jsVar(at.name), atv = at.value;
att[atn] = atv;
if(obj[atn]){
/*DBG*/ //if(window.console) console.log(['x2j',nn,'attr>',atn,'ARRAY']);
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
//if(!obj[atn].length) obj[atn] = myArr(obj[atn]);//[ obj[ atn ] ];
obj[cnn] = myArr(obj[cnn]);
obj[atn][ obj[atn].length ] = atv;
obj[atn].length = obj[atn].length;
}
else{
/*DBG*/ //if(window.console) console.log(['x2j',nn,'attr>',atn,'TEXT']);
obj[atn] = atv;
};
});
//obj['attributes'] = att;
};//node.attributes.length>0
};//node.attributes
if(obj){
obj = $.extend( (txt!='' ? new String(txt) : {}),/* {text:txt},*/ obj || {}/*, att || {}*/);
//txt = (obj.text) ? (typeof(obj.text)=='object' ? obj.text : [obj.text || '']).concat([txt]) : txt;
txt = (obj.text) ? ([obj.text || '']).concat([txt]) : txt;
if(txt) obj.text = txt;
txt = '';
};
var out = obj || txt;
//console.log([extended, simple, out]);
if(extended){
if(txt) out = {};//new String(out);
txt = out.text || txt || '';
if(txt) out.text = txt;
if(!simple) out = myArr(out);
};
return out;
};// parseXML
// Core Function End
// Utility functions
var jsVar = function(s){ return String(s || '').replace(/-/g,"_"); };
// NEW isNum function: 01/09/2010
// Thanks to Emile Grau, GigaTecnologies S.L., www.gigatransfer.com, www.mygigamail.com
function isNum(s){
// based on utility function isNum from xml2json plugin (http://www.fyneworks.com/ - diego@fyneworks.com)
// few bugs corrected from original function :
// - syntax error : regexp.test(string) instead of string.test(reg)
// - regexp modified to accept comma as decimal mark (latin syntax : 25,24 )
// - regexp modified to reject if no number before decimal mark : ".7" is not accepted
// - string is "trimmed", allowing to accept space at the beginning and end of string
var regexp=/^((-)?([0-9]+)(([\.\,]{0,1})([0-9]+))?$)/
return (typeof s == "number") || regexp.test(String((s && typeof s == "string") ? jQuery.trim(s) : ''));
};
// OLD isNum function: (for reference only)
//var isNum = function(s){ return (typeof s == "number") || String((s && typeof s == "string") ? s : '').test(/^((-)?([0-9]*)((\.{0,1})([0-9]+))?$)/); };
var myArr = function(o){
// http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
//if(!o.length) o = [ o ]; o.length=o.length;
if(!$.isArray(o)) o = [ o ]; o.length=o.length;
// here is where you can attach additional functionality, such as searching and sorting...
return o;
};
// Utility functions End
//### PARSER LIBRARY END
// Convert plain text to xml
if(typeof xml=='string') xml = $.text2xml(xml);
// Quick fail if not xml (or if this is a node)
if(!xml.nodeType) return;
if(xml.nodeType == 3 || xml.nodeType == 4) return xml.nodeValue;
// Find xml root node
var root = (xml.nodeType == 9) ? xml.documentElement : xml;
// Convert xml to json
var out = parseXML(root, true /* simple */);
// Clean-up memory
xml = null; root = null;
// Send output
return out;
},
// Convert text to XML DOM
text2xml: function(str) {
// NOTE: I'd like to use jQuery for this, but jQuery makes all tags uppercase
//return $(xml)[0];
/* prior to jquery 1.9 */
/*
var out;
try{
var xml = ((!$.support.opacity && !$.support.style))?new ActiveXObject("Microsoft.XMLDOM"):new DOMParser();
xml.async = false;
}catch(e){ throw new Error("XML Parser could not be instantiated") };
try{
if((!$.support.opacity && !$.support.style)) out = (xml.loadXML(str))?xml:false;
else out = xml.parseFromString(str, "text/xml");
}catch(e){ throw new Error("Error parsing XML string") };
return out;
*/
/* jquery 1.9+ */
return $.parseXML(str);
}
}); // extend $
})(jQuery);
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(){var a,b,c,d;!function(){var e={},f={};a=function(a,b,c){e[a]={deps:b,callback:c}},d=c=b=function(a){function c(b){if("."!==b.charAt(0))return b;for(var c=b.split("/"),d=a.split("/").slice(0,-1),e=0,f=c.length;f>e;e++){var g=c[e];if(".."===g)d.pop();else{if("."===g)continue;d.push(g)}}return d.join("/")}if(d._eak_seen=e,f[a])return f[a];if(f[a]={},!e[a])throw new Error("Could not find module "+a);for(var g,h=e[a],i=h.deps,j=h.callback,k=[],l=0,m=i.length;m>l;l++)"exports"===i[l]?k.push(g={}):k.push(b(c(i[l])));var n=j.apply(this,k);return f[a]=g||n}}(),a("promise/all",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to all.");return new b(function(b,c){function d(a){return function(b){f(a,b)}}function f(a,c){h[a]=c,0===--i&&b(h)}var g,h=[],i=a.length;0===i&&b([]);for(var j=0;j<a.length;j++)g=a[j],g&&e(g.then)?g.then(d(j),c):f(j,g)})}var d=a.isArray,e=a.isFunction;b.all=c}),a("promise/asap",["exports"],function(a){"use strict";function b(){return function(){process.nextTick(e)}}function c(){var a=0,b=new i(e),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function d(){return function(){j.setTimeout(e,1)}}function e(){for(var a=0;a<k.length;a++){var b=k[a],c=b[0],d=b[1];c(d)}k=[]}function f(a,b){var c=k.push([a,b]);1===c&&g()}var g,h="undefined"!=typeof window?window:{},i=h.MutationObserver||h.WebKitMutationObserver,j="undefined"!=typeof global?global:this,k=[];g="undefined"!=typeof process&&"[object process]"==={}.toString.call(process)?b():i?c():d(),a.asap=f}),a("promise/cast",["exports"],function(a){"use strict";function b(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=this;return new b(function(b){b(a)})}a.cast=b}),a("promise/config",["exports"],function(a){"use strict";function b(a,b){return 2!==arguments.length?c[a]:(c[a]=b,void 0)}var c={instrument:!1};a.config=c,a.configure=b}),a("promise/polyfill",["./promise","./utils","exports"],function(a,b,c){"use strict";function d(){var a="Promise"in window&&"cast"in window.Promise&&"resolve"in window.Promise&&"reject"in window.Promise&&"all"in window.Promise&&"race"in window.Promise&&function(){var a;return new window.Promise(function(b){a=b}),f(a)}();a||(window.Promise=e)}var e=a.Promise,f=b.isFunction;c.polyfill=d}),a("promise/promise",["./config","./utils","./cast","./all","./race","./resolve","./reject","./asap","exports"],function(a,b,c,d,e,f,g,h,i){"use strict";function j(a){if(!w(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof j))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],k(a,this)}function k(a,b){function c(a){p(b,a)}function d(a){r(b,a)}try{a(c,d)}catch(e){d(e)}}function l(a,b,c,d){var e,f,g,h,i=w(c);if(i)try{e=c(d),g=!0}catch(j){h=!0,f=j}else e=d,g=!0;o(b,e)||(i&&g?p(b,e):h?r(b,f):a===F?p(b,e):a===G&&r(b,e))}function m(a,b,c,d){var e=a._subscribers,f=e.length;e[f]=b,e[f+F]=c,e[f+G]=d}function n(a,b){for(var c,d,e=a._subscribers,f=a._detail,g=0;g<e.length;g+=3)c=e[g],d=e[g+b],l(b,c,d,f);a._subscribers=null}function o(a,b){var c,d=null;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(v(b)&&(d=b.then,w(d)))return d.call(b,function(d){return c?!0:(c=!0,b!==d?p(a,d):q(a,d),void 0)},function(b){return c?!0:(c=!0,r(a,b),void 0)}),!0}catch(e){return c?!0:(r(a,e),!0)}return!1}function p(a,b){a===b?q(a,b):o(a,b)||q(a,b)}function q(a,b){a._state===D&&(a._state=E,a._detail=b,u.async(s,a))}function r(a,b){a._state===D&&(a._state=E,a._detail=b,u.async(t,a))}function s(a){n(a,a._state=F)}function t(a){n(a,a._state=G)}var u=a.config,v=(a.configure,b.objectOrFunction),w=b.isFunction,x=(b.now,c.cast),y=d.all,z=e.race,A=f.resolve,B=g.reject,C=h.asap;u.async=C;var D=void 0,E=0,F=1,G=2;j.prototype={constructor:j,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(a,b){var c=this,d=new this.constructor(function(){});if(this._state){var e=arguments;u.async(function(){l(c._state,d,e[c._state-1],c._detail)})}else m(this,d,a,b);return d},"catch":function(a){return this.then(null,a)}},j.all=y,j.cast=x,j.race=z,j.resolve=A,j.reject=B,i.Promise=j}),a("promise/race",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to race.");return new b(function(b,c){for(var d,e=0;e<a.length;e++)d=a[e],d&&"function"==typeof d.then?d.then(b,c):b(d)})}var d=a.isArray;b.race=c}),a("promise/reject",["exports"],function(a){"use strict";function b(a){var b=this;return new b(function(b,c){c(a)})}a.reject=b}),a("promise/resolve",["exports"],function(a){"use strict";function b(a){var b=this;return new b(function(b){b(a)})}a.resolve=b}),a("promise/utils",["exports"],function(a){"use strict";function b(a){return c(a)||"object"==typeof a&&null!==a}function c(a){return"function"==typeof a}function d(a){return"[object Array]"===Object.prototype.toString.call(a)}var e=Date.now||function(){return(new Date).getTime()};a.objectOrFunction=b,a.isFunction=c,a.isArray=d,a.now=e}),b("promise/polyfill").polyfill()}();
\ No newline at end of file
This diff is collapsed.
function DraftManager( minder ) {
var current = null,
localStorage = window.localStorage,
drafts,
MAX_SIZE = 15;
init();
function init() {
drafts = localStorage.getItem( 'drafts' );
drafts = drafts ? JSON.parse( drafts ) : [];
}
function store() {
localStorage.setItem( 'drafts', JSON.stringify( drafts.slice( 0, MAX_SIZE ) ) );
}
function create( path ) {
current = {
path: path || 'local/' + ( +new Date() )
};
drafts.unshift( current );
save();
}
function open( index ) {
current = drafts[ index ];
if ( !current ) return false;
// bring it first
drafts.splice( index, 1 );
drafts.unshift( current );
store();
return current;
}
function load() {
if ( current ) {
minder.importData( current.data, 'json' );
}
return current;
}
function getCurrent() {
return current;
}
function openByPath( path ) {
for ( var i = 0; i < drafts.length; i++ ) {
if ( drafts[ i ].path == path ) return open( i );
}
return false;
}
function save( path ) {
if ( !current ) {
create();
} else {
current.path = path || current.path;
current.name = minder.getMinderTitle();
var data = minder.exportData( 'json' );
current.sync = current.sync && (data == current.data);
current.data = data;
current.update = new Date();
store();
}
return current;
}
function sync() {
current.sync = true;
store();
}
function list() {
return drafts.slice( 0, 15 );
}
function remove( remove_index ) {
drafts.splice( remove_index, 1 );
store();
}
function clear() {
drafts.splice( 1 );
store();
}
return {
open: open,
openByPath: openByPath,
load: load,
save: save,
create: create,
list: list,
remove: remove,
clear: clear,
getCurrent: getCurrent,
sync: sync
};
}
\ No newline at end of file
.niceblue{color:#fff;background:-moz-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0, #0099f2), color-stop(0, #4096ee), color-stop(100%, #0076dd));background:-webkit-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-o-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-ms-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:linear-gradient(to bottom, #0099f2 0, #4096ee 0, #0076dd 100%);}
.dropdown{padding-right:28px;position:relative}.dropdown:after{content:' ';display:block;position:absolute;right:10px;top:12px;width:0;height:0;border:solid;border-width:4px 5px;border-color:#333 transparent transparent transparent}
.dropdown:active:after,.dropdown.active:after{border-color:#fff transparent transparent transparent}
button{font-family:Arial,"Heiti SC","Microsoft Yahei";outline:none;display:inline-block;vertical-align:middle;padding:0 15px;height:30px;font-size:13px;line-height:30px;text-align:center;color:#000;text-decoration:none;border:none;margin-left:5px;background:none;color:#fff;background:-moz-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0, #0099f2), color-stop(0, #4096ee), color-stop(100%, #0076dd));background:-webkit-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-o-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-ms-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:linear-gradient(to bottom, #0099f2 0, #4096ee 0, #0076dd 100%);}button:hover,button.hover{background:#009fff}
button:active,button.active{background:#007fcc;box-shadow:inset 0 2px 3px rgba(0,0,0,0.2)}
button[disabled]{cursor:default;background:#ccc}
.draft-menu.kmui-dropdown-menu{margin-top:24px;margin-left:1px}.draft-menu.kmui-dropdown-menu span.update-time{float:right;color:#ccc;margin-left:40px;padding-right:16px}
.draft-menu.kmui-dropdown-menu li.draft-item a{position:relative}.draft-menu.kmui-dropdown-menu li.draft-item a:before{content:' ';display:block;width:24px;height:24px;background:url(../themes/default/images/draft.png) no-repeat 0 -24px;position:absolute;left:4px;top:2px}
.draft-menu.kmui-dropdown-menu li.draft-item:hover a:before{background-position:0 -48px}
.draft-menu.kmui-dropdown-menu li.draft-item{position:relative}.draft-menu.kmui-dropdown-menu li.draft-item:hover a.delete{display:block}
.draft-menu.kmui-dropdown-menu li.draft-item a.delete{display:none;cursor:pointer;position:absolute;width:20px;height:20px;right:4px;top:4px;padding:0;background:url(../themes/default/images/close-button.png) no-repeat 0 0}.draft-menu.kmui-dropdown-menu li.draft-item a.delete:before{display:none}
.draft-menu.kmui-dropdown-menu li.draft-item a.delete:hover{background-position:0 -20px}
.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked{overflow:hidden;opacity:1;color:#ccc}.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked .kmui-combobox-icon{float:left;margin:5px 0;width:28px;background-position:center 0;opacity:.3}
.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked .kmui-combobox-item-label{display:block;margin-left:28px}
.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked:hover{color:#ccc}.draft-menu.kmui-dropdown-menu.kmui-combobox-menu .kmui-combobox-checked:hover .kmui-combobox-icon{background-position:center 0}
.file-menu.kmui-dropdown-menu{margin-top:24px;margin-left:1px;box-shadow:0 1px 5px rgba(0,0,0,0.3)}.file-menu.kmui-dropdown-menu #save-button,.file-menu.kmui-dropdown-menu #manage-file-button{display:none}
.file-menu.kmui-dropdown-menu.logined #save-button,.file-menu.kmui-dropdown-menu.logined #manage-file-button{display:block}
.file-menu.kmui-dropdown-menu.logined #net-hint-buttom{display:none}
.user-menu.kmui-dropdown-menu{margin-top:24px;margin-left:-25px;min-width:130px;box-shadow:0 1px 5px rgba(0,0,0,0.3)}.user-menu.kmui-dropdown-menu li a{padding-left:40px}
#share-dialog{position:absolute;padding:20px;left:50%;top:40%;margin-left:-175px;margin-top:-100px;background:#fff;width:350px;box-shadow:1px 2px 16px rgba(0,0,0,0.5);display:none}#share-dialog h3{margin:0;font-size:16px;color:#666}
#share-dialog input{width:255px;height:22px;line-height:22px;padding:4px 4px 0;border:1px solid #999;vertical-align:middle;margin-right:3px;background:#eee}#share-dialog input:focus{border:1px solid #99f;outline:none}
#share-dialog p,#share-dialog #share-platform{margin:20px 0 30px}
#share-dialog #copy-share-url{display:inline-block;margin:0;width:75px;height:28px;line-height:28px;vertical-align:middle;color:#fff;background:-moz-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0, #0099f2), color-stop(0, #4096ee), color-stop(100%, #0076dd));background:-webkit-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-o-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:-ms-linear-gradient(top, #0099f2 0, #4096ee 0, #0076dd 100%);background:linear-gradient(to bottom, #0099f2 0, #4096ee 0, #0076dd 100%);}#share-dialog #copy-share-url:hover,#share-dialog #copy-share-url.hover{background:#009fff}
#share-dialog #copy-share-url:active,#share-dialog #copy-share-url.active{background:#007fcc;box-shadow:inset 0 2px 3px rgba(0,0,0,0.2)}
#share-dialog #share-platform{margin-bottom:0}
{"version":3,"file":"social.css","sources":["social.less"],"names":[],"mappings":"AAAA;EACI,YAAA;EACA,YAAY,+DAAZ;;EACA,YAAY,gDAAgD,yBAAwB,yBAAwB,0BAA5G;;EACA,YAAY,kEAAZ;;EACA,YAAY,6DAAZ;;EACA,YAAY,8DAAZ;;EACA,YAAY,gEAAZ;;;AAGJ;EACI,mBAAA;EACA,kBAAA;;AACA,SAAC;EACG,SAAS,GAAT;EACA,cAAA;EACA,kBAAA;EACA,WAAA;EACA,SAAA;EACA,QAAA;EACA,SAAA;EACA,aAAA;EACA,qBAAA;EACA,sDAAA;;AAGA,SADH,OACI;AAAD,SADO,OACN;EACG,sDAAA;;AAKZ;EACI,oBAAoB,YAAY,iBAAhC;EACA,aAAA;EACA,qBAAA;EACA,sBAAA;EACA,eAAA;EACA,YAAA;EACA,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,WAAA;EACA,qBAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;EA7CA,YAAA;EACA,YAAY,+DAAZ;;EACA,YAAY,gDAAgD,yBAAwB,yBAAwB,0BAA5G;;EACA,YAAY,kEAAZ;;EACA,YAAY,6DAAZ;;EACA,YAAY,8DAAZ;;EACA,YAAY,gEAAZ;;;AA2CA,MAAC;AAAQ,MAAC;EACN,mBAAA;;AAGJ,MAAC;AAAS,MAAC;EACP,mBAAA;EACA,8CAAA;;AAGJ,MAAC;EACG,eAAA;EACA,gBAAA;;AAIR,WAAW;EACP,gBAAA;EACA,gBAAA;;AAFJ,WAAW,mBAGP,KAAI;EACA,YAAA;EACA,WAAA;EACA,iBAAA;EACA,mBAAA;;AAPR,WAAW,mBASP,GAAE,WAAY;EACV,kBAAA;;AACA,WAXG,mBASP,GAAE,WAAY,EAET;EACG,SAAS,GAAT;EACA,cAAA;EACA,WAAA;EACA,YAAA;EACA,qEAAA;EACA,kBAAA;EACA,SAAA;EACA,QAAA;;AAnBZ,WAAW,mBAsBP,GAAE,WAAW,MAAO,EAAC;EACjB,4BAAA;;AAvBR,WAAW,mBAyBP,GAAE;EACE,kBAAA;;AACA,WA3BG,mBAyBP,GAAE,WAEG,MAAO,EAAC;EACL,cAAA;;AA5BZ,WAAW,mBAyBP,GAAE,WAKE,EAAC;EACG,aAAA;EACA,eAAA;EACA,kBAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,QAAA;EACA,UAAA;EACA,wEAAA;;AACA,WAxCD,mBAyBP,GAAE,WAKE,EAAC,OAUI;EACG,aAAA;;AAEJ,WA3CD,mBAyBP,GAAE,WAKE,EAAC,OAaI;EACG,4BAAA;;AAIZ,WAhDO,mBAgDN,mBAAoB;EACjB,gBAAA;EACA,UAAA;EACA,WAAA;;AAHJ,WAhDO,mBAgDN,mBAAoB,uBAIjB;EACI,WAAA;EACA,aAAA;EACA,WAAA;EACA,6BAAA;EACA,WAAA;;AATR,WAhDO,mBAgDN,mBAAoB,uBAWjB;EACI,cAAA;EACA,iBAAA;;AAEJ,WA/DG,mBAgDN,mBAAoB,uBAehB;EACG,WAAA;;AADJ,WA/DG,mBAgDN,mBAAoB,uBAehB,MAEG;EACI,6BAAA;;AAMhB,UAAU;EACN,gBAAA;EACA,gBAAA;EACA,0CAAA;;AAHJ,UAAU,mBAKN;AALJ,UAAU,mBAKQ;EACV,aAAA;;AAGJ,UATM,mBASL,QACG;AADJ,UATM,mBASL,QACiB;EACV,cAAA;;AAFR,UATM,mBASL,QAIG;EACI,aAAA;;AAIZ,UAAU;EACN,gBAAA;EACA,kBAAA;EACA,gBAAA;EACA,0CAAA;;AAJJ,UAAU,mBAMN,GAAG;EACC,kBAAA;;AAIR;EACI,kBAAA;EACA,aAAA;EACA,SAAA;EACA,QAAA;EACA,mBAAA;EACA,kBAAA;EACA,iBAAA;EACA,YAAA;EACA,2CAAA;EACA,aAAA;;AAVJ,aAYI;EACI,SAAA;EACA,eAAA;EACA,WAAA;;AAfR,aAkBI;EACI,YAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;EACA,sBAAA;EACA,sBAAA;EACA,iBAAA;EACA,gBAAA;;AACA,aATJ,MASK;EACG,sBAAA;EACA,aAAA;;AA7BZ,aAiCI;AAjCJ,aAiCO;EACC,mBAAA;;AAlCR,aAqCI;EACI,qBAAA;EACA,SAAA;EACA,WAAA;EACA,YAAA;EACA,iBAAA;EACA,sBAAA;EAhNJ,YAAA;EACA,YAAY,+DAAZ;;EACA,YAAY,gDAAgD,yBAAwB,yBAAwB,0BAA5G;;EACA,YAAY,kEAAZ;;EACA,YAAY,6DAAZ;;EACA,YAAY,8DAAZ;;EACA,YAAY,gEAAZ;;;AAgNI,aAZJ,gBAYK;AAAQ,aAZb,gBAYc;EACN,mBAAA;;AAGJ,aAhBJ,gBAgBK;AAAS,aAhBd,gBAgBe;EACP,mBAAA;EACA,8CAAA;;AAvDZ,aA4DI;EACI,gBAAA"}
\ No newline at end of file
This diff is collapsed.
.niceblue {
color: white;
background: -moz-linear-gradient(top, #0099f2 0%, #4096ee 0%, #0076dd 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#0099f2), color-stop(0%,#4096ee), color-stop(100%,#0076dd)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* IE10+ */
background: linear-gradient(to bottom, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* W3C */
}
.dropdown {
padding-right: 28px;
position: relative;
&:after {
content: ' ';
display: block;
position: absolute;
right: 10px;
top: 12px;
width: 0;
height: 0;
border: solid;
border-width: 4px 5px;
border-color: #333 transparent transparent transparent;
}
&:active, &.active {
&:after {
border-color: #fff transparent transparent transparent;
}
}
}
button {
font-family: Arial, "Heiti SC", "Microsoft Yahei";
outline: none;
display: inline-block;
vertical-align: middle;
padding: 0 15px;
height: 30px;
font-size: 13px;
line-height: 30px;
text-align: center;
color: #000;
text-decoration: none;
border: none;
margin-left: 5px;
background: none;
.niceblue;
&:hover, &.hover {
background: #009fff;
}
&:active, &.active {
background: darken(#009fff, 10%);
box-shadow: inset 0 2px 3px rgba(0,0,0, .2);
}
&[disabled] {
cursor: default;
background: #ccc;
}
}
.draft-menu.kmui-dropdown-menu {
margin-top: 24px;
margin-left: 1px;
span.update-time {
float: right;
color: #CCC;
margin-left: 40px;
padding-right: 16px;
}
li.draft-item a {
position: relative;
&:before {
content: ' ';
display: block;
width: 24px;
height: 24px;
background: url(../themes/default/images/draft.png) no-repeat 0 -24px;
position: absolute;
left: 4px;
top: 2px;
}
}
li.draft-item:hover a:before {
background-position: 0 -48px;
}
li.draft-item {
position: relative;
&:hover a.delete{
display: block;
}
a.delete {
display: none;
cursor: pointer;
position: absolute;
width: 20px;
height: 20px;
right: 4px;
top: 4px;
padding: 0;
background: url(../themes/default/images/close-button.png) no-repeat 0 0;
&:before {
display: none;
}
&:hover {
background-position: 0 -20px;
}
}
}
&.kmui-combobox-menu .kmui-combobox-checked {
overflow: hidden;
opacity: 1;
color: #CCC;
.kmui-combobox-icon {
float: left;
margin: 5px 0;
width: 28px;
background-position: center 0;
opacity: .3;
}
.kmui-combobox-item-label {
display: block;
margin-left: 28px;
}
&:hover {
color: #CCC;
.kmui-combobox-icon {
background-position: center 0;
}
}
}
}
.file-menu.kmui-dropdown-menu {
margin-top: 24px;
margin-left: 1px;
box-shadow: 0px 1px 5px rgba(0,0,0, .3);
#save-button, #manage-file-button {
display: none;
}
&.logined {
#save-button, #manage-file-button{
display: block;
}
#net-hint-buttom {
display: none;
}
}
}
.user-menu.kmui-dropdown-menu {
margin-top: 24px;
margin-left: -25px;
min-width: 130px;
box-shadow: 0px 1px 5px rgba(0,0,0, .3);
li a {
padding-left: 40px;
}
}
#share-dialog {
position: absolute;
padding: 20px;
left: 50%;
top: 40%;
margin-left: -175px;
margin-top: -100px;
background: white;
width: 350px;
box-shadow: 1px 2px 16px rgba(0, 0, 0, .5);
display: none;
h3 {
margin: 0;
font-size: 16px;
color: #666;
}
input {
width: 255px;
height: 22px;
line-height: 22px;
padding: 4px 4px 0;
border: 1px solid #999;
vertical-align: middle;
margin-right: 3px;
background: #EEE;
&:focus {
border: 1px solid #99f;
outline: none;
}
}
p, #share-platform {
margin: 20px 0 30px;
}
#copy-share-url {
display: inline-block;
margin: 0;
width: 75px;
height: 28px;
line-height: 28px;
vertical-align: middle;
color: white;
.niceblue;
&:hover, &.hover {
background: #009fff;
}
&:active, &.active {
background: darken(#009fff, 10%);
box-shadow: inset 0 2px 3px rgba(0,0,0, .2);
}
}
#share-platform {
margin-bottom: 0;
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@import "kityminder.css";
@import "button.css";
@import "buttonicon.css";
@import "splitbutton.css";
@import "combobox.css";
@import "comboboxmenu.css";
@import "dialog.css";
@import "dialogsize.css";
@import "popup.css";
@import "tab.css";
@import "tooltip.css";
@import "colorpicker.css";
@import "separator.css";
@import "markers.css";
@import "help.css";
@import "dropmenu.css";
@import "resource.dialog.css"
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
.kmui-dialog-resource{width:300px}.kmui-dialog-resource .add-resource{padding:10px}.kmui-dialog-resource .add-resource input[type=text]{width:142px}
.kmui-dialog-resource .add-resource button{margin-right:0}
.kmui-dialog-resource .add-resource .global-resource{list-style:none;margin:0;padding:5px 0 0}.kmui-dialog-resource .add-resource .global-resource li{margin:0 10px 5px 0;display:inline-block;border-radius:5px}.kmui-dialog-resource .add-resource .global-resource li label{padding:4px 8px 4px 6px;display:block}
.kmui-dialog-resource .no-selected{padding:10px}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Subproject commit fec9187f532aea5284d1fac25767dcca9ad43ce4
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
No preview for this file type
This diff is collapsed.
Subproject commit 43cc299309c7ec3a1c0c91cb890ba9b0907a1053
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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