国内流行的内容管理系统(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.

158 lines
4.4KB

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