📄 articleeditorfunction.js
字号:
/*
文件名:ArticleEditorFunction.JS
作 用 :文章责任编辑管理操作的函数集合
说 明:在Aritlce_EditorList.asp文件中调用此JS
*/
var DocElementArrInitialFlag=false;
var DocElementArr = new Array();
var DocContextMenuArr=new Array();
var SelectedFile='',SelectedFolder='';
function document.onreadystatechange()
{ if (DocElementArrInitialFlag) return;
InitialDocElementArr('FolderID','EditorID');
InitialContextMenu();
DocElementArrInitialFlag=true;
}
function InitialContextMenu()
{ DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.EditorAdd('');",'添 加(N)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem('seperator','','');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.SelectAllElement();",'全 选(A)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.EditorControl('',1);",'编 辑(E)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.EditorControl('',2);",'删 除(D)','disabled');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem('seperator','','');
DocContextMenuArr[DocContextMenuArr.length]=new ContextMenuItem("parent.location.reload();",'刷 新(Z)','disabled');
}
function DocDisabledContextMenu()
{
DisabledContextMenu('FolderID','EditorID','编 辑(E),删 除(D)','编 辑(E)','','','','')
}
function EditorAdd(TempUrl)
{
location.href=TempUrl+'Article_EditorAdd.asp';
window.parent.frames['BottomFrame'].location.href=TempUrl+'../Split.asp?OpStr=文章管理中心 >> 责任编辑管理 >> <font color=red>新增责任编辑</font>&ButtonSymbol=EditorAddSave';
}
function EditEditor(TempUrl,id)
{
location=TempUrl+"Article_EditorAdd.asp?Page="+Page+"&Action=Edit&ID="+id;
window.parent.frames['BottomFrame'].location.href=TempUrl+'../Split.asp?OpStr=文章管理中心 >> 责任编辑管理 >> <font color=red>编辑责任编辑</font>&ButtonSymbol=EditorEdit';
}
function DelEditor(TempUrl,id)
{
if (confirm('真的要删除该责任编辑吗?'))
location=TempUrl+"Article_OriginDel.asp?Url=Article_EditorList.asp&Page="+Page+"&id="+id;
SelectedFile='';
}
function EditorControl(TempUrl,op)
{ var alertmsg='';
GetSelectStatus('FolderID','EditorID');
if (SelectedFile!='')
{
if (op==1)
{
if (SelectedFile.indexOf(',')==-1)
EditEditor(TempUrl,SelectedFile)
else alert('一次只能编辑一个责任编辑!')
SelectedFile='';
}
else if (op==2)
DelEditor(TempUrl,SelectedFile);
}
else
{
if (op==1)
alertmsg="编辑";
else if(op==2)
alertmsg="删除";
else
{
WindowReload();
alertmsg="操作"
}
alert('请选择要'+alertmsg+'的责任编辑');
}
}
function GetKeyDown()
{ event.returnValue=false;
if (event.ctrlKey)
switch (event.keyCode)
{ case 90 : location.reload(); break;
case 65 : SelectAllElement();break;
case 78 : event.keyCode=0;event.returnValue=false;EditorAdd('');break;
case 69 : event.keyCode=0;event.returnValue=false;EditorControl('',1);break;
case 68 : EditorControl('',2);break;
}
else
if (event.keyCode==46)EditorControl('',2);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -