mirror of https://gitee.com/zhang_1334717033/kiftd
Update to v1.0.4
parent
3d6e2f0c49
commit
e2a01b40dd
21
LICENSE
21
LICENSE
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2018 青阳龙野 <kohgylw@163.com> (phone:15928143814)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
32
README.md
32
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# kiftd——青阳网络文件传输系统 #
|
||||
## 一款便捷、开源、功能完善的个人&团队&小型组织网盘服务器系统。 ##
|
||||
### 欢迎访问kiftd官方资源站! ###
|
||||
### 欢迎访问kiftd官方资源站!您可以在这里下载官方版本的kiftd资源或阅读说明内容。 ###
|
||||
|
||||
-------
|
||||
|
||||
|
|
@ -21,10 +21,10 @@
|
|||
> 使用破解软件同样无法确保安全性,闭源的特性令人担忧。同时,很多已有的网盘服务器软件性能笨重、功能简单、语言的障碍更是使用中不可忽视的问题。
|
||||
_注:kift为功能性内核的开发代号,其应用版本被称为kiftd_
|
||||
|
||||
### 它从何而来?
|
||||
|
||||
> 本软件的作者 kohgylw 相信:除了他本人之外,一定还有其他人也面临着同样的问题。最初,作为教师的他需要时常分发资料给学生(或其他教师)——在他成功弄丢了几次U盘后,便萌生了利用自己闲暇的时间去开发出一套“基于常见web浏览器的网络文件存储、分发、管理、预览系统”的计划。该系统要比ftp更便捷,要比操作系统自带的文件分享功能适应性更强;要比已有的网盘软件更强大、更高效。不久之后,作为该计划的成果,这款名为kiftd的软件就此诞生了。
|
||||
|
||||
-------
|
||||
|
||||
### 为什么选择kiftd?
|
||||
* 1MB的文档和超过4GB的高清电影资源?均能够随意上传和下载。
|
||||
* 担心操作系统不兼容?无论是Windows、Linux还是Unix(包括Mac OS X),均可运行使用。
|
||||
|
|
@ -44,6 +44,8 @@ _注:kift为功能性内核的开发代号,其应用版本被称为kiftd_
|
|||
|
||||
您可以随时开始使用它,只要您需要。
|
||||
|
||||
------
|
||||
|
||||
## Quick Strat
|
||||
|
||||
### 现在,您只需抽出3分钟时间,就可以立即体验这款专业快捷的网盘服务器了。
|
||||
|
|
@ -59,9 +61,13 @@ _注:kift为功能性内核的开发代号,其应用版本被称为kiftd_
|
|||
|
||||
最新讯息:
|
||||
|
||||
### 紧急修复v1.0.3
|
||||
由于新版本升级中的疏漏,造成出现了无法使用预览功能的BUG,现已进行修复,请存在问题的用户下载最新版本。
|
||||
+ 修复了由于v1.0.3版本疏漏导致的预览功能失效的问题。
|
||||
### 新版本v1.0.4
|
||||
本次更新主要针对于一些新功能,使其能够应对更加多样化的需求。推荐所有用户升级体验。
|
||||
+ 增加了文件夹访问级别——现在,您可以为文件夹设定访问级别了:“公开的”、“仅小组”和“仅创建者”。您可以通过该功能更加灵活地限制他人查看您的资料,使其更加适用于团队使用。
|
||||
+ 新增了图片预览压缩功能——当您需要查看较大体积的图片时(超过2MB),kiftd会为其生成一份较小的缩略图以提高预览速度。
|
||||
+ 优化了命令控制方式——现在,您可以直接运行并启动kiftd服务器而无需进入命令控制模式了。
|
||||
+ 优化了登录过程——现在,打开登录窗口将直接选中“账户”输入框。
|
||||
+ 优化了上传提示的字体——使其能够自适应屏幕分辨率。
|
||||
|
||||
### 新版本v1.0.3
|
||||
新的kiftd v 1.0.3增加了更多便捷的操作功能,并修复了一些Bug。该版本建议所有用户升级体验。
|
||||
|
|
@ -72,20 +78,6 @@ _注:kift为功能性内核的开发代号,其应用版本被称为kiftd_
|
|||
+ 一些Bug修复——完善了纯命令模式下的错误提示信息。修正了文件系统选择相关的一些Bug,修正了IE浏览器下无法上传文件的Bug。
|
||||
+ 更新了《kiftd说明文档》使其更加易读——指引内容更加全面,还增加了如何升级kiftd至最新版本的提示。
|
||||
|
||||
### 常规更新v1.0.2v2
|
||||
该更新为1.0.2版本基础上的性能优化更新,该版本建议所有用户升级体验。
|
||||
+ 优化了登录逻辑——现在进行登录和注销操作不会再返回到根目录了,而是保持在当前浏览路径内。这一点是为了方便用户进行频繁的登录和注销操作。
|
||||
+ 为登录操作增加了等待效果——让用户在较差的网络环境下能够获得更好的登录操作体验,防止重复操作。
|
||||
+ 优化了kiftd应用主界面的显示——使得其能够自适应各种不同的分辨率,从而解决了在高分辨率显示器下kiftd应用主界面显示过小的问题。
|
||||
|
||||
### 常规更新v1.0.2v1
|
||||
该更新为1.0.2版本基础上的性能优化更新,该版本建议所有用户升级体验。
|
||||
+ 优化了主页设计,使其在较差的网络环境下的能够更加快速地加载。
|
||||
+ 为主页添加了加载的过度动画,令主页在较差的网络环境下能够获得更加舒适的使用体验。
|
||||
+ 优化了视频播放页面的加载速度。
|
||||
+ 在说明文档中增加了关于Linux远程服务器管理的相关内容,并优化了说明内容。
|
||||
+ 其他一些服务器逻辑的优化。
|
||||
|
||||
--------------------
|
||||
## Functional Examples
|
||||
|
||||
|
|
|
|||
Binary file not shown.
BIN
kiftd说明文档.pdf
BIN
kiftd说明文档.pdf
Binary file not shown.
|
|
@ -4,25 +4,32 @@
|
|||
<resultMap id="BaseResultMap" type="kohgylw.kiftd.server.model.Folder">
|
||||
<result column="folder_id" jdbcType="VARCHAR" property="folderId" />
|
||||
<result column="folder_name" jdbcType="VARCHAR" property="folderName" />
|
||||
<result column="folder_creation_date" jdbcType="VARCHAR" property="folderCreationDate" />
|
||||
<result column="folder_creation_date" jdbcType="VARCHAR"
|
||||
property="folderCreationDate" />
|
||||
<result column="folder_creator" jdbcType="VARCHAR" property="folderCreator" />
|
||||
<result column="folder_parent" jdbcType="VARCHAR" property="folderParent" />
|
||||
<result column="folder_constraint" jdbcType="INTEGER" property="folderConstraint" />
|
||||
</resultMap>
|
||||
|
||||
<select id="queryById" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
<select id="queryById" parameterType="java.lang.String"
|
||||
resultMap="BaseResultMap">
|
||||
SELECT * FROM FOLDER WHERE folder_id = #{fid,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<select id="queryByParentId" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
<select id="queryByParentId" parameterType="java.lang.String"
|
||||
resultMap="BaseResultMap">
|
||||
SELECT * FROM FOLDER WHERE folder_parent = #{pid,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<select id="queryByParentIdAndFolderName" parameterType="java.util.Map" resultMap="BaseResultMap">
|
||||
SELECT * FROM FOLDER WHERE folder_parent = #{parentId,jdbcType=VARCHAR} AND folder_name = #{folderName,jdbcType=VARCHAR}
|
||||
<select id="queryByParentIdAndFolderName" parameterType="java.util.Map"
|
||||
resultMap="BaseResultMap">
|
||||
SELECT * FROM FOLDER WHERE folder_parent = #{parentId,jdbcType=VARCHAR} AND
|
||||
folder_name = #{folderName,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<insert id="insertNewFolder" parameterType="kohgylw.kiftd.server.model.Folder">
|
||||
INSERT INTO FOLDER VALUES(#{folderId,jdbcType=VARCHAR},#{folderName,jdbcType=VARCHAR},#{folderCreationDate,jdbcType=VARCHAR},#{folderCreator,jdbcType=VARCHAR},#{folderParent,jdbcType=VARCHAR});
|
||||
INSERT INTO FOLDER
|
||||
VALUES(#{folderId,jdbcType=VARCHAR},#{folderName,jdbcType=VARCHAR},#{folderCreationDate,jdbcType=VARCHAR},#{folderCreator,jdbcType=VARCHAR},#{folderParent,jdbcType=VARCHAR},#{folderConstraint,jdbcType=INTEGER});
|
||||
</insert>
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.String">
|
||||
|
|
@ -30,7 +37,13 @@
|
|||
</delete>
|
||||
|
||||
<update id="updateFolderNameById" parameterType="java.util.Map">
|
||||
UPDATE FOLDER SET folder_name = #{newName,jdbcType=VARCHAR} WHERE folder_id = #{folderId,jdbcType=VARCHAR}
|
||||
UPDATE FOLDER SET folder_name = #{newName,jdbcType=VARCHAR} WHERE folder_id
|
||||
= #{folderId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
||||
<update id="updateFolderConstraintById" parameterType="java.util.Map">
|
||||
UPDATE FOLDER SET folder_constraint = #{newConstraint,jdbcType=INTEGER} WHERE folder_id
|
||||
= #{folderId,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -41,7 +41,6 @@
|
|||
|
||||
.uploadstatusbox {
|
||||
color: #9C9C9C;
|
||||
font-size: 4px;
|
||||
height: 48px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
@charset "UTF-8";.titlebox{height:30px;line-height:30px;padding-top:5px;padding-bottom:5px;padding-left:10px;padding-right:10px;position:relative;bottom:-7px}.titletext{color:#000;font-size:22px}.graytext{color:#8b8b8b}.subtitle{color:#5cacee;text-align:center}.rightbtn{border-right:10px;float:right;margin-left:10px}.heading{height:8px}.centerText{text-align:center}.uploadstatusbox{color:#9c9c9c;font-size:4px;height:48px;overflow:auto}html{height:100%}body{height:100%}.loading{line-height:56px;color:#545454;padding-left:60px;font-size:15px;background:#fff url(loading.gif) no-repeat 10px 50%;opacity:.7;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;filter:alpha(opacity=70)}
|
||||
@charset "UTF-8";.titlebox{height:30px;line-height:30px;padding-top:5px;padding-bottom:5px;padding-left:10px;padding-right:10px;position:relative;bottom:-7px}.titletext{color:#000;font-size:22px}.graytext{color:#8b8b8b}.subtitle{color:#5cacee;text-align:center}.rightbtn{border-right:10px;float:right;margin-left:10px}.heading{height:8px}.centerText{text-align:center}.uploadstatusbox{color:#9c9c9c;height:48px;overflow:auto}html{height:100%}body{height:100%}.loading{line-height:56px;color:#545454;padding-left:60px;font-size:15px;background:#fff url(loading.gif) no-repeat 10px 50%;opacity:.7;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;filter:alpha(opacity=70)}
|
||||
|
|
@ -147,9 +147,9 @@
|
|||
</div>
|
||||
<!-- end 注销 -->
|
||||
<!-- 新建文件夹框 -->
|
||||
<div class="modal fade bs-example-modal-sm" id="newFolderModal"
|
||||
tabindex="-1" role="dialog" aria-labelledby="newFolderlMolderTitle">
|
||||
<div class="modal-dialog modal-sm" role="document">
|
||||
<div class="modal fade" id="newFolderModal" tabindex="-1" role="dialog"
|
||||
aria-labelledby="newFolderlMolderTitle">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
|
|
@ -164,10 +164,23 @@
|
|||
<form class="form-horizontal">
|
||||
<div class="form-group" id="foldernamebox">
|
||||
<label for="folderid" id="foldernametitle"
|
||||
class="col-sm-3 control-label">名称:</label>
|
||||
class="col-sm-3 control-label">新建文件夹:</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="foldername"
|
||||
placeholder="请输入新文件夹的名称……">
|
||||
placeholder="请输入新文件夹的名称……" folderConstraintLevel="0">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
<span id="newfoldertype">公开的</span> <span
|
||||
class="caret"></span>
|
||||
</button>
|
||||
<ul id="foldertypelist"
|
||||
class="dropdown-menu dropdown-menu-right">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="folderalert" role="alert"></div>
|
||||
|
|
@ -208,9 +221,9 @@
|
|||
</div>
|
||||
<!-- end 删除文件夹 -->
|
||||
<!-- 重命名文件夹框 -->
|
||||
<div class="modal fade bs-example-modal-sm" id="renameFolderModal"
|
||||
tabindex="-1" role="dialog" aria-labelledby="renameFolderMolderTitle">
|
||||
<div class="modal-dialog modal-sm" role="document">
|
||||
<div class="modal fade" id="renameFolderModal" tabindex="-1"
|
||||
role="dialog" aria-labelledby="renameFolderMolderTitle">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
|
|
@ -218,17 +231,30 @@
|
|||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="renameFolderMolderTitle">
|
||||
<span class="glyphicon glyphicon-wrench"></span> 重命名文件夹
|
||||
<span class="glyphicon glyphicon-wrench"></span> 编辑文件夹
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal">
|
||||
<div class="form-group" id="folderrenamebox">
|
||||
<label for="folderid" id="foldernametitle"
|
||||
class="col-sm-3 control-label">名称:</label>
|
||||
class="col-sm-3 control-label">编辑文件夹:</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="newfoldername"
|
||||
placeholder="请输入文件夹的名称……">
|
||||
placeholder="请输入文件夹的名称……" folderConstraintLevel="0">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true"
|
||||
aria-expanded="false">
|
||||
<span id="editfoldertype">公开的</span> <span
|
||||
class="caret"></span>
|
||||
</button>
|
||||
<ul id="editfoldertypelist"
|
||||
class="dropdown-menu dropdown-menu-right">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="newfolderalert" role="alert"></div>
|
||||
|
|
|
|||
|
|
@ -10,11 +10,13 @@ var folderView;// 返回的文件系统视图对象
|
|||
var originFolderView;// 保存原始的文件视图对象
|
||||
var fs;// 选中的要上传的文件列表
|
||||
var checkedMovefiles;// 移动文件的存储列表
|
||||
var constraintLevel;// 当前文件夹限制等级
|
||||
var account;//用户账户
|
||||
|
||||
// 页面初始化
|
||||
$(function() {
|
||||
getServerOS();// 得到服务器操作系统信息
|
||||
showFolderView(locationpath);// 显示根节点页面视图
|
||||
showFolderView("root");// 显示根节点页面视图
|
||||
// 点击空白处取消选中文件并重新加载文件视图(不支持火狐)
|
||||
$(document).click(function(e) {
|
||||
var filetable = $("#filetable")[0];
|
||||
|
|
@ -47,6 +49,42 @@ $(function() {
|
|||
dologin();
|
||||
}
|
||||
});
|
||||
// 开启登陆模态框自动聚焦账户输入框
|
||||
$('#loginModal').on('shown.bs.modal', function(e) {
|
||||
$("#accountid").focus();
|
||||
});
|
||||
// 开启新建文件夹框自动初始化状态
|
||||
$('#newFolderModal').on('show.bs.modal', function(e) {
|
||||
$("#folderalert").removeClass("alert");
|
||||
$("#folderalert").removeClass("alert-danger");
|
||||
$("#foldernamebox").removeClass("has-error");
|
||||
$("#foldername").val("");
|
||||
$("#foldertypelist").html("");
|
||||
if(account!=null){
|
||||
$("#foldername").attr("folderConstraintLevel",constraintLevel+"");
|
||||
$("#newfoldertype").text(folderTypes[constraintLevel]);
|
||||
for(var i=constraintLevel;i<folderTypes.length;i++){
|
||||
$("#foldertypelist").append("<li><a onclick='changeNewFolderType("+i+")'>"+folderTypes[i]+"</a></li>");
|
||||
}
|
||||
}else{
|
||||
$("#foldertypelist").append("<li><a onclick='changeNewFolderType(0)'>"+folderTypes[0]+"</a></li>");
|
||||
}
|
||||
});
|
||||
// 开启编辑文件夹框自动初始化状态
|
||||
$('#renameFolderModal').on('show.bs.modal', function(e) {
|
||||
$("#newfolderalert").removeClass("alert");
|
||||
$("#newfolderalert").removeClass("alert-danger");
|
||||
$("#folderrenamebox").removeClass("has-error");
|
||||
$("#newfolderalert").text("");
|
||||
$("#editfoldertypelist").html("");
|
||||
if(account!=null){
|
||||
for(var i=constraintLevel;i<folderTypes.length;i++){
|
||||
$("#editfoldertypelist").append("<li><a onclick='changeEditFolderType("+i+")'>"+folderTypes[i]+"</a></li>");
|
||||
}
|
||||
}else{
|
||||
$("#editfoldertypelist").append("<li><a onclick='changeEditFolderType(0)'>"+folderTypes[0]+"</a></li>");
|
||||
}
|
||||
});
|
||||
// 响应拖动上传文件
|
||||
document.ondragover = function(e) {
|
||||
e.preventDefault();
|
||||
|
|
@ -169,10 +207,13 @@ function showFolderView(fid) {
|
|||
endLoading();
|
||||
if (result == "mustLogin") {
|
||||
window.location.href = "login.html";
|
||||
}else if(result == "notAccess"){
|
||||
window.location.href="/";
|
||||
} else {
|
||||
folderView = eval("(" + result + ")");
|
||||
locationpath = folderView.folder.folderId;
|
||||
parentpath = folderView.folder.folderParent;
|
||||
constraintLevel=folderView.folder.folderConstraint;
|
||||
showParentList(folderView);
|
||||
showAccountView(folderView);
|
||||
showPublishTime(folderView);
|
||||
|
|
@ -364,6 +405,7 @@ function showParentList(folderView) {
|
|||
// 显示用户视图,包括文件列表、登录信息、操作权限接口等
|
||||
function showAccountView(folderView) {
|
||||
$("#tb").html("");
|
||||
account=folderView.account;
|
||||
if (folderView.account != null) {
|
||||
// 说明已经等陆,显示注销按钮
|
||||
$("#tb")
|
||||
|
|
@ -472,7 +514,6 @@ function showFolderTable(folderView) {
|
|||
if (checkAuth(authList, "L")) {
|
||||
aL = true;
|
||||
}
|
||||
|
||||
$
|
||||
.each(
|
||||
folderView.folderList,
|
||||
|
|
@ -500,8 +541,9 @@ function showFolderTable(folderView) {
|
|||
+ f.folderId
|
||||
+ '","'
|
||||
+ f.folderName
|
||||
+ '"'
|
||||
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-wrench'></span> 重命名</button>";
|
||||
+ '",'
|
||||
+ f.folderConstraint
|
||||
+ ")' class='btn btn-link btn-xs'><span class='glyphicon glyphicon-wrench'></span> 编辑</button>";
|
||||
}
|
||||
if (!aR && !aD) {
|
||||
folderRow = folderRow + "--";
|
||||
|
|
@ -596,15 +638,23 @@ function showFolderTable(folderView) {
|
|||
});
|
||||
}
|
||||
|
||||
var folderTypes=['公开的','仅小组','仅创建者'];// 文件夹约束条件(由小至大)
|
||||
|
||||
// 显示新建文件夹模态框
|
||||
function showNewFolderModel() {
|
||||
$("#foldername").val("");
|
||||
$('#newFolderModal').modal('toggle');
|
||||
$('#newFolderModal').modal('show');
|
||||
}
|
||||
|
||||
// 修改新建文件夹约束等级
|
||||
function changeNewFolderType(type){
|
||||
$("#newfoldertype").text(folderTypes[type]);
|
||||
$("#foldername").attr("folderConstraintLevel",type+"");
|
||||
}
|
||||
|
||||
// 创建新的文件夹
|
||||
function createfolder() {
|
||||
var fn = $("#foldername").val();
|
||||
var fc=$("#foldername").attr("folderConstraintLevel");
|
||||
var reg = new RegExp("^[0-9a-zA-Z_\\u4E00-\\u9FFF]+$", "g");
|
||||
if (fn.length == 0) {
|
||||
showFolderAlert("提示:文件夹名称不能为空。");
|
||||
|
|
@ -620,7 +670,8 @@ function createfolder() {
|
|||
dataType : "text",
|
||||
data : {
|
||||
parentId : locationpath,
|
||||
folderName : fn
|
||||
folderName : fn,
|
||||
folderConstraint : fc
|
||||
},
|
||||
url : "homeController/newFolder.ajax",
|
||||
success : function(result) {
|
||||
|
|
@ -719,21 +770,25 @@ function deleteFolder(folderId) {
|
|||
}
|
||||
|
||||
// 显示重命名文件夹模态框
|
||||
function showRenameFolderModel(folderId, folderName) {
|
||||
$("#newfolderalert").removeClass("alert");
|
||||
$("#newfolderalert").removeClass("alert-danger");
|
||||
$("#folderrenamebox").removeClass("has-error");
|
||||
$("#newfolderalert").text("");
|
||||
function showRenameFolderModel(folderId, folderName, type) {
|
||||
$("#renameFolderBox").html(
|
||||
"<button type='button' class='btn btn-primary' onclick='renameFolder("
|
||||
+ '"' + folderId + '"' + ")'>修改</button>");
|
||||
$("#newfoldername").val(folderName);
|
||||
$("#renameFolderModal").modal('toggle');
|
||||
changeEditFolderType(type);
|
||||
$("#renameFolderModal").modal('show');
|
||||
}
|
||||
|
||||
//修改编辑文件夹的约束等级
|
||||
function changeEditFolderType(type){
|
||||
$("#editfoldertype").text(folderTypes[type]);
|
||||
$("#newfoldername").attr("folderConstraintLevel",type+"");
|
||||
}
|
||||
|
||||
// 执行重命名文件夹
|
||||
function renameFolder(folderId) {
|
||||
var newName = $("#newfoldername").val();
|
||||
var fc=$("#newfoldername").attr("folderConstraintLevel");
|
||||
var reg = new RegExp("^[0-9a-zA-Z_\\u4E00-\\u9FFF]+$", "g");
|
||||
if (newName.length == 0) {
|
||||
showRenameFolderAlert("提示:文件夹名称不能为空。");
|
||||
|
|
@ -749,7 +804,8 @@ function renameFolder(folderId) {
|
|||
dataType : "text",
|
||||
data : {
|
||||
folderId : folderId,
|
||||
newName : newName
|
||||
newName : newName,
|
||||
folderConstraint : fc
|
||||
},
|
||||
url : "homeController/renameFolder.ajax",
|
||||
success : function(result) {
|
||||
|
|
@ -757,21 +813,19 @@ function renameFolder(folderId) {
|
|||
window.location.href = "login.html";
|
||||
} else {
|
||||
if (result == "noAuthorized") {
|
||||
showRenameFolderAlert("提示:您的操作未被授权,重命名失败");
|
||||
showRenameFolderAlert("提示:您的操作未被授权,编辑失败");
|
||||
} else if (result == "errorParameter") {
|
||||
showRenameFolderAlert("提示:参数不正确,重命名失败");
|
||||
} else if (result == "cannotRenameFolder") {
|
||||
showRenameFolderAlert("提示:出现意外错误,可能未能重命名文件夹");
|
||||
showRenameFolderAlert("提示:参数不正确,编辑失败");
|
||||
} else if (result == "renameFolderSuccess") {
|
||||
$('#renameFolderModal').modal('hide');
|
||||
showFolderView(locationpath);
|
||||
} else {
|
||||
showRenameFolderAlert("提示:出现意外错误,可能未能重命名文件夹");
|
||||
showRenameFolderAlert("提示:出现意外错误,可能未能编辑文件夹");
|
||||
}
|
||||
}
|
||||
},
|
||||
error : function() {
|
||||
showRenameFolderAlert("提示:出现意外错误,可能未能重命名文件夹");
|
||||
showRenameFolderAlert("提示:出现意外错误,可能未能编辑文件夹");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
@ -1146,7 +1200,12 @@ function showPicture(fileId) {
|
|||
var imageslist = document.createElement("ul");
|
||||
$.each(pvl.pictureViewList, function(n, val) {
|
||||
var image = new Image();
|
||||
// 判断直接显示原图还是请求压缩流
|
||||
if(val.filePath.startsWith("homeController")){
|
||||
image.src = val.filePath;
|
||||
}else{
|
||||
image.src = "fileblocks/"+val.filePath;
|
||||
}
|
||||
image.alt = val.fileName;
|
||||
var imagerow = document.createElement("li");
|
||||
imagerow.appendChild(image);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,10 @@
|
|||
kiftd 使用许可
|
||||
|
||||
Copyright (c) 2018 青阳龙野 <kohgylw@163.com> (phone:15928143814)
|
||||
|
||||
使用kiftd软件或查看kiftd源代码代表您接收如下条款:
|
||||
1,任何组织或个人均能够自由、无偿地获得kiftd软件及其源代码的原版拷贝,并对其进行无限制地进行使用——无论是商业的还是非商业的。
|
||||
2,任何组织或个人均能够自由复制、分发或修改kiftd软件及其源代码,并将其运用于任何用途。修改后的作品之版权由修改者所有。
|
||||
3,kiftd软件之作者无需为使用该软件及其源代码所造成的任何直接或间接后果承担责任。
|
||||
4,作者“青阳龙野(kohgylw)”对kiftd软件及源代码享有版权并保留其著作权,该软件及其源代码的使用者需承认其原版部分之版权。
|
||||
5,kiftd软件中所使用的所有第三方软件、工具或插件及其代码,其权利由该资源之作者享有并授予许可。kiftd作者无需为使用这些资源而造成的直接或间接后果承担责任。
|
||||
Loading…
Reference in New Issue