?? article_modify.jsp
字號:
<%@ page contentType="text/html; charset=GBK"%>
<%@ taglib uri="/cms4j" prefix="cms4j" %>
<%
String OK_RETURN_URL = "";
String url = request.getParameter("url");
if(null != url && !url.equals("")){
OK_RETURN_URL = url;
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CMS4J</title>
<link href="../skin/blue/css/oper_area.css" rel="stylesheet" type="text/css">
</head>
<script src="../../js/common.js"></script>
<script src="../../js/page_init.js"></script>
<script src="../../js/validator.js"></script>
<script src="../../js/pic.js"></script>
<script src="../mywork/js/mywork.js"></script>
<script src="../../js/date/WdatePicker.js"></script>
<script>
//當前的PPTImage總數
var pptImageCount = 1;
// 上傳錯誤
function UploadError(sErrDesc){
alert(sErrDesc);
}
function UploadLoaded(){
//alert("upload");
}
function uploadHomepageImage(){
homepage_file.myform.submit();
}
function uploadArticleImage(){
article_file.myform.submit();
}
function uploadClassImage1(){
ifClassImage1.myform.submit();
}
function uploadClassImage2(){
ifClassImage2.myform.submit();
}
function uploadClassImage3(){
ifClassImage3.myform.submit();
}
// 文件上傳完成時執行,帶入上傳文件名
function UploadSaved(sPathFileName,type){
if(type=="" || type == null || type == "homepageImage"){
displayCtrl('showHomepageImage','uploadHomepageImage');
document.all.homepageImage.src = sPathFileName;
this.cms4jForm.HOMEPAGE_IMAGE.value = sPathFileName;
}else if(type == "articleImage"){
displayCtrl('showArticleImage','uploadArticleImage');
document.all.articleImage.src = sPathFileName;
this.cms4jForm.ARTICLE_IMAGE.value = sPathFileName;
}else if(type == "ClassImage1"){
displayCtrl('showClassImage1','uploadClassImage1');
document.all.imgClassImage1.src = sPathFileName;
this.cms4jForm.inClassImage1.value = sPathFileName;
}else if(type == "ClassImage2"){
displayCtrl('showClassImage2','uploadClassImage2');
document.all.imgClassImage2.src = sPathFileName;
this.cms4jForm.inClassImage2.value = sPathFileName;
}else if(type == "ClassImage3"){
displayCtrl('showClassImage3','uploadClassImage3');
document.all.imgClassImage3.src = sPathFileName;
this.cms4jForm.inClassImage3.value = sPathFileName;
}else if(type == "linkTo"){
displayCtrl('removeLinkToTD','uploadLinkToTable');
this.cms4jForm.LINK_TO_EXTERIOR.value = sPathFileName;
}else{
//否則則為PPTImage
displayCtrl('showPPTImage_'+type,'uploadPPTImage_'+type);
var showObj = eval("document.all.ppt_img_" + type);
showObj.src = sPathFileName;
var valueObj = eval("document.all.ppt_img_value_" + type);
valueObj.value = sPathFileName;
pptImageCount = pptImageCount+1;
document.all.pptImageCountInput.value = pptImageCount-1;
addPPTImage(pptImageCount);
}
}
function reloadHomepageImage(){
this.cms4jForm.HOMEPAGE_IMAGE.value = "";
displayCtrl('uploadHomepageImage','showHomepageImage');
homepage_file.location.href = "../editor/uploadIframe.jsp?type=homepageImage&isUploadWarter=no";
}
function delClassImage1(){
this.cms4jForm.inClassImage1.value = "";
displayCtrl('uploadClassImage1','showClassImage1');
ifClassImage1.location.href = "../editor/uploadIframe.jsp?type=ClassImage1&isUploadWarter=no";
}
function delClassImage2(){
this.cms4jForm.inClassImage2.value = "";
displayCtrl('uploadClassImage2','showClassImage2');
ifClassImage2.location.href = "../editor/uploadIframe.jsp?type=ClassImage2&isUploadWarter=no";
}
function delClassImage3(){
this.cms4jForm.inClassImage3.value = "";
displayCtrl('uploadClassImage3','showClassImage3');
ifClassImage3.location.href = "../editor/uploadIframe.jsp?type=ClassImage3&isUploadWarter=no";
}
function reloadArticleImage(){
this.cms4jForm.ARTICLE_IMAGE.value = "";
displayCtrl('uploadArticleImage','showArticleImage');
article_file.location.href = "../editor/uploadIframe.jsp?type=articleImage&isUploadWarter=no";
}
function submitForm(){
var content = editor.getHTML();
//if(content == null || content == ""){
//alert("請輸入 [內容]");
//return false;
//}
return Validator.Validate(document.cms4jForm,1);
}
//除去 副標相關內容
function unCheckBoxTitle2(){
document.cms4jForm.TITLE2.value="";
document.cms4jForm.TITLE2_COLOR2.value="";
document.cms4jForm.TITLE2_FONT2.value="default";
}
//除去 短標相關內容
function unCheckBoxhomeTitle(){
document.cms4jForm.HOME_TITLE.value="";
document.cms4jForm.TITLE_COLOR2.value="";
document.cms4jForm.TITLE_FONT2.value="default";
}
</script>
<body onLoad="pageInit()">
<form action="../../do?action=modifyArticle&ID=${param.id}" method="post" name="cms4jForm" id="cms4jForm" onSubmit="return submitForm();">
<input name="oldArticleListUrl" type="hidden" value="<%=request.getHeader("Referer")%>">
<input type="hidden" value="1" name="SPECIAL_NAME">
<input name="OK_RETURN_URL" type="hidden" id="OK_RETURN_URL" value="<%=OK_RETURN_URL%>">
<cms4j:article article_id="${param.id}" audit_state="all" audit_level="all" date="all">
<cms4j:article_list>
<script>
//頁面初始化
function pageInit(){
selectInit("ARTICLE_CLASS_ID","<%=article_info.getARTICLE_CLASS_ID()%>"); //所屬欄目
//selectInit("SPECIAL_ID","<%=article_info.getSPECIAL_ID()%>"); //專題
selectInit("TITLE_COLOR","<%=article_info.getTITLE_COLOR()%>"); //標題色彩
selectInit("TITLE_FONT","<%=article_info.getTITLE_FONT()%>"); //標題字體
selectInit("TITLE2_COLOR2","<%=article_info.getTITLE2_COLOR2()%>"); //副標題色彩
selectInit("TITLE2_FONT2","<%=article_info.getTITLE2_FONT2()%>"); //副標題字體
selectInit("TITLE_COLOR2","<%=article_info.getHOME_TITLE_COLOR()%>"); //標題色彩
selectInit("TITLE_FONT2","<%=article_info.getHOME_TITLE_FONT()%>"); //標題字體
selectInit("HOMEPAGE_IMAGE","<%=article_info.getHOMEPAGE_IMAGE()%>"); //首頁圖片
selectInit("PAGINATION_ID","<%=article_info.getPAGINATION_ID()%>"); //翻頁方式
selectInit("FRAME_TEMPLET_ID","<%=article_info.getFRAME_TEMPLET_ID()%>"); //排版模板
selectInit("COLOR_TEMPLET_ID","<%=article_info.getCOLOR_TEMPLET_ID()%>"); //配色模板
selectInit("RESTRICT_ID","<%=article_info.getRESTRICT_ID()%>"); //約束
selectInit("ACTION_ID","<%=article_info.getACTION_ID()%>"); //行為
radioGuoupInit("IS_COMMENT","<%=article_info.getIS_COMMENT()%>"); //是否可評論
radioGuoupInit("RELEASE_STATE","<%=article_info.getRELEASE_STATE()%>"); //發布狀態
checkBoxInit("IS_ONTOP","<%=article_info.getIS_ONTOP()%>"); //固頂
checkBoxInit("IS_COMMEND","<%=article_info.getIS_COMMEND()%>"); //推薦
<%
if(null != article_info.getHOME_TITLE() && !article_info.getHOME_TITLE().equals("")){
%>
checkBoxInit("isShowHomeTitle","true"); //顯示首頁標題
displayCtrl('homeTitleTR','');
<%
}
%>
<%
if(null != article_info.getTITLE2() && !article_info.getTITLE2().equals("")){
%>
checkBoxInit("isShowTitle2","true"); //顯示副標題
displayCtrl('TITLE2TR','');
<%
}
%>
<%
if(null != article_info.getHOMEPAGE_IMAGE() && !article_info.getHOMEPAGE_IMAGE().equals("")){
%>
UploadSaved("<%=article_info.getHOMEPAGE_IMAGE()%>","homepageImage");
<%
}
if(null != article_info.getARTICLE_IMAGE() && !article_info.getARTICLE_IMAGE().equals("")){
%>
UploadSaved("<%=article_info.getARTICLE_IMAGE()%>","articleImage");
<%
}
%>
if(document.cms4jForm.LINK_TO_EXTERIOR.value != ""){
displayCtrl('removeLinkToTD','uploadLinkToTable');
}
//selectInit("EXT_1","<%=article_info.getEXT_1()%>"); //行為
displayCtrlInit("modifyTable","${param.operType}","")
displayCtrlInit("auditTable","${param.operType}","audit");
returnArticle("<%=article_info.getInitBindKeyArticle()%>"); //強制相關文章
}
//aschen add 20060807 多專題文章
function OpenChildWindow() {
var idSelected=document.cms4jForm.SPECIAL_ID.value;
url = 'special_list.jsp?idSelected='+idSelected;
sWidth = '500';
sHeight = '400';
gOpenedWindow = null;
gOpened = false;
var str = "height=" + sHeight + ",innerHeight=" + sHeight;
str += ",width=" + sWidth + ",innerWidth=" + sWidth;
if (window.screen) {
var ah = window.screen.availHeight - 30;
var aw = window.screen.availWidth - 10;
var xc = (aw - sWidth)/2;
var yc = (ah - sHeight) / 2;
str += ",left=" + xc + ",screenX=" + xc;
str += ",top=" + yc + ",screenY=" + yc;
}
str +=",scrollbars=yes";
gOpenedWindow = window.open(url, "window" , str);
}
//設置專題列表
function resetSel(){
var sel = document.getElementById("SPECIAL_SHOW");
sel.options.length=0;
var id=document.cms4jForm.SPECIAL_ID.value;
var name=document.cms4jForm.SPECIAL_NAME.value;
if(id=="1"||id==null||id==""){
return;
}else{
var arrId=new Array();
var arrName=new Array();
arrId=id.split("|");
arrName=name.split("|");
var idValue;
var nameValue;
for(var i=0;i<arrId.length-1;i++){
idValue=arrId[i];
nameValue=arrName[i];
sel.options[sel.options.length] = new Option(nameValue,idValue);
}
}
}
/*判斷是否已經存在某文章id
*articleIDs:已有的文章id字符串 格式:100|200|300
*articleID :要比較的文章id
*/
function isHasArticleID(articleIDs,articleID){
if(articleIDs=="")
return false;
var articleIDArray = articleIDs.split("|");
for(var m=0;m<articleIDArray.length;m++)
if(articleIDArray[m]==articleID)
return true;
return false;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -