Commit 306194c6 authored by techird's avatar techird

dist

parent 16427141
......@@ -5,7 +5,7 @@ Kity Minder
KityMinder 是百度 FEX 团队的 f-cube 小组(原 UEditor 小组)的又一力作。作为一款在线的脑图编辑工具,它有着不亚于 native 脑图工具的交互体验。同时,它充分发挥了 Web 云存储的优势,可以直接将编辑中的脑图同步到云端。此外,借由独创的 “云盘分享”功能,用户可以一键将当前编辑的脑图直接生成在线链接共享给其他用户,实现无缝沟通。
![KityMinder](summary.jpg "KityMinder 界面")
![KityMinder](snap.png "KityMinder 界面")
KityMinder 基于 SVG 技术实现,支持绝大多数的主流浏览器,包括:
......
......@@ -21,10 +21,10 @@ if (isset($_REQUEST['content'])) {
$filename = "kikyminder";
}
header("Content-type: application/octet-stream; charset=utf-8; name=".$filename);
header("Content-type: application/octet-stream; charset=utf8; name=".urlencode($filename));
header("Accept-Length: ".strlen($content));
header("Content-Length: ".strlen($content));
header("Content-Disposition: attachment; filename=".$filename);
header("Content-Disposition: attachment; filename=".urlencode($filename));
header('Content-Description: File Transfer');
echo $content;
......
......@@ -2,30 +2,31 @@
<html>
<head>
<meta charset="utf-8">
<meta name="title" content="百度脑图">
<meta name="keyword" content="图,kity,svg,minder,百度,fex,前端,在线">
<meta name="title" content="百度脑图(KityMinder)">
<meta name="keyword" content="kityminder,脑图,思维导图,kity,svg,minder,百度,fex,前端,在线">
<meta name="description" content="百度脑图,便捷的脑图编辑工具。让您在线上直接创建、保存并分享你的思路。">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<script src="lib/jquery-2.1.0.min.js?_=1404368767190" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1404368767190" charset="utf-8"></script>
<script src="lib/jquery-2.1.0.min.js?_=1404819457295" charset="utf-8"></script>
<script src="lib/ZeroClipboard.min.js?_=1404819457295" charset="utf-8"></script>
<script type="text/javascript">
ZeroClipboard.setDefaults( { moviePath: 'lib/ZeroClipboard.swf' } );
</script>
<script src="lib/kity.min.js?_=1404368767190" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1404368767190" charset="utf-8"></script>
<script src="kityminder.config.js?_=1404368767190" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1404368767190" charset="utf-8"></script>
<script src="lib/kity.min.js?_=1404819457295" charset="utf-8"></script>
<script src="kityminder.all.min.js?_=1404819457295" charset="utf-8"></script>
<script src="kityminder.config.js?_=1404819457295" charset="utf-8"></script>
<script src="lang/zh-cn/zh-cn.js?_=1404819457295" charset="utf-8"></script>
<script src="lib/zip.js?_=1404368767190" charset="utf-8"></script>
<script src="lib/zip.js?_=1404819457295" charset="utf-8"></script>
<script>
zip.inflateJSPath = 'lib/inflate.js';
</script>
<script src="lib/jquery.xml2json.js?_=1404368767190" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1404368767190" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1404368767190" charset="utf-8"></script>
<script src="social/social.js?_=1404368767190" charset="utf-8"></script>
<script src="lib/jquery.xml2json.js?_=1404819457295" charset="utf-8"></script>
<script src="lib/baidu-frontia-js-full-1.0.0.js?_=1404819457295" charset="utf-8"></script>
<script src="social/draftmanager.js?_=1404819457295" charset="utf-8"></script>
<script src="social/social.js?_=1404819457295" charset="utf-8"></script>
<link href="social/social.css" rel="stylesheet">
<link href="themes/default/css/import.css" type="text/css" rel="stylesheet" />
......@@ -34,11 +35,12 @@
</head>
<body>
<div id="content-wrapper">
<div id="panel"></div>
<div id="kityminder" onselectstart="return false"></div>
<div id="share-dialog" >
<div id="share-dialog">
<h3>URL分享:</h3>
<p>
<input id="share-url" type="url" value="http://naotu.baidu.com/?shareId=kcev3dd" />
......@@ -94,6 +96,7 @@
target="_blank">Contact Us
</a>
</div>
</div>
</body>
<!--脑图启动代码-->
......@@ -114,16 +117,20 @@
});
km.on('unziperror', function(ev) {
alert('unziperror');
alert('文件解析错误,文件可能已损坏!');
});
km.on('parseerror', function(ev) {
alert('parseerror');
alert('文件解析错误,文件可能已损坏!');
});
km.on('unknownprotocal', function(ev) {
alert('unknownprotocal');
alert('不支持的文件格式!');
});
document.body.ontouchmove = function(e) {
//e.preventDefault();
}
</script>
<!--社会分享代码-->
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -28,16 +28,15 @@ KityMinder.LANG['zh-cn'] = {
'saveto': '另存为',
'hand': '允许拖拽',
'zoom': '放大缩小',
'markers': '添加标签',
'resource': '分配资源',
'switchlayout': '切换主题',
'markers': '标签',
'resource': '资源',
'help': '帮助',
'preference': '偏好设置',
'image': '插入图片',
'hyperlink': '插入链接',
'unhyperlink': '删除链接',
'expandnode': '展开节点',
'collapsenode': '收起节点',
'expandnode': '展开到叶子',
'collapsenode': '收起到一级节点',
'template': '模板',
'theme': '皮肤'
},
......@@ -58,14 +57,14 @@ KityMinder.LANG['zh-cn'] = {
'none': '无',
'progress': {
'title': '进度',
'notdone': "未完成",
'done1': '完成1/8',
'done2': '完成1/4',
'done3': '完成3/8',
'done4': '完成1/2',
'done5': '完成5/8',
'done6': '完成3/4',
'done7': '完成7/8',
'notdone': '未完成',
'done1': '完成 1/8',
'done2': '完成 1/4',
'done3': '完成 3/8',
'done4': '完成 1/2',
'done5': '完成 5/8',
'done6': '完成 3/4',
'done7': '完成 7/8',
'done': '已完成'
}
},
......@@ -77,28 +76,24 @@ KityMinder.LANG['zh-cn'] = {
'resource': {}
},
'node': {
'appendsiblingnode': '插入同级节点',
'appendsiblingnode': '插入兄弟节点',
'appendchildnode': '插入子节点',
'removenode': '删除节点',
'editnode': '编辑节点'
},
'layout': {
'default': '左右展开',
'bottom': '向下展开'
'removenode': '删除',
'editnode': '编辑'
},
'hyperlink': {
'hyperlink': '插入超链接',
'unhyperlink': '取消超链接'
'hyperlink': '链接...',
'unhyperlink': '移除链接'
},
'image': {
'image': '插入图片',
'removeimage': '除图片'
'image': '图片...',
'removeimage': '除图片'
},
'marker': {
'marker': '进度/优先级'
'marker': '进度/优先级...'
},
'resource': {
'resource': '分配资源'
'resource': '资源...'
}
};
\ No newline at end of file
/*!
* ====================================================
* kity - v2.0.0 - 2014-07-01
* kity - v2.0.0 - 2014-07-08
* https://github.com/fex-team/kity
* GitHub: https://github.com/fex-team/kity.git
* Copyright (c) 2014 Baidu FEX; Licensed BSD
......@@ -2984,7 +2984,7 @@ define("graphic/geometry", [ "core/utils", "graphic/point", "core/class", "graph
* 转换后的 PathSegment,每一段都是 'C'
*/
g.pathToCurve = cacher(function(path) {
var i, command, param;
var i, j, command, param;
var initPoint, currentPoint, endPoint, shouldClose, lastControlPoint, aussumedControlPoint;
var controlPoint1, controlPoint2;
var res = [];
......@@ -3054,12 +3054,21 @@ define("graphic/geometry", [ "core/utils", "graphic/point", "core/class", "graph
case "A":
param = a2c.apply(null, currentPoint.concat(param));
controlPoint1 = param.slice(0, 2);
controlPoint2 = param.slice(2, 4);
j = 0;
while (j in param) {
controlPoint1 = param.slice(j, j + 2);
controlPoint2 = param.slice(j + 2, j + 4);
endPoint = param.slice(j + 4, j + 6);
// 写入当前一段曲线
res.push([ "C" ].concat(controlPoint1).concat(controlPoint2).concat(endPoint));
j += 6;
}
break;
}
// 写入当前一段曲线
res.push([ "C" ].concat(controlPoint1).concat(controlPoint2).concat(endPoint));
if (command != "A") {
// 写入当前一段曲线
res.push([ "C" ].concat(controlPoint1).concat(controlPoint2).concat(endPoint));
}
// 为下次循环准备当前位置
currentPoint = endPoint;
// 二次贝塞尔曲线自己已经记录了上个控制点的位置,其它的记录控制点 2 的位置
......@@ -5931,6 +5940,7 @@ define("graphic/textcontent", [ "graphic/shape", "graphic/svg", "core/utils", "g
// call shape constructor
this.callBase(nodeType);
this.shapeNode = this.shapeNode || this.node;
this.shapeNode.setAttribute("text-rendering", "geometricPrecision");
},
clearContent: function() {
while (this.shapeNode.firstChild) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
.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;/* font-size: 12px; */padding:0 15px;height:30px;font-size: 12px;line-height:30px;text-align:center;color:#000;text-decoration:none;border:none;margin-left:5px;background:none;border-radius: 0px;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{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:20px;padding-right:16px}
.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}
......@@ -13,13 +13,13 @@ button[disabled]{cursor:default;background:#ccc}
.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;border-radius:4px;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{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;border-radius:4px;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;border-radius:4px;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:260px;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}
.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:70px;height:28px;line-height:28px;border-radius:2px;vertical-align:middle;border-radius:5px;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{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,QAA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;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
......@@ -86,7 +86,12 @@ $(function() {
notice = (function() {
return window.alert;
})();
})(),
wordLimit = function(word, limit) {
limit = limit || 15;
return word.length > limit ? (word.substr(0, limit - 3) + '...') : word;
};
start();
......@@ -105,7 +110,7 @@ $(function() {
function createFileMenu() {
var menus = [{
label: '新建 (Ctrl + N)',
label: '新建',
click: newFile
}, {
divider: true
......@@ -119,16 +124,24 @@ $(function() {
acceptFiles.push(p.fileExtension);
}
});
menus = menus.concat([{
label: '导入本地文件',
click: function() {
function importUseEncoding(encoding) {
return function() {
$('<input type="file" />')
.attr('accept', acceptFiles.join(','))
.on('change', function(e) {
e = e.originalEvent;
minder.importFile(e.target.files[0]);
minder.importFile(e.target.files[0], encoding);
}).click();
}
};
}
menus = menus.concat([{
label: '导入...',
click: importUseEncoding('utf8')
}, {
label: '以 GBK 编码导入...',
click: importUseEncoding('gbk')
}, {
divider: true
}]);
......@@ -150,7 +163,7 @@ $(function() {
menus = menus.concat([{
divider: true,
}, {
label: '登陆',
label: '请登录',
click: login,
id: 'net-hint-buttom'
}, {
......@@ -174,7 +187,9 @@ $(function() {
$file_btn = $('<button id="file-btn">文件</button>').addClass('dropdown').appendTo($menu);
$file_menu = $.kmuidropmenu({ data: createFileMenu() })
$file_menu = $.kmuidropmenu({
data: createFileMenu()
})
.addClass('file-menu')
.appendTo('body');
......@@ -234,6 +249,10 @@ $(function() {
e.stopPropagation();
});
$('body').delegate('#global-zeroclipboard-html-bridge', 'mousedown', function(e) {
e.stopPropagation();
});
var copyTrickTimer = 0;
$('body').on('mousedown', function(e) {
copyTrickTimer = setTimeout(function() {
......@@ -333,19 +352,14 @@ $(function() {
function setRemotePath(path, saved) {
var filename;
remotePath = path;
if (remotePath) {
filename = getFileName(remotePath);
if (!saved) {
filename = '* ' + filename;
}
$title.text(filename);
} else if (currentAccount) {
$title.text('* ' + minder.getMinderTitle());
} else {
$title.text(filename || minder.getMinderTitle());
}
document.title = [filename || minder.getMinderTitle(), titleSuffix].join(' - ');
filename = remotePath ? getFileName(remotePath) : minder.getMinderTitle();
if (!saved) filename = '* ' + filename;
$title.text(filename)
document.title = [filename, titleSuffix].join(' - ');
}
// 检查是否在 Cookie 中登录过了
......@@ -432,7 +446,7 @@ $(function() {
addToRecentMenu(result.list.filter(function(file) {
return getFileFormat(file.path) in fileLoader;
}));
syncPreference(result.list);
//syncPreference(result.list);
}
},
error: loadUserFiles
......@@ -712,13 +726,26 @@ $(function() {
minder.execCommand('camera', minder.getRoot(), 300);
}
function generateRemotePath() {
var filename = window.prompt("请输入文件名: ", minder.getMinderTitle()) || minder.getMinderTitle();
function generateRemotePath(filename) {
return '/apps/kityminder/' + filename + '.km';
}
function save() {
if (!currentAccount || save.busy) return;
if (!currentAccount) return alert('请先登录!');
if (save.busy) {
return;
}
var uploadPath, filename;
// 确定上传文件名
if (!remotePath) {
filename = window.prompt('请输入文件名: ', minder.getMinderTitle());
if (!filename) return;
uploadPath = generateRemotePath(filename);
} else {
uploadPath = remotePath;
}
save.busy = true;
......@@ -745,7 +772,7 @@ $(function() {
upload.tryCount = 0;
return;
}
var uploadPath = remotePath || generateRemotePath();
$title.loading('正在保存 “' + getFileName(uploadPath) + '” ...');
sto.uploadTextFile(data, uploadPath, {
ondup: remotePath ? sto.constant.ONDUP_OVERWRITE : sto.constant.ONDUP_NEWCOPY,
......@@ -840,16 +867,20 @@ $(function() {
switch (keyCode) {
//保存
case KM.keymap.s:
e.preventDefault();
if (e.shiftKey) {
share();
} else {
save();
setTimeout(function() {
save();
});
}
e.preventDefault();
break;
case KM.keymap.n:
newFile();
e.preventDefault();
setTimeout(function() {
newFile();
});
break;
}
}
......@@ -861,9 +892,7 @@ $(function() {
minder.on('contentchange', function() {
if (!watchingChanges || lastContent == minder.exportData('json')) return;
var current = draftManager.save();
if (currentAccount) {
setRemotePath(remotePath, current.sync);
}
setRemotePath(remotePath, current.sync);
lastContent = minder.exportData('json');
});
}
......@@ -882,7 +911,7 @@ $(function() {
$draft_menu.append('<li disabled="disabled" class="current-draft kmui-combobox-item kmui-combobox-item-disabled kmui-combobox-checked">' +
'<span class="kmui-combobox-icon"></span>' +
'<label class="kmui-combobox-item-label">' +
'<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + draft.name +
'<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + wordLimit(draft.name) +
'</label>' +
'</li>');
$draft_menu.append('<li class="kmui-divider"></li>');
......@@ -894,7 +923,7 @@ $(function() {
while (list.length) {
draft = list.shift();
$draft = $('<li class="draft-item">' +
'<a href="#">' + '<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + draft.name + '</a><a class="delete" title="删除该草稿"></a></li>');
'<a href="#">' + '<span class="update-time">' + getFriendlyTimeSpan(+new Date(draft.update), +new Date()) + '</span>' + wordLimit(draft.name) + '</a><a class="delete" title="删除该草稿"></a></li>');
$draft.data('draft-index', index++);
$draft.appendTo($draft_menu);
}
......
......@@ -45,7 +45,6 @@ button {
border: none;
margin-left: 5px;
background: none;
border-radius: 2px;
.niceblue;
......@@ -70,7 +69,7 @@ button {
span.update-time {
float: right;
color: #CCC;
margin-left: 20px;
margin-left: 40px;
padding-right: 16px;
}
li.draft-item a {
......@@ -139,7 +138,6 @@ button {
.file-menu.kmui-dropdown-menu {
margin-top: 24px;
margin-left: 1px;
border-radius: 4px;
box-shadow: 0px 1px 5px rgba(0,0,0, .3);
#save-button, #manage-file-button {
......@@ -159,7 +157,6 @@ button {
margin-top: 24px;
margin-left: -25px;
min-width: 130px;
border-radius: 4px;
box-shadow: 0px 1px 5px rgba(0,0,0, .3);
li a {
......@@ -170,7 +167,6 @@ button {
#share-dialog {
position: absolute;
padding: 20px;
border-radius: 4px;
left: 50%;
top: 40%;
margin-left: -175px;
......@@ -187,7 +183,7 @@ button {
}
input {
width: 260px;
width: 255px;
height: 22px;
line-height: 22px;
padding: 4px 4px 0;
......@@ -208,14 +204,12 @@ button {
#copy-share-url {
display: inline-block;
margin: 0;
width: 70px;
width: 75px;
height: 28px;
line-height: 28px;
border-radius: 2px;
vertical-align: middle;
color: white;
border-radius: 5px;
.niceblue;
......
......@@ -7,12 +7,13 @@
padding: 5px 0;
background-color: #ffffff;
font-size: 12px;
box-shadow: 2px 5px 15px rgba(0, 0, 0, .5);
border-radius: 3px;
box-shadow: 0 1px 5px hsla(0, 0%, 0%, 0.3);
/* border-radius: 3px; */
min-width: 160px;
_width: 160px;
-webkit-transform: translateX(2px);
font-family: Arial, "Heiti SC", "Microsoft Yahei";
/* border-top: 3px solid hsl(224, 16%, 27%); */
}
.kmui-combobox-menu .kmui-combobox-item {
......@@ -47,6 +48,7 @@
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0099f2', endColorstr='#0076dd',GradientType=0 ); /* IE6-8 */
color: white;
background: hsl(222, 14%, 41%);
/*border: 1px solid #a3bde3;*/
}
......
......@@ -4,7 +4,7 @@
right:10px;
background-color: #fff;
outline: 0;
border-radius: 5px;
/* border-radius: 5px; */
box-shadow: 3px 3px 8px rgba(0,0,0, .5);
}
.kmui-modal input[type=text] {
......
......@@ -7,8 +7,8 @@
font-size: 12px;
list-style: none;
background-color: #ffffff;
border-radius: 3px;
box-shadow: 2px 5px 15px rgba(0, 0, 0, .5);
border-radius: 0;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
background-clip: padding-box;
font-family: Arial, "Heiti SC", "Microsoft Yahei";
}
......@@ -51,7 +51,7 @@
background: -webkit-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #0099f2 0%,#4096ee 0%,#0076dd 100%); /* IE10+ */
background: #5a6378; /* W3C */
background: hsl(222, 14%, 41%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0099f2', endColorstr='#0076dd',GradientType=0 ); /* IE6-8 */
color: white;
......
......@@ -2,15 +2,23 @@
html, body, div {
margin: 0;
padding: 0;
/* background: #FFFFFF; */
margin-top: 0 !important;
}
html, body, #kityminder, div.kmui-editor-body {
overflow: hidden;
-moz-user-select: none;
width: 100%;
}
#content-wrapper {
overflow: hidden;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
#title, #panel {
background: #393F4F;
background: hsl(224, 16%, 27%);
font-family: 'Hiragino Sans GB', 'Arial', 'Microsoft Yahei';
/* -webkit-font-smoothing: antialiased; */
}
......@@ -26,6 +34,10 @@ html, body, #kityminder, div.kmui-editor-body {
text-align: center;
font-weight: 300;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
white-space: nowrap;
}
#panel {
......@@ -57,7 +69,6 @@ html, body, #kityminder, div.kmui-editor-body {
#menu {
float: left;
flo
}
#panel button:hover, #panel button.active {
......@@ -114,6 +125,7 @@ button#tool-btn {
#panel button#tool-btn {
padding-right: 20px;
position: relative;
overflow: visible;
}
#panel button#tool-btn.active:before {
......@@ -253,7 +265,7 @@ svg, body {
font-family: Arial, "Microsoft Yahei", "Heiti SC", sans-serif;
}
#about {
position:absolute;
position: absolute;
bottom: 0;
right: 0;
height: 40px;
......@@ -261,21 +273,27 @@ svg, body {
background: #5d697a;
color: #eee;
font-family:Arial;
font-size:13px;
font-size: 13px;
font-weight:normal;
margin:0;
text-align: right;
padding: 0 15px 0 60px;
border-bottom: 5px solid #393F4F;
-webkit-font-smoothing: antialiased;
position: absolute;
transition: all ease .3s 0.3s;
-webkit-transform: translate(100%);
-moz-transform: translate(100%);
-ms-transform: translate(100%);
-o-transform: translate(100%);
transform: translate(100%);
}
#about:hover {
#about:hover, #about:hover #km-cat {
-webkit-transform: translate(0);
-moz-transform: translate(0);
-ms-transform: translate(0);
-o-transform: translate(0);
transform: translate(0);
}
#about a {
color: #eee;
......@@ -286,11 +304,12 @@ svg, body {
top: 5px;
transition: all ease 1.3s 0.3s;
-webkit-transform: translate(-60px, 0);
-moz-transform: translate(-60px, 0);
-ms-transform: translate(-60px, 0);
-o-transform: translate(-60px, 0);
transform: translate(-60px, 0);
cursor: pointer;
}
#about:hover #km-cat {
-webkit-transform: translate(0);
}
#about #cat-face {
fill: #393F4F;
}
......
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