📄 articlemanag.jsp
字号:
<%@ include file = "../tiles/include.jsp"%><center><bean:define id="title">
<bean:message key="article.title"/>
</bean:define><gui:window title="<%=title%>" prototype="boWindow" color="100%"><% String tab = request.getParameter("webGUI.tabbedPanel.tab"); if (Util.isNull(tab)) tab = "tab1";%><gui:tabbedPanel prototype = "boTabbedPanel" followUp = "usermanag.jsp" color = "#f0f0f0" selectedTab = "<%=tab %>" width="66"><!--********************* add article ******************************************--><bean:define id="tab1_title">
<bean:message key="article.add"/>
</bean:define> <gui:tab prototype="boTab" name="tab1" title="<%=tab1_title%>" followUp="./articleManager.do?method=load4Add"> <html:form action="addArticleAction?method=create" enctype="multipart/form-data" onsubmit="saveForm();return validateArticleForm(this);"> <html:errors/> <table class="win" CELLPADDING="0" CELLSPACING="0" width="100%"> <tr> <td><bean:message key="article.catalog"/></td> <td><html:select property="artCatalog"> <logic:present name="catalogtree" scope="request"> <html:options collection="catalogtree" labelProperty="catalogTitle" property="catalogId"/> </logic:present> </html:select></td> </tr> <tr> <td><bean:message key="article.name"/></td> <td><html:text property="article.artTitle" size="40" maxlength="50"/></td> </tr> <tr> <td><bean:message key="article.dist"/></td> <td><html:text property="article.artDist" size="40" maxlength="50"/></td> </tr> <tr> <td><bean:message key="article.uploadFile"/></td> <td><select class="TBGen" name="SelectFile" style="width:200"></select><button onclick="DelFiletoSelect()"><bean:message key="button.delete"/></button><span id="AffixFile"> <span><input style="width:10px;" name="affixs" type="file" onpropertychange="AddFiletoSelect(this)"></span></span></td> </tr> <tr> <td><bean:message key="article.content"/></td> <td> <bean:message key="article.hot"/> <html:checkbox property="article.hot" value="Y"/> <bean:message key="article.image"/> <html:checkbox property="article.artImage" value="Y"/> <html:textarea property="article.artContent" style="width:1px;height:1px;" onfocus="editor.HtmlEdit.focus();"></html:textarea ></td> </tr> <tr> <td colspan="2"><!-- <OBJECT id="content" style="LEFT: 0px; TOP: 0px" data=pages/editor/editor.html width=100% height=320 type=text/x-scriptlet VIEWASTEXT> </OBJECT> --> <iframe ID="editor" src="./editor.jsp" frameborder="0" scrolling=no width="100%" height="405"></iframe> </td> </tr> <tr> <td COLSPAN="2" ALIGN="RIGHT"> <html:submit styleClass="button"><bean:message key="button.save"/></html:submit> <html:cancel styleClass="button"><bean:message key="button.cancel"/></html:cancel> </td> </tr> </table> <html:hidden property="article.artId"/> </html:form> </gui:tab><!--********************* edit article ******************************************--><bean:define id="tab2_title"><bean:message key="article.edit"/></bean:define> <gui:tab prototype="boTab" name="tab2" title="<%=tab2_title%>" followUp="./articleManager.do?method=loadAll&action2=edit"> edit article </gui:tab></gui:tabbedPanel></gui:window></center><html:javascript formName="articleForm" dynamicJavascript="true" staticJavascript="false"/> <SCRIPT LANGUAGE="JavaScript">var i = 0; function AddFiletoSelect(aoFile){ if ((aoFile==null)||(aoFile.value=="")) return; var loOpts = document.all.articleForm.SelectFile.options; loOpts[loOpts.length] = new Option(aoFile.value,aoFile.uniqueID); aoFile.parentElement.style.display = "none"; var loObj = document.createElement("span"); loObj.innerHTML = '<input style="width:10" name="affixs'+(i++)+'" type="file" onpropertychange="AddFiletoSelect(this)">'; AffixFile.insertBefore(loObj); } function DelFiletoSelect(){ loEL = document.all(articleForm.SelectFile.value); if (loEL!=null){ loEL = loEL.parentElement; AffixFile.removeChild(loEL); } var loOpts = document.all.articleForm.SelectFile.options; if(loOpts!=null&&loOpts.length>0){ loSel = loOpts[document.all.articleForm.SelectFile.selectedIndex] loOpts.removeChild(loSel); } }function saveForm(){ if (editor.EditMode.checked==true) document.forms[0].elements["article.artContent"].value=editor.HtmlEdit.document.body.innerText; else document.forms[0].elements["article.artContent"].value=editor.HtmlEdit.document.body.innerHTML; }function loadForm(){ editor.HtmlEdit.document.body.innerHTML=document.forms[0].elements["article.artContent"].value; return true} setTimeout('loadForm()',2000);</SCRIPT>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -