hls_doc_layout_copy.lview 2.6 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
<?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>