Discuz.Web/javascript/template_attach.js
(开头部分) 15KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var attachments = new Array();
var attachimgurl = new Array();
function delAttach(id) {
$('attachbody').removeChild($('localno_' + id).parentNode.parentNode);
$('attachbtn').removeChild($('attachnew_' + id).parentNode);
$('attachbody').innerHTML == '' && addAttach();
$('localimgpreview_' + id) ? document.body.removeChild($('localimgpreview_' + id)) : null;
countNum2Upload();
if ($('localimgpreview_' + id + '_menu') )
{document.body.removeChild($('localimgpreview_' + id + '_menu'));}
}
function delSWFAttach(id) {
$('swfattach_' + id).style.display = 'none';
$('delswfattach_' + id).checked = true;
}
function delEditAttach(id) {
$('attach_' + id).style.display = 'none';
$('delattach_' + id).checked = true;
}
/* function addAttach() {
if ($('attachbody').childNodes.length + ($('attachuploaded') ? $('attachuploaded').childNodes.length : 0) > maxattachments - 1){
countNum2Upload();
//num2upload++;
return;
}
var id = aid;
var tags, newnode, i;
newnode = $('attachbtnhidden').firstChild.cloneNode(true);
tags = newnode.getElementsByTagName('input');
for(i in tags) {
if(tags[i].name == 'postfile') {
tags[i].id = 'attachnew_' + id;
tags[i].onchange = function() {insertAttach(id)};
tags[i].unselectable = 'on';
}
}
$('attachbtn').appendChild(newnode);
newnode = $('attachbodyhidden').firstChild.cloneNode(true);
tags = newnode.getElementsByTagName('input');
for(i in tags) {
if(tags[i].name == 'localid') {
tags[i].value = id;
}
}
tags = newnode.getElementsByTagName('span');
for(i in tags) {
if(tags[i].id == 'localfile[]') {
tags[i].id = 'localfile_' + id;
} else if(tags[i].id == 'cpadd[]') {
tags[i].id = 'cpadd_' + id;
} else if(tags[i].id == 'cpdel[]') {
tags[i].id = 'cpdel_' + id;
} else if(tags[i].id == 'localno[]') {
后面还有 376 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
