📄 articlecommentfunction.js
字号:
/*
文件名:ArticleCommentFunction.JS
作 用 :文章评论管理操作的函数集合
说 明:在Article_CommentMain.asp文件中调用此JS
*/
var DocElementArrInitialFlag=false;
var DocElementArr = new Array();
var DocContextMenuArr=new Array();
var SelectedFile='',SelectedFolder='';
function document.onreadystatechange()
{ if (DocElementArrInitialFlag) return;
InitialDocElementArr('FolderID','CommentID');
InitialContextMenu();
DocElementArrInitialFlag=true;
}
function InitialContextMenu()
{DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("window.parent.ViewComment(0);",'查看评论(V)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem('seperator','','');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("window.parent.Verific(1,0);",'审核评论(S)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("window.parent.Verific(0,0);",'取消审核(C)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem('seperator','','');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.SelectAllElement();",'全 选(A)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.DelComment();",'删除评论(D)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem('seperator','','');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.location.reload();",'刷 新(Z)','disabled');
}
function DocDisabledContextMenu()
{
DisabledContextMenu('FolderID','CommentID','审核评论(S),取消审核(C),查看评论(V),删除评论(D)','审核评论(S),取消审核(C),查看评论(V)','','','','')
}
function Verific(OpType,CommentID)
{
if (CommentID==0)
{GetSelectStatus('FolderID','CommentID');
if (SelectedFile!='')
{
location.href="Article_CommentVerific.asp?VerificType="+OpType+"&InfoID="+InfoID+"&ClassID="+ClassID+"&Page="+Page+"&CommentID="+SelectedFile;
}
else
alert('请选择评论!');
}
else
location.href="Article_CommentVerific.asp?VerificType="+OpType+"&InfoID="+InfoID+"&ClassID="+ClassID+"&Page="+Page+"&CommentID="+CommentID;
}
function DelComment()
{
GetSelectStatus('FolderID','CommentID');
if (SelectedFile!='')
{
if (confirm('真的要删除选中的评论吗?'))
location="Article_CommentDel.asp?InfoID="+InfoID+"&ClassID="+ClassID+"&Page="+Page+"&CommentID="+SelectedFile;
}
else
{
alert('请选择要删除的评论!');
}
SelectedFile='';
}
function ViewComment(CommentID)
{
if (CommentID==0)
{GetSelectStatus('FolderID','CommentID');
if (SelectedFile!='')
{
if (SelectedFile.indexOf(',')==-1)
{
OpenWindow('ArticleFrame.asp?Url=Article_CommentView.asp&PageTitle=查看评论&CommentID='+SelectedFile,380,320,window);
}
else
alert('一次仅能查看一条评论!');
}
else
alert('请选择一条评论!');
SelectedFile='';
}
else
OpenWindow('ArticleFrame.asp?Url=Article_CommentView.asp&PageTitle=查看评论信息&CommentID='+CommentID,380,320,window);
}
function CommentBack()
{ parent.frames['LeftFrame'].LeftInfoFrame.SetEnabledStatus(false);
if (top.CommonComment.FromUrl==0||top.CommonComment.FromUrl.split('=')[1]==0)
{
location.href='Article_Main.asp';
parent.frames['BottomFrame'].location.href='../Split.asp?ButtonSymbol=Disabled&OpStr=文章管理 >> <font color=red>浏览频道</font>';
}
else
{
location.href=top.CommonComment.FromUrl;
parent.frames['BottomFrame'].location.href='../Split.asp?ButtonSymbol=ViewFolder&Folder'+top.CommonComment.FromUrl.split('?')[1];
}
}
function GetKeyDown()
{
if (event.ctrlKey)
switch (event.keyCode)
{ case 90 : location.reload(); break;
case 65 : SelectAllElement();break;
case 86 : event.keyCode=0;event.returnValue=false;ViewComment(0); break;
case 83 : event.keyCode=0;event.returnValue=false;Verific(1,0);break;
case 67 : event.keyCode=0;event.returnValue=false;Verific(0,0);break;
case 68 : DelComment();break;
}
else
if (event.keyCode==46)DelComment();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -