Commit 37fe2751 authored by campaign's avatar campaign

Merge remote-tracking branch 'origin/release-1.3.0' into release-1.3.0

parents 4647bebe f1b00e74
...@@ -20,11 +20,14 @@ if (isset($_REQUEST['content'])) { ...@@ -20,11 +20,14 @@ if (isset($_REQUEST['content'])) {
if (!$filename) { if (!$filename) {
$filename = "kikyminder"; $filename = "kikyminder";
} }
if (isset($_REQUEST['iehack'])) {
$filename = urlencode($filename);
}
header("Content-type: application/octet-stream; charset=utf8; name=".urlencode($filename)); header("Content-type: application/octet-stream; charset=utf8; name=".urlencode($filename));
header("Accept-Length: ".strlen($content)); header("Accept-Length: ".strlen($content));
header("Content-Length: ".strlen($content)); header("Content-Length: ".strlen($content));
header("Content-Disposition: attachment; filename=".urlencode($filename)); header("Content-Disposition: attachment; filename=".$filename);
header('Content-Description: File Transfer'); header('Content-Description: File Transfer');
if (isset($_REQUEST['stamp'])) { if (isset($_REQUEST['stamp'])) {
......
...@@ -20,7 +20,9 @@ var MinderEvent = kity.createClass('MindEvent', { ...@@ -20,7 +20,9 @@ var MinderEvent = kity.createClass('MindEvent', {
while (!findShape.minderNode && findShape.container) { while (!findShape.minderNode && findShape.container) {
findShape = findShape.container; findShape = findShape.container;
} }
return findShape.minderNode || null; var node = findShape.minderNode;
if (node && findShape.getOpacity() < 1) return null;
return node || null;
}, },
stopPropagation: function() { stopPropagation: function() {
...@@ -151,7 +153,7 @@ kity.extendClass(Minder, { ...@@ -151,7 +153,7 @@ kity.extendClass(Minder, {
callbacks[i].call(this, e); callbacks[i].call(this, e);
/* this.getStatus() != lastStatus ||*/
if (e.shouldStopPropagationImmediately()) { if (e.shouldStopPropagationImmediately()) {
break; break;
} }
......
...@@ -70,6 +70,7 @@ KityMinder.registerModule('TextEditModule', function() { ...@@ -70,6 +70,7 @@ KityMinder.registerModule('TextEditModule', function() {
'normal.beforemousedown textedit.beforemousedown inputready.beforemousedown': function(e) { 'normal.beforemousedown textedit.beforemousedown inputready.beforemousedown': function(e) {
//右键直接退出 //右键直接退出
if (e.isRightMB()) { if (e.isRightMB()) {
if (!e.getTargetNode()) this.setStatus('normal');
return; return;
} }
......
...@@ -76,8 +76,12 @@ KityMinder.registerModule('Expand', function() { ...@@ -76,8 +76,12 @@ KityMinder.registerModule('Expand', function() {
if (!changed) return; if (!changed) return;
var vo = node.getVertexOut(); node.renderTree().getMinder().layout(100);
/* 如何加展开效果:
var vo = node.getVertexOut();
if (state == STATE_EXPAND) { if (state == STATE_EXPAND) {
var m = node.getGlobalLayoutTransform().clone().translate(vo.x, vo.y); var m = node.getGlobalLayoutTransform().clone().translate(vo.x, vo.y);
...@@ -99,6 +103,7 @@ KityMinder.registerModule('Expand', function() { ...@@ -99,6 +103,7 @@ KityMinder.registerModule('Expand', function() {
}); });
} }
*/
} }
// 将展开的操作和状态读取接口拓展到 MinderNode 上 // 将展开的操作和状态读取接口拓展到 MinderNode 上
......
...@@ -61,14 +61,13 @@ if (!kity.Browser.ie) { ...@@ -61,14 +61,13 @@ if (!kity.Browser.ie) {
// svg 含有 &nbsp; 符号导出报错 Entity 'nbsp' not defined // svg 含有 &nbsp; 符号导出报错 Entity 'nbsp' not defined
svgXml = svgXml.replace(/&nbsp;/g, '&#xa0;'); svgXml = svgXml.replace(/&nbsp;/g, '&#xa0;');
// blob = new Blob([svgXml], { blob = new Blob([svgXml], {
// type: 'image/svg+xml' type: 'image/svg+xml'
// }); });
// svgUrl = DomURL.createObjectURL(blob); svgUrl = DomURL.createObjectURL(blob);
svgUrl = 'data:image/svg+xml;charset=utf-8,' +  //svgUrl = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(svgXml);
  encodeURIComponent(svgXml);
return { return {
width: width, width: width,
......
...@@ -118,7 +118,9 @@ KityMinder.registerUI('menu/save/download', function(minder) { ...@@ -118,7 +118,9 @@ KityMinder.registerUI('menu/save/download', function(minder) {
value: filename value: filename
}).appendTo($form); }).appendTo($form);
$('<input name="iehack" value="&#9760;" />').appendTo($form); if (kity.Browser.ie) {
$('<input name="iehack" value="1" />').appendTo($form);
}
$('<input name="stamp" />').val(stamp).appendTo($form); $('<input name="stamp" />').val(stamp).appendTo($form);
var netdisk = minder.getUI('menu/save/netdisk'); var netdisk = minder.getUI('menu/save/netdisk');
......
...@@ -123,7 +123,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) { ...@@ -123,7 +123,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
var $title = minder.getUI('topbar/title').$title; var $title = minder.getUI('topbar/title').$title;
$filename.val(doc.title); $filename.val(doc.title);
return doSave(doc.path, doc.protocol, doc, $title); return doSave(doc.path, doc.protocol, doc, $title, 'leaveTheMenu');
} }
function getSaveContext() { function getSaveContext() {
...@@ -162,7 +162,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) { ...@@ -162,7 +162,7 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
var saving = 0; var saving = 0;
function doSave(path, protocol, doc, $mask) { function doSave(path, protocol, doc, $mask, leaveTheMenu) {
if (saving) return; if (saving) return;
...@@ -202,7 +202,9 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) { ...@@ -202,7 +202,9 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
if ($mask) $mask.removeClass('loading'); if ($mask) $mask.removeClass('loading');
$menu.hide(); if (!leaveTheMenu) {
$menu.hide();
}
doc.path = path; doc.path = path;
doc.title = $filename.val(); doc.title = $filename.val();
...@@ -211,7 +213,9 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) { ...@@ -211,7 +213,9 @@ KityMinder.registerUI('menu/save/netdisk', function(minder) {
$doc.save(doc); $doc.save(doc);
setTimeout($finder.list, 500); setTimeout(function() {
$finder.list($finder.pwd(), true);
}, 1499);
}); });
} }
......
...@@ -19,6 +19,8 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) { ...@@ -19,6 +19,8 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) {
var $addInput = new FUI.Input().appendTo($resourcePanel); var $addInput = new FUI.Input().appendTo($resourcePanel);
$addInput.getElement().type = 'text';
var $addButton = new FUI.Button({ var $addButton = new FUI.Button({
label: '添加' label: '添加'
}).appendTo($resourcePanel); }).appendTo($resourcePanel);
...@@ -31,8 +33,9 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) { ...@@ -31,8 +33,9 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) {
function addResource() { function addResource() {
var resource = $addInput.getValue(); var resource = $addInput.getValue();
var origin = minder.queryCommandValue('resource'); var origin = minder.queryCommandValue('resource');
if (resource) { if (/\S/.test(resource)) {
if (!~origin.indexOf(resource)) origin.unshift(resource); if (!~origin.indexOf(resource)) origin.push(resource);
origin.sort();
minder.execCommand('resource', origin); minder.execCommand('resource', origin);
} }
$addInput.setValue(null); $addInput.setValue(null);
...@@ -68,6 +71,8 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) { ...@@ -68,6 +71,8 @@ KityMinder.registerUI('ribbon/idea/resource', function(minder) {
var resource = minder.queryCommandValue('resource'); var resource = minder.queryCommandValue('resource');
var used = minder.getUsedResource(); var used = minder.getUsedResource();
used.sort();
switch (minder.queryCommandState('resource')) { switch (minder.queryCommandState('resource')) {
case 0: case 0:
$addInput.enable(); $addInput.enable();
......
...@@ -80,6 +80,7 @@ input[type=text], ...@@ -80,6 +80,7 @@ input[type=text],
input[type=url] { input[type=url] {
padding: 2px 5px; padding: 2px 5px;
height: 16px; height: 16px;
line-height: 16px;
outline: none; outline: none;
border: 1px solid lighten(@tab-hover, 50%); border: 1px solid lighten(@tab-hover, 50%);
box-shadow: inset 0 1px 3px rgba(0,0,0,.05); box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
......
#resource-panel > .fui-panel-content > .fui-label-panel-content { #resource-panel > .fui-panel-content > .fui-label-panel-content {
position: relative; position: relative;
& > .fui-input { & > .fui-input {
width: 148px; width: 140px;
margin: 2px 0 0; margin: 2px 0 0;
vertical-align: middle; vertical-align: middle;
box-sizing: content-box;
} }
& > .fui-button { & > .fui-button {
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
} }
} }
.shared-content { .shared-content {
.left, .right { & > .left, & > .right {
float: left; float: left;
} }
.m-logo { .m-logo {
......
...@@ -9,6 +9,14 @@ ...@@ -9,6 +9,14 @@
} }
} }
input::-ms-clear {
display: none;
}
input[type=search]::-ms-clear {
display: inline-block;
}
#tab-container .fui-button { #tab-container .fui-button {
display: inline-block; display: inline-block;
padding: 2px 5px 2px 3px; padding: 2px 5px 2px 3px;
......
...@@ -608,6 +608,7 @@ input[type=text], ...@@ -608,6 +608,7 @@ input[type=text],
input[type=url] { input[type=url] {
padding: 2px 5px; padding: 2px 5px;
height: 16px; height: 16px;
line-height: 16px;
outline: none; outline: none;
border: 1px solid #e5e7ec; border: 1px solid #e5e7ec;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
...@@ -831,6 +832,12 @@ li { ...@@ -831,6 +832,12 @@ li {
.fui-disabled .fui-widget:active { .fui-disabled .fui-widget:active {
background-color: transparent; background-color: transparent;
} }
input::-ms-clear {
display: none;
}
input[type=search]::-ms-clear {
display: inline-block;
}
#tab-container .fui-button { #tab-container .fui-button {
display: inline-block; display: inline-block;
padding: 2px 5px 2px 3px; padding: 2px 5px 2px 3px;
...@@ -2754,9 +2761,10 @@ body { ...@@ -2754,9 +2761,10 @@ body {
position: relative; position: relative;
} }
#resource-panel > .fui-panel-content > .fui-label-panel-content > .fui-input { #resource-panel > .fui-panel-content > .fui-label-panel-content > .fui-input {
width: 148px; width: 140px;
margin: 2px 0 0; margin: 2px 0 0;
vertical-align: middle; vertical-align: middle;
box-sizing: content-box;
} }
#resource-panel > .fui-panel-content > .fui-label-panel-content > .fui-button { #resource-panel > .fui-panel-content > .fui-label-panel-content > .fui-button {
left: auto; left: auto;
...@@ -3180,8 +3188,8 @@ ul.resource-list li { ...@@ -3180,8 +3188,8 @@ ul.resource-list li {
#public-share .share-body { #public-share .share-body {
display: none; display: none;
} }
.shared-content .left, .shared-content > .left,
.shared-content .right { .shared-content > .right {
float: left; float: left;
} }
.shared-content .m-logo { .shared-content .m-logo {
......
This diff is collapsed.
...@@ -66,7 +66,7 @@ KityMinder.registerUI('topbar/user', function(minder) { ...@@ -66,7 +66,7 @@ KityMinder.registerUI('topbar/user', function(minder) {
window.open('http://i.baidu.com'); window.open('http://i.baidu.com');
break; break;
case 'gotonetdisk': case 'gotonetdisk':
window.open('http://pan.baidu.com'); window.open('http://pan.baidu.com/disk/home#path=/apps/kityminder');
break; break;
case 'switchuser': case 'switchuser':
switchUser(); switchUser();
......
...@@ -11,6 +11,8 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) { ...@@ -11,6 +11,8 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
var eve = minder.getUI('eve'); var eve = minder.getUI('eve');
var instances = [];
/** /**
* 生成一个网盘的目录访问组件 * 生成一个网盘的目录访问组件
* *
...@@ -21,6 +23,8 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) { ...@@ -21,6 +23,8 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
var finder = eve.setup({}); var finder = eve.setup({});
instances.push(finder);
var base = '/apps/kityminder'; var base = '/apps/kityminder';
var currentPath = base; var currentPath = base;
...@@ -71,7 +75,6 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) { ...@@ -71,7 +75,6 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
}); });
}); });
function mkdir() { function mkdir() {
if (mkdir.onprogress) { if (mkdir.onprogress) {
return mkdir.onprogress.select(); return mkdir.onprogress.select();
...@@ -108,9 +111,13 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) { ...@@ -108,9 +111,13 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
fio.file.mkdir({ fio.file.mkdir({
path: currentPath + name path: currentPath + name
}).then(function() { }).then(function() {
return list(currentPath, true); return new Promise(function(resolve) {
setTimeout(function() {
resolve(list(currentPath, true));
}, 200);
});
}, function(e) { }, function(e) {
if (e.message.indexOf('31061') === 0) { if (e.detail && e.detail.error_code == 31061) {
e.message = '已存在同名目录'; e.message = '已存在同名目录';
} }
window.alert('创建目录失败:' + e.message); window.alert('创建目录失败:' + e.message);
...@@ -185,19 +192,9 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) { ...@@ -185,19 +192,9 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
}); });
} }
function renderList(values) { function renderFileList(files) {
$list.empty();
var files = values[0];
files.sort(function(a, b) {
if (a.isDir > b.isDir) {
return -1;
} else if (a.isDir == b.isDir) {
return a.createTime > b.createTime ? -1 : 1;
} else return 1;
});
$list.empty();
if (!files.length) { if (!files.length) {
$list.append('<li class="empty" disabled="disabled">' + minder.getLang('ui.emptydir') + '</li>'); $list.append('<li class="empty" disabled="disabled">' + minder.getLang('ui.emptydir') + '</li>');
} else { } else {
...@@ -213,6 +210,30 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) { ...@@ -213,6 +210,30 @@ KityMinder.registerUI('widget/netdiskfinder', function(minder) {
.appendTo($list); .appendTo($list);
}); });
} }
}
finder._renderFileList = renderFileList;
function renderList(values) {
var files = values[0];
files.sort(function(a, b) {
if (a.isDir > b.isDir) {
return -1;
} else if (a.isDir == b.isDir) {
return a.createTime > b.createTime ? -1 : 1;
} else return 1;
});
renderFileList(files);
// 通知其他 finder 更新
instances.forEach(function(instance) {
if (instance == finder) return;
if (instance.pwd() == currentPath)
instance._renderFileList(files);
});
fadeInList(); fadeInList();
checkSelect(); checkSelect();
......
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