Plugins/kindeditor351/plugins/file_manager/file_manager.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var JSON_URL = '../../php/file_manager_json.php';
var KE = parent.KindEditor;
location.href.match(/\?id=([\w-]+)/i);
var id = RegExp.$1;
var fileManagerJson = (typeof KE.g[id].fileManagerJson == 'undefined') ? JSON_URL : KE.g[id].fileManagerJson;
var lang = KE.lang.plugins.file_manager;
KE.event.ready(function() {
var moveupImg = KE.$('moveupImg', document);
var moveupLink = KE.$('moveup', document);
var viewType = KE.$('viewType', document);
var orderType = KE.$('orderType', document);
var listTable = KE.$('listTable', document);
var viewTable = KE.$('viewTable', document);
var listDiv = KE.$('listDiv', document);
var viewDiv = KE.$('viewDiv', document);
moveupImg.alt = moveupImg.title = lang.moveup;
viewType.options[0] = new Option(lang.viewImage, 'VIEW');
viewType.options[1] = new Option(lang.listImage, 'LIST');
orderType.options[0] = new Option(lang.fileName, 'NAME');
orderType.options[1] = new Option(lang.fileSize, 'SIZE');
orderType.options[2] = new Option(lang.fileType, 'TYPE');
var changeType = function(type) {
if (type == 'VIEW') {
listDiv.style.display = 'none';
viewDiv.style.display = '';
} else {
listDiv.style.display = '';
viewDiv.style.display = 'none';
}
};
var insertLink = function(url) {
var stack = KE.g[id].dialogStack;
if (stack.length > 1) {
var parentDialog = stack[stack.length - 2];
var dialogDoc = KE.util.getIframeDoc(parentDialog.iframe);
KE.$('url', dialogDoc).value = url;
var currentDialog = stack[stack.length - 1];
currentDialog.hide();
return true;
} else {
return false;
}
}
var insertImage = function(url, title) {
if (!insertLink(url)) {
KE.util.insertHtml(id, '<img src="' + url + '" alt="' + title + '" border="0" />');
}
};
var insertFile = function(url, title) {
if (!insertLink(url)) {
KE.util.insertHtml(id, '<a href="' + url + '" target="_blank">' + title + '</a>');
}
};
var makeFileTitle = function (filename, filesize, datetime) {
var title = filename + ' (' + Math.ceil(filesize / 1024) + 'KB, ' + datetime + ')';
return title;
};
var bindTitle = function (el, data) {
if (data.is_dir) {
后面还有 156 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
