📄 post_config.js
字号:
function setPostOpSelected(){
var opptype = document.all("EF_POST_MANAGE_OPPOST_SEARCH.oppost_type");
var oppost_type = document.all("oppost_type");
// alert(opptype.value + "----"+oppost_type);
if (opptype && opptype.value != null && oppost_type)
{
for(var i=0;i<oppost_type.length;i++){
if(oppost_type[i].value == opptype.value){
oppost_type[i].checked = true;
}
}
oppost_type.value = opptype.value;
}
}
function doPostOperation(){
//检查主题列表是否被选择
var checkTopic = document.all("EF_POST_MANAGE_OPPOST_LIST._check");
if (checkTopic){
if(!checkTopicSelect(checkTopic)){
alert("请选中需要批量操作的主题!");
return ;
}
}
if (confirm('此操作执行后将无法恢复,确认继续吗?')){
doAction('EF_POST_MANAGE_OPPOST_OPDETAIL._submit');
}
}
function doTopicRecycleDelete(){
if (confirm('此操作执行后将无法恢复,确认继续吗?')){
doAction('EF_TOPIC_RECYCLE_BATCH._submit');
}
}
function checkTopicSelect(checkTopic){
//判断是否需要做提交动作
var needSubmit = false
if (checkTopic){
if(!checkTopic.length){
if(checkTopic.checked){
needSubmit = true;
}
}else{
for(var i=0;i<checkTopic.length;i++){
if(checkTopic[i].checked){
needSubmit = true;
}
}
}
return needSubmit;
}
}
function doTopicReback(){
//检查主题列表是否被选择
var checkTopic = document.all("EF_TOPIC_RECYCLE_LIST._check");
if (checkTopic){
if(!checkTopicSelect(checkTopic)){
alert("请选中需要还原的主题!");
return ;
}
}
if (confirm('此操作执行后将无法恢复,确认继续吗?')){
doAction('EF_TOPIC_RECYCLE_LIST._reback');
}
}
function doTopicDelete(){
//检查主题列表是否被选择
var checkTopic = document.all("EF_TOPIC_RECYCLE_LIST._check");
if (checkTopic){
if(!checkTopicSelect(checkTopic)){
alert("请选中需要批量操作的主题!");
return ;
}
}
if (confirm('此操作执行后将无法恢复,确认继续吗?')){
doAction('EF_TOPIC_RECYCLE_LIST._delete');
}
}
function attachAllowSubmit(){
var attach_suffix = document.all("EF_POST_MANAGE_ATTACHMENT_ADD.attach_suffix");
var attach_size = document.all("EF_POST_MANAGE_ATTACHMENT_ADD.attach_size");
var zs = /^[a-z]+$/;
var zs1 = /^[0-9]*[1-9][0-9]*$/;
if(!zs.test(attach_suffix.value)){
alert("文件后缀名必须是小写字母!");
attach_suffix.focus();
return false;
}else if(!zs1.test(attach_size.value)){
alert("最大字节数必须是整数!");
attach_size.focus();
return false;
}else{
doAction('EF_POST_MANAGE_ATTACHMENT_ADD._submit');
}
}
//连接的论坛版面
function linkToForm(forumId){
window.open(getContextPath(false)+"/topics-"+forumId+"-1.fhtml","_blank","",true);
}
//连接的主题
function linkToTopic(topicId){
window.open(getContextPath(false)+"/post-"+topicId+"-1.fhtml","_blank","",true);
}
//编辑主题
function editTopic(topicId){
window.open(getContextPath(false)+"/topic.do?_fn=Edit&post_id="+topicId,"_blank","",true);
}
//连接的帖子
function linkToPost(postId){
window.open(getContextPath(false)+"/post.do?_fn=Post&post_id="+postId,"_blank","",true);
}
//连接的附件
function linkToFile(filePath){
window.open(getContextPath(false)+"/"+filePath,"_blank","",true);
}
//编辑的帖子
function editPost(postId){
window.open(getContextPath(false)+"/post.do?_fn=Edit&post_id="+postId,"_blank","",true);
}
//标签关联的主题
function linkToTagTopics(tagId){
window.open(getContextPath(false)+"/index.do?_fn=TagTopicList&tag_id="+tagId,"_blank","",true);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -