<?xml version="1.0" encoding="UTF-8"?>
<!--
	&author:DJ
	$date:2013/11/12
	$purpose:短信发送
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.notice_msg_id = ${/parameter/@notice_msg_id}" model="sys.SYS100.sys_notice_msg_html" rootPath="mail_body"/>
    </a:init-procedure>
    <a:view>
        <script charset="utf-8" src="${/request/@context_path}/kindeditor/kindeditor-min.js" type="text/javascript"/>
        <script charset="utf-8" src="${/request/@context_path}/kindeditor/lang/zh_CN.js" type="text/javascript"/>
        <script type="text/javascript"><![CDATA[
        	var mailEditorList = [];
        	
            function mailEdit_create(list) {
                var k = KindEditor;
            
                var config = {
                    width: '1050px',
                    height: '450px',
                    resizeType: 0,
                    allowPreviewEmoticons: false,
                    allowImageUpload: false,
                    items: ['undo', 'redo', '|', 'cut', 'copy', 'paste', 'plainpaste', '|', 'preview', 'print', '|', 'insertorderedlist', 'insertunorderedlist', '|', 'table', 'link', 'unlink', 'pagebreak', 'hr', '|', '/', 'fontname', 'fontsize', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', '|', 'lineheight', 'justifyleft', 'justifycenter', 'justifyright', 'indent', 'outdent', '|', 'selectall', 'removeformat', '|']
                };
            
                for (var i = 0;i < list.length;i++) {
                    list[i]['value'] = k.create('textarea[id="' + list[i]['name'] + '"]', config);
                    list[i]['value'].readonly(true);
                    list[i]['value'].toolbar.div.hide();
                }
            }
        
	        function mailEditorClear()
	        {
	            var list = mailEditorList;
			                
                for (var i=0;i < list.length;i++)
                {
                    list[i]['value'].html('');
                }
	        }
	        
		]]></script>
        <a:dataSets>
            <a:dataSet id="mailBodyDs">
                <a:datas dataSource="/model/mail_body"/>
                <a:fields><![CDATA[
                ]]></a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:form height="500" title=" " width="1100">
                <a:textArea name="body" id="body" bindTarget="mailBodyDs" prompt="正文"/>
            </a:form>
            <script type="text/javascript"><![CDATA[
	            Leaf.onReady(function(K) {
	            
	                var list = mailEditorList;
	            
	                list[0] = {
	                    name: 'body'
	                };
	            
	                mailEdit_create(list);
	            
	            });
            ]]></script>
        </a:screenBody>
    </a:view>
</a:screen>
