<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-2-26 下午2:37:49  
    $Revision: 1.0  
    $Purpose: layoutCopyScreen
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="bmLink_copyLayout" model="hls.HLS030.hls_doc_layout" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
        
        function layoutCopyScreen_close()
        {
            $('hls_doc_layout_copy').close();
        }
        
        function layoutCopyScreen_save() 
        {
            var ds = $('layoutCopyDs');
            if (ds.validate()) {
                var record=ds.getAt(0);
                Leaf.request({
                    url: $('bmLink_copyLayout').getUrl(),
                    para: {
                        from:record.get('layout_code'),
                        to:record.get('new_layout_code'),
                        to_desc:record.get('new_layout_desc')
                    },
                    success: function(res) {
                        layoutCopyScreen_close();
                        layoutScreen_query();
                    },
                    failure: function() {
                    },
                    error: function() {
                    },
                    scope: this
                });
            }
        }
        
        ]]></script>
        <a:dataSets>
            <a:dataSet id="layoutCopyDs" loadData="true" model="hls.HLS030.hls_doc_layout">
                <a:fields>
                    <a:field name="layout_code" readOnly="true"/>
                    <a:field name="description" readOnly="true"/>
                    <a:field name="new_layout_code" required="true"/>
                    <a:field name="new_layout_desc" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="layoutCopyScreen_close" text="HLS.CLOSE"/>
                <a:gridButton click="layoutCopyScreen_save" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:form column="2" title=" ">
                <a:textField name="layout_code" bindTarget="layoutCopyDs" prompt="源布局代码"/>
                <a:textField name="description" bindTarget="layoutCopyDs" prompt="描述"/>
                <a:textField name="new_layout_code" bindTarget="layoutCopyDs" prompt="布局代码"/>
                <a:textField name="new_layout_desc" bindTarget="layoutCopyDs" prompt="描述"/>
            </a:form>
        </a:screenBody>
    </a:view>
</a:screen>
