|
-
-
-
- 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 .albCt").each(function () {
- albums.push({
- "img": $(this).find("img").attr("src"),
- "txt": $(this).find("input").val()
- })
- })
- }
-
- $("#albums").val(JSON.stringify(albums));
-
- return true;
- }
-
- function testGet() {
- LoadTestDiv();
- }
-
- function checkMuList(psid, cmid) {
- if ($Obj('pagestyle3').checked) {
- $Obj('cfgmulist').style.display = 'block';
- $Obj('spagelist').style.display = 'none';
- } else if ($Obj('pagestyle1').checked) {
- $Obj('cfgmulist').style.display = 'none';
- $Obj('spagelist').style.display = 'block';
- } else {
- $Obj('cfgmulist').style.display = 'none';
- $Obj('spagelist').style.display = 'none';
- }
- }
-
-
- function showZipField(formitem, zipid, upid) {
- if (formitem.checked) {
- $Obj(zipid).style.display = 'block';
- $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 = 'block';
- $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;
- vImg = $Obj(imgdid);
- picnameObj = document.getElementById('picname');
- nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname);
- nForm = f.form;
-
- if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmitAlb);
- else nForm.removeEventListener("submit", checkSubmitAlb, false);
- nForm.action = 'archives_do.php';
- nForm.target = frname;
- nForm.dopost.value = 'uploadLitpic';
- nForm.submit();
-
- picnameObj.value = '';
- newobj = $Obj('uploadwait');
- if (!newobj) {
- newobj = document.createElement("DIV");
- newobj.id = 'uploadwait';
- newobj.style.position = 'absolute';
- newobj.className = 'uploadwait';
- newobj.style.width = 120;
- newobj.style.height = 20;
- newobj.style.top = hpos;
- newobj.style.left = 100;
- document.body.appendChild(newobj);
- newobj.innerHTML = '<img src="images/loadinglit.gif" alit="" />上传中...';
- }
- newobj.style.display = 'block';
-
- nForm.action = acname;
- nForm.dopost.value = 'save';
- nForm.target = '';
- nForm.litpic.disabled = true;
-
-
-
- }
-
-
- function delAlbPic(pid) {
- var tgobj = $Obj('albCtok' + pid);
- var myajax = new DedeAjax(tgobj);
- myajax.SendGet2('swfupload.php?dopost=del&id=' + pid);
- $Obj('thumbnails').removeChild(tgobj);
- }
-
-
- function delAlbPicOld(picfile, pid) {
- var tgobj = $Obj('albold' + pid);
- var myajax = new DedeAjax(tgobj);
- myajax.SendGet2('swfupload.php?dopost=delold&picfile=' + picfile);
- $Obj('thumbnailsEdit').removeChild(tgobj);
- }
|