Skip to content

Commit

Permalink
update to v1.0.15-RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
KOHGYLW committed Feb 25, 2019
1 parent 8f80804 commit 3f81051
Show file tree
Hide file tree
Showing 11 changed files with 458 additions and 7 deletions.
Binary file modified .DS_Store
Binary file not shown.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ _注:kift为该功能的开发名称,其实际成果命名为kiftd。_

> 提示:当您更新版本后,请手动清除浏览器的缓存,之后刷新网盘主页以确保数据文件保持最新!否则可能导致新版页面功能无法使用。
### 常规更新v1.0.14
_本次更新修复了一些已经发现的重要问题,推荐所有用户升级。_
+ 修正了文件导出功能中,“覆盖”与“保留两者”的实际操作相反的问题。这一问题是由于编码时疏忽造成的,其可能会导致用户在导出时意外丢失文件,请及时更新修正。
### 新版本v1.0.15
_本次更新增加了提高可用性的新功能,同时修复了一些已知问题,推荐所有用户升级。_
+ Word文档在线预览——现在,众多用户期待已久的Word文档在线预览功能正式上线,方便办公使用。Word预览功能提供docx格式的在线打开和预览,且该功能无需额外安装任何插件,可免费用于商业用途。注:在线预览展示的格式可能会与官方Word格式有所差异。
+ 修正“上传”权限可能导致的越权问题——当用户具备“上传”权限时,可能会恶意上传同名文件并覆盖原文件,从而导致原文件丢失。为避免该漏洞导致的越权现象,现已将其修复为:当用户上传同名文件时,如仅具备“上传”权限,则能选择“跳过”和“保留两者”;如同时具备“删除”权限,可额外选择“覆盖”,从而避免您的文件丢失。

> 需要查看更多版本历史信息?请访问: https://kohgylw.gitee.io/News.html
Expand Down
341 changes: 341 additions & 0 deletions fonts/COPYING

Large diffs are not rendered by default.

Binary file renamed kiftd-1.0.14-RELEASE.jar → fonts/wqy-zenhei.ttc
Binary file not shown.
Binary file added kiftd-1.0.15-RELEASE.jar
Binary file not shown.
Binary file modified kiftd说明文档.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion webContext/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ <h4>提示:存在同名文件!</h4>
全部应用
</p>
<p>
<button type="button" class="btn btn-danger btn-sm"
<button id="uploadcoverbtn" type="button" class="btn btn-danger btn-sm"
onclick="selectFileUpLoadModelEnd('cover')">覆盖</button>
<button type="button" class="btn btn-default btn-sm"
onclick="selectFileUpLoadModelEnd('skip')">跳过</button>
Expand Down
19 changes: 18 additions & 1 deletion webContext/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,13 @@ function showFolderTable(folderView) {
+ fi.fileId
+ '"'
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-play'></span> 播放</button>";
} else if(getSuffix(fi.fileName) == "docx"){
fileRow = fileRow
+ "<button onclick='docxView("
+ '"'
+ fi.fileId
+ '"'
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-eye-open'></span> 预览</button>";
}
}
if (aD) {
Expand Down Expand Up @@ -1124,6 +1131,12 @@ var repeModelList;// 这个是对每一个重复文件选取的上传模式,

// 针对同名文件,选择上传的模式:跳过(skip)、覆盖(cover)和保留两者(both)
function selectFileUpLoadModelStart(){
var authList = originFolderView.authList;
if(checkAuth(authList, "D")){
$("#uploadcoverbtn").show();
}else{
$("#uploadcoverbtn").hide();
}
$("#selectFileUpLoadModelAlert").show();
$("#repeFileName").text(repeList[repeIndex]);
}
Expand Down Expand Up @@ -1444,6 +1457,10 @@ function pdfView(filePath) {
window.open("/pdfview/web/viewer.html?file=/fileblocks/" + filePath);
}

function docxView(fileId){
window.open("/pdfview/web/viewer.html?file=/resourceController/getWordView/" + fileId);
}

// 查看图片
function showPicture(fileId) {
$.ajax({
Expand Down Expand Up @@ -2064,7 +2081,7 @@ function selectFileMoveModel(t){
}
}


// 发送移动文件请求
function sendMoveFilesReq(){
// 执行移动行为
var strOptMap = JSON.stringify(strMoveOptMap);
Expand Down
4 changes: 2 additions & 2 deletions webContext/js/home.min.js

Large diffs are not rendered by default.

Binary file added webContext/pdfview/web/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
92 changes: 92 additions & 0 deletions webContext/pdfview/web/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,73 @@
<link rel="resource" type="application/l10n"
href="locale/locale.properties">
<link rel="icon" type="image/x-icon" href="images/pdf-icon.png" />
<!-- 自定义的提示样式(类似于主页的加载提示) -->
<style type="text/css">
.pdf-modal {
display: none;
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
z-index: 1000;
background-color: rgba(0, 0, 0, 0.5);
}

.pdf-modal-content {
display: flex;
flex-flow: column nowrap;
justify-content: space-between;
width: 25%;
min-width: 350px;
height: 10%;
max-height: 100px;
margin: 100px auto;
border-radius: 10px;
-webkit-animation: zoom 0.1s;
animation: zoom 0.1s;
resize: both;

color: #545454;
background: #FFFFFF url(loading.gif) no-repeat 10px 50%;
opacity: 0.7;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
}

@-webkit-keyframes zoom {
from {
-webkit-transform: scale(0)
}
to {
-webkit-transform: scale(1)
}
}

@keyframes zoom {
from {
transform: scale(0)
}
to {
transform: scale(1)
}
}

.pdf-modal-body {
font-size: 18px;
box-sizing: border-box;
text-align: center;
padding: 22px;
}

@media only screen and (max-width: 800px) {
.modal-content {
width: 80%;
}
}
</style>
<script src="../build/pdf.js"></script>
<script src="viewer.js"></script>
</head>
Expand Down Expand Up @@ -458,5 +525,30 @@
</div>
<!-- outerContainer -->
<div id="printContainer"></div>

<!-- 用于文档转换时的提示框 -->
<div id="pdf-modal" class="pdf-modal">
<div class="pdf-modal-content">
<div class="pdf-modal-body">
<p>正在打开Word文档,请稍候...</p>
</div>
</div>
</div>
</body>
<script type="text/javascript">
//增加了加载需要耗时转换的文档时的加载提示
window.onload = function() {
var url = location.search;
if (url.indexOf(".block") < 0) {
var modal = document.getElementById('pdf-modal');
modal.style.display = "block";
var interval = setInterval(function() {
if (PDFViewerApplication.pdfDocument != null) {
clearInterval(interval);
modal.style.display = "none";
}
}, 1);
}
}
</script>
</html>

0 comments on commit 3f81051

Please sign in to comment.