2018-06-03 22:26:41 +08:00

45 lines
1.8 KiB
Plaintext

<%@page import="jbo.sys.BOARD_LIST"%>
<%@ page contentType="text/html; charset=GBK"%>
<%@ include file="/IncludeBegin.jsp"%><%
String boardNo = CurPage.getParameter("BoardNo");
BizObjectManager boardManager = JBOFactory.getBizObjectManager(BOARD_LIST.CLASS_NAME);
BizObject board = boardManager.createQuery("boardno=:boardno ").setParameter("boardno",boardNo).getSingleResult(false);
String boardText = board.getAttribute("boardtext").getString();
String[][] sButtons = {
{"true","","Button","保存正文","保存正文","saveRecord()","","","","btn_icon_save"},
{"true","","Button","返回","返回列表页面","goBack()","","","","btn_icon_return",""}
};
%>
<%@ include file="/Frame/resources/include/ui/include_buttonset_dw.jspf"%>
<body >
<form name="boardtext" >
<textarea ID="txtContent" rows="10" cols="100" >
</textarea>
</form>
</body>
<script type="text/javascript">
$(document).ready(function(){
bkLib.onDomLoaded(function() {
new nicEditor({ fullPanel: true,iconsPath: '<%=sWebRootPath%>/Frame/resources/js/niceditor/nicEditorIcons.gif' }).panelInstance('txtContent');
$('.nicEdit-main').css('overflow','scroll');
$('.nicEdit-main').css('height','350px');
$('.nicEdit-main').html('<%=boardText%>');
});
});
function saveRecord(){
var boardInfoText =$('.nicEdit-main').html();
boardInfoText = boardInfoText.replace(/\=/g,"^^");
boardInfoText = boardInfoText.replace(/\,/g,'|');
var sResult = AsControl.RunJavaMethodTrans("com.tenwa.lease.app.board.BoardTextController", "saveBoardContext", 'CurUserID=<%=CurUser.getUserID()%>,boardNo=<%=boardNo%>,boardText='+boardInfoText);
if(sResult=='success'){
alert("保存成功");
}
}
function goBack(){
parent.AsDialog.ClosePage();
}
</script>
<%@ include file="/IncludeEnd.jsp"%>