Index: ssts-web/src/main/webapp/js/common.js =================================================================== diff -u -r33856 -r34209 --- ssts-web/src/main/webapp/js/common.js (.../common.js) (revision 33856) +++ ssts-web/src/main/webapp/js/common.js (.../common.js) (revision 34209) @@ -4794,4 +4794,63 @@ recallTousseColumnTree.columns[i].width = parseInt(recallTousseColumnTreeColumn[i] * widthRadio); } } +} + +//显示富文本编辑器 +function showWangEditor(title, id) { + var url = WWWROOT + '/common/wangEditor.jsp?id=' + id; + var win = new top.Ext.Window({ + title: title + '配包注意事项编辑器', + width: 1000, + height: 600, + autoScroll: false, + isTopContainer: true, + modal: true, + resizable: false, + buttonAlign: 'center', + items: [{ + xtype: "panel", + id: "index", + html: "" + }], + buttons: [{ + text: '预览', + handler: function () { + previewWangEditor(title); + } + }, { + text: '保存', + handler: function () { + top.document.getElementById('wangEditorIframe').contentWindow.document.getElementById('btn').click(); + setTimeout(function () { + var html = top.document.getElementById('wangEditorIframe').contentWindow.document.getElementById('getHtml').value; + top.Ext.getCmp('note').setValue(html); + }, 1000); + } + }, { + text: '保存并关闭', + handler: function () { + top.document.getElementById('wangEditorIframe').contentWindow.document.getElementById('btn').click(); + top.Ext.MessageBox.wait('保存中,请稍候……', '请等待'); + setTimeout(function () { + var html = top.document.getElementById('wangEditorIframe').contentWindow.document.getElementById('getHtml').value; + top.Ext.getCmp('note').setValue(html); + hideMessageBox(true); + win.close(); + }, 1000); + } + }, { + text: '取消', + handler: function () { + win.close(); + } + }] + }) + win.show(); +} + +//预览富文本内容 +function previewWangEditor(title) { + var url = WWWROOT + '/common/previewWangEditor.jsp'; + openModalWindowForExt(url, {}, title + '配包注意事项', 1000, 600); } \ No newline at end of file