From 2a7057d92423bf03a9204ad99a908532c5dd510e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=99=E8=BF=B0=E3=80=81=E5=88=AB=E7=A6=BB?= <93301500+xushubieli@users.noreply.github.com> Date: Wed, 10 May 2023 16:48:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87=E5=A4=B1?= =?UTF-8?q?=E6=95=88=E5=8A=9F=E8=83=BD=EF=BC=8C=E8=AF=B7=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/js/album.js | 61 +++++---------------- src/admin/templets/album_add.htm | 10 ++-- src/admin/templets/album_edit.htm | 17 +----- src/static/web/js/user.album.js | 90 +++++-------------------------- 4 files changed, 29 insertions(+), 149 deletions(-) diff --git a/src/admin/js/album.js b/src/admin/js/album.js index 60d8efd3..33cd6268 100644 --- a/src/admin/js/album.js +++ b/src/admin/js/album.js @@ -1,13 +1,4 @@ function checkSubmitAlb() { - if (document.form1.title.value == '') { - ShowMsg("标题不能为空"); - return false; - } - if (document.form1.typeid.value == 0) { - ShowMsg("请选择主类别"); - return false; - } - document.form1.imagebody.value = $Obj('copyhtml').innerHTML; if ($("#thumbnails .albCt").length > 0) { //这里从thumbnails中取出图片元素信息 $("#thumbnails .albCt").each(function () { @@ -20,46 +11,6 @@ function checkSubmitAlb() { $("#albums").val(JSON.stringify(albums)); return true; } -function testGet() { - LoadTestDiv(); -} -function checkMuList(psid, cmid) { - if ($Obj('pagestyle3').checked) { - $Obj('cfgmulist').style.display = 'table-row'; - $Obj('spagelist').style.display = 'none'; - } else if ($Obj('pagestyle1').checked) { - $Obj('cfgmulist').style.display = 'none'; - $Obj('spagelist').style.display = 'table-row'; - } else { - $Obj('cfgmulist').style.display = 'none'; - $Obj('spagelist').style.display = 'none'; - } -} -//图片显示与隐藏zip文件选项 -function showZipField(formitem, zipid, upid) { - if (formitem.checked) { - $Obj(zipid).style.display = 'table-row'; - $Obj(upid).style.display = 'none'; - $Obj('copyhtml').innerHTML = ''; - } else { - $Obj(zipid).style.display = 'none'; - } -} -//图片显示与隐藏修改框 -function showHtmlField(formitem, htmlid, upid) { - if ($Nav() != "IE") { - alert("该方法不适用于非IE浏览器"); - return; - } - if (formitem.checked) { - $Obj(htmlid).style.display = 'table-row'; - $Obj(upid).style.display = 'none'; - $Obj('formzip').checked = false; - } else { - $Obj(htmlid).style.display = 'none'; - $Obj('copyhtml').innerHTML = ''; - } -} function seePicNewAlb(f, imgdid, frname, hpos, acname) { var newobj = null; if (f.value == '') return; @@ -95,6 +46,18 @@ function seePicNewAlb(f, imgdid, frname, hpos, acname) { nForm.target = ''; nForm.litpic.disabled = true; } +function checkMuList(psid, cmid) { + if ($Obj('pagestyle3').checked) { + $Obj('cfgmulist').style.display = 'table-row'; + $Obj('spagelist').style.display = 'none'; + } else if ($Obj('pagestyle1').checked) { + $Obj('cfgmulist').style.display = 'none'; + $Obj('spagelist').style.display = 'table-row'; + } else { + $Obj('cfgmulist').style.display = 'none'; + $Obj('spagelist').style.display = 'none'; + } +} //删除已经上传的图片 function delAlbPic(pid) { var tgobj = $Obj('albCtok' + pid); diff --git a/src/admin/templets/album_add.htm b/src/admin/templets/album_add.htm index db1861eb..29ff1343 100644 --- a/src/admin/templets/album_add.htm +++ b/src/admin/templets/album_add.htm @@ -100,7 +100,6 @@ 上传图片 - @@ -235,16 +234,13 @@ - + - +
网上复制:附加选项: - - -

(图片从别的网页复制,在这里用Ctrl+V粘贴,提交后程序可直接获取这个区域的所有图片防盗链网站需填写您复制图片的其中一个网页网址)

-
+
diff --git a/src/admin/templets/album_edit.htm b/src/admin/templets/album_edit.htm index 635e8526..3ccb8c34 100644 --- a/src/admin/templets/album_edit.htm +++ b/src/admin/templets/album_edit.htm @@ -238,24 +238,9 @@ - - - - - - - -
网上复制: - - -

(图片从别的网页复制,在这里用Ctrl+V粘贴,提交后程序可直接获取这个区域的所有图片防盗链网站需填写您复制图片的其中一个网页网址)

-
-
- - - +
diff --git a/src/static/web/js/user.album.js b/src/static/web/js/user.album.js index 95f1c9d2..034f88ad 100644 --- a/src/static/web/js/user.album.js +++ b/src/static/web/js/user.album.js @@ -1,22 +1,3 @@ -function checkSubmit() { - if (document.form1.title.value=='') { - alert("文档标题不能为空"); - document.form1.title.focus(); - return false; - } - if (document.form1.typeid.value==0) { - alert("请您选择文档所属栏目"); - return false; - } - document.form1.imagebody.value = document.getElementById('copyhtml').innerHTML; - document.getElementById('postloader').style.display = 'block'; -} -function CheckSelTable(nnum) { - var cbox = document.getElementById('isokcheck'+nnum); - var seltb = document.getElementById('seltb'+nnum); - if (!cbox.checked) seltb.style.display = 'none'; - else seltb.style.display = 'block'; -} var startNum = 1; function MakeUpload(mnum) { var endNum = 0; @@ -43,43 +24,22 @@ function MakeUpload(mnum) { upfield.innerHTML += fhtml; } } -function TestGet() { - LoadTestDiv(); +function CheckSelTable(nnum) { + var cbox = document.getElementById('isokcheck'+nnum); + var seltb = document.getElementById('seltb'+nnum); + if (!cbox.checked) seltb.style.display = 'none'; + else seltb.style.display = 'block'; } -var vcc = 0; -function LoadTestDiv() { - var posLeft = 100; var posTop = 100; - var newobj = document.getElementById('_myhtml'); - document.getElementById('imagebody').value = document.getElementById('copyhtml').innerHTML; - var dfstr = '粘贴到这里...'; - if (document.getElementById('imagebody').value.length <= dfstr.length) - { - alert('您还没有粘贴任何东西在修改框'); - return; +function checkSubmit() { + if (document.form1.title.value=='') { + alert("文档标题不能为空"); + document.form1.title.focus(); + return false; } - if (!newobj){ - newobj = document.createElement("DIV"); - newobj.id = '_myhtml'; - newobj.style.position='absolute'; - newobj.className = "dlg2"; - newobj.style.top = posTop; - newobj.style.left = posLeft; - document.body.appendChild(newobj); - } else { - newobj.style.display = "block"; + if (document.form1.typeid.value==0) { + alert("请您选择文档所属栏目"); + return false; } - const formData = new FormData() - formData.append('myhtml', v); - formData.append('vcc', vcc); - fetch('album_testhtml.php', { - method: 'POST', - body: formData - }) - .then(r => r.text()) - .then(d => { - newobj.innerHTML = d; - vcc++; - }) } function checkMuList(psid, cmid) { if (document.getElementById('pagestyle3').checked) { @@ -89,28 +49,4 @@ function checkMuList(psid, cmid) { } else { document.getElementById('spagelist').style.display = 'none'; } -} -//图片显示与隐藏zip文件选项 -function ShowZipField(formitem, zipid, upid) { - if (formitem.checked) { - document.getElementById(zipid).style.display = 'block'; - document.getElementById(upid).style.display = 'none'; - document.getElementById('formhtml').checked = false; - document.getElementById('copyhtml').innerHTML = ''; - } else { - document.getElementById(zipid).style.display = 'none'; - } -} -//图片显示与隐藏修改框 -function ShowHtmlField(formitem, htmlid, upid) { - if ($Nav()!="IE") { - alert("该方法不适用于非IE浏览器"); - return ; - } - if (formitem.checked) { - document.getElementById(htmlid).style.display = 'block'; - } else { - document.getElementById(htmlid).style.display = 'none'; - document.getElementById('copyhtml').innerHTML = ''; - } } \ No newline at end of file