<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-11-26 下午04:33:04  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:c="leaf.application.action" xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="fnd.FND501.fnd_regulatory_fm_picture" rootPath="regulatory_pic_rp"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
			var contentEditor_pic;
            Leaf.onReady(function() {
                var K = KindEditor;
                contentEditor_pic = K.create('textarea[id="regulatory_framework_pic_id"]', {
                    allowFileManager : false,
                    uploadJson : '${/request/@context_path}/kindeditor/jsp/upload_json.jsp',
                    items : [
							'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'cut', 'copy', 'paste',
							'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
							'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
							'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
							 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
							'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
							'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'map', 'code', 'pagebreak', 'anchor', 'link', 'unlink', '|', 'about'
						]
                 });
            });
            
            function fnd_regulatory_pic_back(){
                $('fnd_regulatory_picture_win').close();
            }
            
            function fnd_regulatory_pic_save(){
                var ds = $('fnd_regulatory_pic_ds');
                var record = ds.getCurrentRecord();
                record.set('regulatory_framework_pic',contentEditor_pic.html());
                ds.submit();
            }
            
            function fnd_regulatory_pic_submit_success(ds)
            {
                Leaf.showInfoMessage('${l:PROMPT}','${l:FND501.SAVE_SUCCESS}');
            }
		
		]]></script>
        <a:dataSets>
            <a:dataSet id="fnd_regulatory_pic_ds" autoQuery="true" fetchAll="true" model="fnd.FND501.fnd_regulatory_fm_picture" queryUrl="${/request/@context_path}/autocrud/fnd.FND501.fnd_regulatory_fm_picture/query?regulatory_framework_id=${/parameter/@regulatory_framework_id}&amp;picture_code=${/parameter/@picture_code}">
                <a:datas dataSource="/model/regulatory_pic_rp"/>
                <a:fields>
                    <a:field name="regulatory_framework_pic"/>
                    <a:field name="regulatory_framework_id"/>
                </a:fields>
                <a:events>
                    <a:event name="submitsuccess" handler="fnd_regulatory_pic_submit_success"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="fnd_regulatory_pic_back" text="HLS.CLOSE"/>
                <a:gridButton click="fnd_regulatory_pic_save" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:textArea name="regulatory_framework_pic" id="regulatory_framework_pic_id" bindTarget="fnd_regulatory_pic_ds" marginHeight="170" marginWidth="50" prompt=""/>
        </a:screenBody>
    </a:view>
</a:screen>