国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

154 lines
4.2KB

  1. <!--
  2. if(moz) {
  3. extendEventObject();
  4. extendElementModel();
  5. emulateAttachEvent();
  6. }
  7. function viewArc(aid){
  8. if(aid==0) aid = getOneItem();
  9. window.open("archives_do.php?aid="+aid+"&dopost=viewArchives");
  10. }
  11. function kwArc(aid){
  12. var qstr=getCheckboxItem();
  13. if(aid==0) aid = getOneItem();
  14. if(qstr=='')
  15. {
  16. alert('必须选择一个或多个文档!');
  17. return;
  18. }
  19. location="archives_do.php?aid="+aid+"&dopost=makekw&qstr="+qstr;
  20. }
  21. function editArc(aid){
  22. if(aid==0) aid = getOneItem();
  23. location="archives_do.php?aid="+aid+"&dopost=editArchives";
  24. }
  25. function updateArc(aid){
  26. var qstr=getCheckboxItem();
  27. if(aid==0) aid = getOneItem();
  28. location="archives_do.php?aid="+aid+"&dopost=makeArchives&qstr="+qstr;
  29. }
  30. function checkArc(aid){
  31. var qstr=getCheckboxItem();
  32. if(aid==0) aid = getOneItem();
  33. location="archives_do.php?aid="+aid+"&dopost=checkArchives&qstr="+qstr;
  34. }
  35. function moveArc(e, obj, cid){
  36. var qstr=getCheckboxItem();
  37. if(qstr=='')
  38. {
  39. alert('必须选择一个或多个文档!');
  40. return;
  41. }
  42. LoadQuickDiv(e, 'archives_do.php?dopost=moveArchives&qstr='+qstr+'&channelid='+cid+'&rnd='+Math.random(), 'moveArchives', '450px', '180px');
  43. ChangeFullDiv('show');
  44. }
  45. function adArc(aid){
  46. var qstr=getCheckboxItem();
  47. if(aid==0) aid = getOneItem();
  48. location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr;
  49. }
  50. function cAtts(jname, e, obj)
  51. {
  52. var qstr=getCheckboxItem();
  53. var screeheight = document.body.clientHeight + 20;
  54. if(qstr=='')
  55. {
  56. alert('必须选择一个或多个文档!');
  57. return;
  58. }
  59. LoadQuickDiv(e, 'archives_do.php?dopost=attsDlg&qstr='+qstr+'&dojob='+jname+'&rnd='+Math.random(), 'attsDlg', '450px', '160px');
  60. ChangeFullDiv('show', screeheight);
  61. }
  62. function delArc(aid){
  63. var qstr=getCheckboxItem();
  64. if(aid==0) aid = getOneItem();
  65. location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives";
  66. }
  67. function QuickEdit(aid, e, obj)
  68. {
  69. LoadQuickDiv(e, 'archives_do.php?dopost=quickEdit&aid='+aid+'&rnd='+Math.random(), 'quickEdit', '450px', '300px');
  70. ChangeFullDiv('show');
  71. }
  72. //上下文菜单
  73. function ShowMenu(evt,obj,aid,atitle)
  74. {
  75. var popupoptions
  76. popupoptions = [
  77. new ContextItem("浏览文档",function(){ viewArc(aid); }),
  78. new ContextItem("编辑属性",function(){ QuickEdit(aid, evt, obj); }),
  79. new ContextItem("编辑文档",function(){ editArc(aid); }),
  80. new ContextSeperator(),
  81. new ContextItem("更新HTML",function(){ updateArc(aid); }),
  82. new ContextItem("审核文档",function(){ checkArc(aid); }),
  83. new ContextItem("推荐文档",function(){ adArc(aid); }),
  84. new ContextItem("删除文档",function(){ delArc(aid); }),
  85. new ContextSeperator(),
  86. new ContextItem("复制(<u>C</u>)",function(){ copyToClipboard(atitle); }),
  87. new ContextItem("重载页面",function(){ location.reload(); }),
  88. new ContextSeperator(),
  89. new ContextItem("全部选择",function(){ selAll(); }),
  90. new ContextItem("取消选择",function(){ noSelAll(); }),
  91. new ContextSeperator(),
  92. new ContextItem("关闭菜单",function(){})
  93. ]
  94. ContextMenu.display(evt,popupoptions);
  95. //location="catalog_main.php";
  96. }
  97. //获得选中文件的文件名
  98. function getCheckboxItem()
  99. {
  100. var allSel="";
  101. if(document.form2.arcID.value) return document.form2.arcID.value;
  102. for(i=0;i<document.form2.arcID.length;i++)
  103. {
  104. if(document.form2.arcID[i].checked)
  105. {
  106. if(allSel=="")
  107. allSel=document.form2.arcID[i].value;
  108. else
  109. allSel=allSel+"`"+document.form2.arcID[i].value;
  110. }
  111. }
  112. return allSel;
  113. }
  114. //获得选中其中一个的id
  115. function getOneItem()
  116. {
  117. var allSel="";
  118. if(document.form2.arcID.value) return document.form2.arcID.value;
  119. for(i=0;i<document.form2.arcID.length;i++)
  120. {
  121. if(document.form2.arcID[i].checked)
  122. {
  123. allSel = document.form2.arcID[i].value;
  124. break;
  125. }
  126. }
  127. return allSel;
  128. }
  129. function selAll()
  130. {
  131. for(i=0;i<document.form2.arcID.length;i++)
  132. {
  133. if(!document.form2.arcID[i].checked)
  134. {
  135. document.form2.arcID[i].checked=true;
  136. }
  137. }
  138. }
  139. function noSelAll()
  140. {
  141. for(i=0;i<document.form2.arcID.length;i++)
  142. {
  143. if(document.form2.arcID[i].checked)
  144. {
  145. document.form2.arcID[i].checked=false;
  146. }
  147. }
  148. }
  149. -->