Commit d87b85c6 authored by techird's avatar techird

merge fui changes

parents 1e0a7717 54be9b09
[submodule "kity"] [submodule "lib/kity"]
path = kity path = lib/kity
url = https://github.com/fex-team/kity.git 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 @@ ...@@ -66,7 +66,7 @@
"disallowSpacesInsideParentheses": true, "disallowSpacesInsideParentheses": true,
// 行尾「MUST NOT」使用空格 // 行尾「MUST NOT」使用空格
"disallowTrailingWhitespace": true, "disallowTrailingWhitespace": false,
// 每行「MUST NOT」超过 120 个字符 // 每行「MUST NOT」超过 120 个字符
"maximumLineLength": 120, "maximumLineLength": 120,
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
"KM", "KM",
"keymap", "keymap",
"baidu", "baidu",
"browser" "browser",
"FUI",
"fio",
"Promise"
] ]
} }
\ No newline at end of file
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
*-----------------------------------------------------*/ *-----------------------------------------------------*/
'use strict'; 'use strict';
var path = require('path'); var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
/*----------------------------------------------------- /*-----------------------------------------------------
* Module Setting * Module Setting
*-----------------------------------------------------*/ *-----------------------------------------------------*/
module.exports = function (grunt) { module.exports = function(grunt) {
var banner = '/*!\n' + var banner = '/*!\n' +
' * ====================================================\n' + ' * ====================================================\n' +
...@@ -19,24 +18,11 @@ module.exports = function (grunt) { ...@@ -19,24 +18,11 @@ module.exports = function (grunt) {
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n' + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n' +
' * ====================================================\n' + ' * ====================================================\n' +
' */\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;
});
return sources; var sources = require('./import.js');
var srcPath = 'src/',
}; distPath = 'dist/';
// Project configuration. // Project configuration.
grunt.initConfig({ grunt.initConfig({
...@@ -47,41 +33,48 @@ module.exports = function (grunt) { ...@@ -47,41 +33,48 @@ module.exports = function (grunt) {
concat: { concat: {
js: { js: {
options: { options: {
banner: banner + '(function(kity, window) {\n\n', banner: banner + '(function(window) {\n\n',
footer: '\n\n})(kity, window)', footer: '\n\n})(window)',
process: function (src, filepath) { process: function(src, filepath) {
return src + "\n"; return ['\n',
'/* ' + filepath + ' */',
src.replace(/^.+$/mg, ' $&'),
'/* ' + filepath + ' end */',
'\n',
].join('\n');
} }
}, },
src: getPath(buildPath), src: sources,
dest: distPath + 'kityminder.all.js' dest: distPath + 'kityminder.all.js'
} }
}, },
uglify: { uglify: {
minimize: { minimize: {
options: { options: {
banner: banner banner: banner
}, },
files: (function () { files: (function() {
var files = {}; var files = {};
files[distPath + 'kityminder.all.min.js'] = distPath + 'kityminder.all.js'; files[distPath + 'kityminder.all.min.js'] = distPath + 'kityminder.all.js';
return files; return files;
})() })()
} }
}, },
copy: { copy: {
dir: { dir: {
files: [{ files: [{
src: ['dialogs/**', 'lang/**', 'lib/**', 'social/**', 'themes/**', 'index.html', 'download.php'], src: [
'ui/theme/**/css/*.css',
'ui/theme/**/images/*',
'lang/**/*',
'index.html',
'download.php'
],
dest: distPath dest: distPath
}] }]
}, },
kity: {
expand: true,
cwd: 'kity/dist/',
src: '**',
dest: distPath + 'lib/'
},
km_config: { km_config: {
expand: true, expand: true,
src: 'kityminder.config.js', src: 'kityminder.config.js',
...@@ -89,19 +82,17 @@ module.exports = function (grunt) { ...@@ -89,19 +82,17 @@ module.exports = function (grunt) {
}, },
mise: { mise: {
files: [{ files: [{
src: ['LICENSE', 'favicon.ico', 'README.md'], src: ['LICENSE', 'favicon.ico', 'README.md', 'CHANGELOG.md'],
dest: distPath dest: distPath
}] }]
} }
}, },
replace: { replace: {
online: { online: {
src: distPath + 'index.html', src: distPath + 'index.html',
overwrite: true, overwrite: true,
replacements: [{ replacements: [{
from: /kity\/dist\/kity\.js/ig,
to: 'lib/kity.min.js'
}, {
from: /import\.js/, from: /import\.js/,
to: 'kityminder.all.min.js' to: 'kityminder.all.min.js'
}] }]
...@@ -112,38 +103,34 @@ module.exports = function (grunt) { ...@@ -112,38 +103,34 @@ module.exports = function (grunt) {
overwrite: true, overwrite: true,
replacements: [{ replacements: [{
from: /src=\"(.+?)\.js\"/ig, from: /src=\"(.+?)\.js\"/ig,
to: 'src="$1.js?_=' + +new Date() + '"' to: 'src="$1.js?_=' + (+new Date()) + '"'
}] }]
} }
}, },
/* Start [Task liverload] ------------------------------------*/ watch: {
livereload: { less: {
port: 35729 // Default livereload listening port. files: ['ui/theme/**/*.less'],
tasks: ['less:compile']
}
}, },
connect: {
livereload: { less: {
compile: {
files: {
'ui/theme/default/css/default.all.css': [
'ui/theme/default/css/import.less'
]
},
options: { options: {
hostname: '*', sourceMap: true,
port: 9001, sourceMapFilename: 'ui/theme/default/css/default.all.css.map',
base: '.', sourceMapBasepath: 'ui/theme/default/css/'
middleware: function (connect, options, middlewares) { // compress: true,
return [ // cleancss: true
lrSnippet,
connect.static(options.base.toString()),
connect.directory(options.base.toString())
];
}
} }
} }
}, },
regarde: {
js: {
files: 'src/**/*.js',
tasks: ['default', 'livereload']
}
}
/* End [Task liverload] ------------------------------------*/
}); });
...@@ -153,15 +140,11 @@ module.exports = function (grunt) { ...@@ -153,15 +140,11 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-text-replace'); grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-less');
/* [liverload plugin & task ] ------------------------------------*/
grunt.loadNpmTasks('grunt-regarde');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-livereload');
// Build task(s). // Build task(s).
grunt.registerTask('default', ['concat', 'uglify', 'copy', 'replace']); grunt.registerTask('default', ['concat', 'uglify', 'less', 'copy', 'replace']);
grunt.registerTask('live', ['livereload-start', 'connect', 'regarde']); grunt.registerTask('dev', ['less', 'watch']);
}; };
\ No newline at end of file
(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
# KityMinder 更新日志
## v1.2.1
### 体验优化
1. 较大提升了文件载入和操作的性能
2. 拖动时不显示子节点和连接线
3. 文字输入细节体验优化
4. 历史回退使用动画回退
5. 美化帮助窗口的样式
### BUG 修复
1. 修复 F2 不能编辑的 BUG
2. 修复按 Shift + Tab 页面溢出的 BUG
## v1.2.0
### 新功能
1. 允许节点自由拖动
2. 允许节点排序(包括拖动以及快捷键 Alt + Up 和 Alt + Down)
3. 节点上插入在线图片(暂不支持本地图片)
4. 节点上添加资源标签(分配负责人)
5. 支持节点复制粘贴
6. 支持换肤,添加了 “文艺清新” 系列的几个皮肤
### 体验优化
1. 界面重新设计,更加美观
2. 布局性能有较大的提高
3. 调整了文字输入的交互
4. 添加了布局时的动画效果
5. 扩大了超链接的点击范围
6. 优先级增加至 9 个,进度增加至 9 个
7. 支持ipad编辑
### BUG 修复
1. 修复 XSS 攻击问题(超链接和图片)
2. 修复导入损坏文件报错的问题
3. 修复新版 Chrome 下载扩展名错误问题
4. 修复 SVG 和 PNG 在缩放之后导出不全的问题
5. 修复缩放后选区闪烁的问题
6. 修复分享内容无法更新的问题 说明:需要再次点击分享创建更新链接
## v1.1.3.2
### Hot Fix
1. 修复新版 Chrome 浏览器无法导出正确文件格式的问题([#77](https://github.com/fex-team/kityminder/issues/77)
## v1.1.3.1
### Hot Fix
1. 修复某些输入法下输入英文的问题
2. 添加网盘操作(加载列表、保存文件等)失败后重试的机制
## v1.1.3
### 功能更新
1. 保存时可自定义文件名
2. 添加/删除超链接,导入第三方格式支持超链接
3. 选中节点时,按F2直接进入文字编辑状态
4. "展开全部节点""收起全部节点"功能
5. 当前选中的高亮的节点可直接进行文字编辑
6. 右键选中节点,显示编辑节点的菜单
7. 可指定放大缩小的百分比
## 问题修复
1. 修复当滚动鼠标滚轮时,光标不跟着移动的问题
2. 优化了拖拽节点操作体验
3. 修复回退操作后所选节点未回选问题
4. 修复回退操作后展开收起的节点没有记录问题
5. 优化了输入文字时的卡顿效果
6. 优化了当输入中文时,中文显示位置与光标距离过远的问题
7. html标签转码问题
8. 修复撤销按钮点击后,重做按钮还是不可点问题
## v1.1.2
### 功能更新
1. **支持本地格式文件导入**
* 支持文件拖拽和网盘文件导入
* 格式支持 xmind/freemind/mindmanager,其他格式暂不支持
2. 新增节点移动到视野中
3. 当前文件名加到 Title 中
4. 分享链接直接到粘贴板(针对已经支持的浏览器)
5. 分享到社交网络
6. 用户登出功能
7. 添加只读模式,配置项 readOnly,添加动态调用接口setEnabled,setDisabled
8. 优化当下拉菜单不可执行时,下拉菜单按钮会自动变灰
9. 添加了新的logo图标
### 问题修复
1. 导出 png 和 svg 图片时,文本中如果包含 `&nbsp;` 字符会报错的问题
2. 删除中心节点导致页面卡住
3. 文件在IE下无法导出(.txt,.svg,.km)
4. 拖入文件导入之后,草稿箱和社会化文件名不同步
5. 仅有根节点时,将其删除,再添加节点报错
6. 本地部署,127.0.0.1退出后不能登录
7. 去掉了“导出”菜单上的打勾
8. 修复了firefox下光标定位到文字最后空格,光标不跟着移动问题
9. 修复在页面失去焦点时光标不消失
10. 优化了光标定位和闪烁时常
## v1.1.1
### 功能更新
1. 添加文件操作快捷键支持:
* 新建脑图(`Ctrl` + `N`
* 保存脑图到云端(`Ctrl` + `S`
* 分享脑图(`Ctrl` + `Shift` + `S`
2. 草稿功能升级为草稿箱
3. 添加了帮助菜单
### 问题修复
1. 修复切换文件时,回复历史没有清空的问题
2. 修复在添加 markers 时,会出现 js 报错的问题
3. 仅有根节点,将其删除,再添加节点报错
## v1.1.0
### 功能更新
1. 添加了剪贴板操作的支持
2. 添加了本地自动保存草稿的功能
3. 优化了文字选中效果
4. 改进了文字输入体验
### 功能调整
1. 视野定位功能抽取为 camera 命令,并且创建新文件和打开文件会把视野定位到根节点
### 问题修复
1. 修正了 bottom 主题的位置问题
2. 修正了子节点全部删除后展开/收缩标志依然存在画布上的问题
3. 修复了 bottom 主题的键盘导航出错的问题
4. 滚轮缩放的问题
## v1.0.1
### 问题修复
1. 修复 png 导出问题。
## v1.0.0
首个版本发布,包括基本的编辑功能。
(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
...@@ -7,29 +7,14 @@ ...@@ -7,29 +7,14 @@
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。"> <meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<script src="lib/jquery-2.1.0.min.js?_=1406196567611" charset="utf-8"></script> <title>百度脑图 - 便捷的思维导图工具</title>
<script src="lib/ZeroClipboard.min.js?_=1406196567611" charset="utf-8"></script>
<script type="text/javascript"> <script src="kityminder.all.min.js?_=1409280817067" charset="utf-8"></script>
ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } ); <script src="kityminder.config.js?_=1409280817067" charset="utf-8"></script>
</script> <script src="lang/zh-cn/zh-cn.js?_=1409280817067" charset="utf-8"></script>
<script src="lib/kity.min.js?_=1406196567611" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1406196567611" charset="utf-8"></script>
<script src="kityminder.config.js?_=1406196567611" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1406196567611" charset="utf-8"></script>
<script src="lib/zip.js?_=1406196567611" charset="utf-8"></script> <link href="ui/theme/default/css/default.all.css" type="text/css" rel="stylesheet" />
<script>
zip.inflateJSPath = 'lib/inflate.js';
</script>
<script src="lib/jquery.xml2json.js?_=1406196567611" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1406196567611" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1406196567611" charset="utf-8"></script>
<script src="social/social.js?_=1406196567611" charset="utf-8"></script>
<link href="social/social.css" rel="stylesheet">
<link href="themes/default/css/import.css" type="text/css" rel="stylesheet" />
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"> <link href="favicon.ico" type="image/x-icon" rel="shortcut icon">
<link href="favicon.ico" type="image/x-icon" rel="apple-touch-icon-precomposed"> <link href="favicon.ico" type="image/x-icon" rel="apple-touch-icon-precomposed">
</head> </head>
...@@ -38,7 +23,9 @@ ...@@ -38,7 +23,9 @@
<div id="content-wrapper"> <div id="content-wrapper">
<div id="panel"></div> <div id="panel"></div>
<div id="kityminder" onselectstart="return false"></div> <div id="kityminder" onselectstart="return false">
</div>
<div id="share-dialog"> <div id="share-dialog">
<h3>URL分享:</h3> <h3>URL分享:</h3>
...@@ -87,7 +74,7 @@ ...@@ -87,7 +74,7 @@
Powered by f-cube, Powered by f-cube,
<a href="http://fex.baidu.com" <a href="http://fex.baidu.com"
target="_blank" target="_blank"
tabindex="-1">FEX tabindex="-1">FEX
</a> | </a> |
<a href="https://github.com/fex-team/kityminder.git" <a href="https://github.com/fex-team/kityminder.git"
target="_blank" target="_blank"
...@@ -107,36 +94,46 @@ ...@@ -107,36 +94,46 @@
<!--脑图启动代码--> <!--脑图启动代码-->
<script> <script>
// create km instance
km = KM.getKityMinder('kityminder');
// New Version Notify /* global km:true, ZeroClipboard:true, zip:true */
$(function() { /* jshint browser:true */
var lastVersion = localStorage.lastKMVersion; $(function() {
$('#km-version').text( 'v' + KM.version ); /* 依赖库初始化 */
ZeroClipboard.setDefaults({ moviePath: 'lib/ZeroClipboard.swf' });
zip.inflateJSPath = 'lib/inflate.js';
});
if (lastVersion != KM.version) { // create km instance
$( '#km-version' ).addClass( 'new-version' ); km = KM.getMinder('kityminder', window.KITYMINDER_CONFIG);
localStorage.lastKMVersion = KM.version;
}
});
km.on('unziperror', function(ev) { // init ui for instance
alert('文件解析错误,文件可能已损坏!'); km.initUI();
});
km.on('parseerror', function(ev) { // New Version Notify
alert('文件解析错误,文件可能已损坏!'); $(function() {
});
km.on('unknownprotocal', function(ev) { var lastVersion = localStorage.lastKMVersion;
alert('不支持的文件格式!'); $('#km-version').text( 'v' + KM.version );
});
document.body.ontouchmove = function(e) { if (lastVersion != KM.version) {
//e.preventDefault(); $( '#km-version' ).addClass( 'new-version' );
localStorage.lastKMVersion = KM.version;
} }
});
km.on('unziperror', function(ev) {
window.alert('文件解析错误,文件可能已损坏!');
});
km.on('parseerror', function(ev) {
window.alert('文件解析错误,文件可能已损坏!');
});
km.on('unknownprotocal', function(ev) {
window.alert('不支持的文件格式!');
});
</script> </script>
<!--社会分享代码--> <!--社会分享代码-->
......
This diff is collapsed.
This diff is collapsed.
(function() { (function() {
function getKMBasePath(docUrl, confUrl) { window.KITYMINDER_CONFIG = {
// 定义
return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath()); //modules: [],
}
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("/"); // 只读模式,默认是false
readOnly: false,
} // 默认主题
window.KITYMINDER_CONFIG = { defaultTemplate: 'default',
'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',
//,defaultTheme : 'fresh-blue' //添加有那些主图
//回退相关选项 // 最大可回退的次数,默认 20
//,maxUndoCount:20 //最大可回退的次数,默认20 maxUndoCount: 20,
//语言默认是zh-cn // 语言,默认是 'zh-cn'
//,lang:'zh-cn' lang: 'zh-cn',
// 配置放大缩小的比例
zoom: [50, 80, 100, 120, 150, 200],
//设置km整体的z-index大小 // 图片尺寸限制
//,zIndex : 1000 maxImageWidth: 200,
//设置初始加载时展开的层数和子节点数目阈值 maxImageHeight: 200
//默认是全部展开,0表示全部展开
// ,
// defaultExpand: {
// defaultLayer: 2,
// defaultSubShow: 5
// }
//配置放大缩小的比例
//,zoom:[50,80,100,120,150,200]
//
//图片尺寸限制
//,maxImageWidth: 200
//,maxImageHeight: 200
//
}; };
})(); })();
\ No newline at end of file
...@@ -16,9 +16,95 @@ KityMinder.LANG['zh-cn'] = { ...@@ -16,9 +16,95 @@ KityMinder.LANG['zh-cn'] = {
}, },
'maintopic': '中心主题', 'maintopic': '中心主题',
'topic': '分支主题', 'topic': '分支主题',
'tooltips': { 'panels': {
'history': '历史',
'template': '模板',
'theme': '皮肤',
'layout': '布局',
'style': '样式',
'font': '字体',
'color': '颜色',
'background': '背景',
'insert': '插入',
'arrange': '调整',
'nodeop': '当前',
'priority': '优先级',
'progress': '进度',
'resource': '资源',
'attachment': '附件'
},
'ui': {
'back': '返回',
'undo': '撤销', 'undo': '撤销',
'redo': '重做', 'redo': '重做',
'tabs': {
'idea': '思路',
'appearence': '展现',
'view': '视图'
},
'menu': {
'level1': {
'new': '新建',
'open': '打开',
'save': '保存',
'share': '分享',
'help': '帮助',
'setting': '设置'
},
'new': {
'header': '新建脑图'
},
'open': {
'header': '打开',
'recent': '最近使用',
'netdisk': '百度云盘',
'local': '本地文件',
'draft': '草稿箱'
},
'save': {
'header': '保存到',
'netdisk': '百度网盘',
'download': '导出到本地'
},
'share': {
'header': '分享我的脑图'
}
},
'mydocument': '我的文档',
'emptydir': '目录为空!',
'pickfile': '选择文件...',
'acceptfile': '支持的格式:{0}',
'dropfile': '或将文件拖至此处',
'unsupportedfile': '不支持的文件格式',
'untitleddoc': '未命名文档',
'errorloading': '加载失败:{0}',
'unknownreason': '可能是外星人篡改了代码...',
'overrideconfirm': '{0} 已存在,确认覆盖吗?',
'checklogin': '检查登录状态中...',
'loggingin': '正在登录...',
'recent': '最近打开',
'clearrecent': '清空',
'clearrecentconfirm': '确认清空最近文档列表?',
'cleardraft': '清空',
'cleardraftconfirm': '确认清空草稿箱?',
'login': '登录',
'logout': '注销',
'switchuser': '切换账户',
'userinfo': '个人信息',
'gotonetdisk': '我的网盘',
'requirelogin': '请 <a class="login-button">登录</a> 后使用',
'saveas': '保存为',
'filename': '文件名',
'fileformat': '保存格式',
'save': '保存',
'mkdir': '新建目录',
'newdir': '未命名目录',
'bold': '加粗', 'bold': '加粗',
'italic': '斜体', 'italic': '斜体',
'forecolor': '字体颜色', 'forecolor': '字体颜色',
...@@ -33,13 +119,44 @@ KityMinder.LANG['zh-cn'] = { ...@@ -33,13 +119,44 @@ KityMinder.LANG['zh-cn'] = {
'resource': '资源', 'resource': '资源',
'help': '帮助', 'help': '帮助',
'preference': '偏好设置', 'preference': '偏好设置',
'image': '插入图片',
'hyperlink': '插入链接',
'unhyperlink': '删除链接',
'expandnode': '展开到叶子', 'expandnode': '展开到叶子',
'collapsenode': '收起到一级节点', 'collapsenode': '收起到一级节点',
'template': '模板', 'template': '模板',
'theme': '皮肤' 'theme': '皮肤',
'clearstyle': '清除样式',
'copystyle': '复制样式',
'pastestyle': '粘贴样式',
'appendsiblingnode': '下一主题',
'appendchildnode': '儿子主题',
'arrangeup': '前调',
'arrangedown': '后调',
'editnode': '编辑',
'removenode': '移除',
'priority': '优先级',
'progress': {
'p1': '未开始',
'p2': '完成 1/8',
'p3': '完成 1/4',
'p4': '完成 3/8',
'p5': '完成一半',
'p6': '完成 5/8',
'p7': '完成 3/4',
'p8': '完成 7/8',
'p9': '已完成',
'p0': '清除进度'
},
'link': '链接',
'image': '图片',
'removelink': '移除已有连接',
'removeimage': '移除已有图片',
'resetlayout': '整理布局',
'justnow': '刚刚',
'minutesago': '{0} 分钟前',
'hoursago': '{0} 小时前',
'yesterday': '昨天',
'daysago': '{0} 天前',
'longago': '很久之前'
}, },
'popupcolor': { 'popupcolor': {
'clearColor': '清空颜色', 'clearColor': '清空颜色',
...@@ -76,12 +193,6 @@ KityMinder.LANG['zh-cn'] = { ...@@ -76,12 +193,6 @@ KityMinder.LANG['zh-cn'] = {
'image': {}, 'image': {},
'resource': {} 'resource': {}
}, },
'node': {
'appendsiblingnode': '插入兄弟节点',
'appendchildnode': '插入子节点',
'removenode': '删除',
'editnode': '编辑'
},
'hyperlink': { 'hyperlink': {
'hyperlink': '链接...', 'hyperlink': '链接...',
'unhyperlink': '移除链接' 'unhyperlink': '移除链接'
...@@ -96,5 +207,4 @@ KityMinder.LANG['zh-cn'] = { ...@@ -96,5 +207,4 @@ KityMinder.LANG['zh-cn'] = {
'resource': { 'resource': {
'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.
This diff is collapsed.
/*普通按钮*/
.kmui-btn-toolbar .kmui-btn{
position: relative;
display: inline-block;
vertical-align: middle;
*display: inline;
*zoom:1;
width:auto;
margin: 0 1px;
padding:1px;
border:none;
background: none;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon{
width: 20px;
height: 20px;
margin: 0;
padding:0;
background-repeat: no-repeat;
background-image: url(../images/icons.png);
background-image: url(../images/icons.gif) \9;
}
/*状态反射*/
.kmui-btn-toolbar .kmui-btn.kmui-hover,
.kmui-btn-toolbar .kmui-btn.kmui-active{
background-color: #d5e1f2;
border: 1px solid #a3bde3;
padding: 0;
_z-index: 1;
}
.kmui-btn-toolbar .kmui-btn.kmui-disabled{
opacity: 0.3;
filter: alpha(opacity = 30);
}
\ No newline at end of file
.kmui-btn-toolbar .kmui-btn .kmui-icon-undo {
background-position: -160px 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-redo {
background-position: -100px 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-bold{
background-position: 0 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-italic {
background-position: -60px 0;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-font, .kmui-btn-toolbar .kmui-btn .kmui-icon-forecolor {
background-position: -720px 1px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-image {
background: url(../images/picture_add.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-removeimage {
background: url(../images/picture_delete.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-hand {
background: url(../images/hand.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-markers {
background: url(../images/flag.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-clock {
background: url(../images/clock.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-zoom-in {
background: url(../images/zoom_in.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-zoom-out {
background: url(../images/zoom_out.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-help {
background: url(../images/help.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-preference {
background: url(../images/setting.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-expandnode {
background: url(../images/expand.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-collapsenode {
background: url(../images/contract.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-hyperlink {
background: url(../images/link.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-unhyperlink {
background: url(../images/unlink.png) no-repeat 2px 2px;
}
.kmui-btn-toolbar .kmui-btn .kmui-icon-resource {
background: url(../images/resource.png) no-repeat 2px 2px;
}
\ 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.
@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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File moved
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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