<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-8-29 上午11:05:48  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="hls030_doc_layout_tab_button_detail" url="${/request/@context_path}/modules/hls/HLS030/hls_doc_layout_tab_button_detail.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls031_tab_button_add_function_ok() {
                var ds = $('hls031_tab_button_add_function_ds');
                if (ds.validate()) {
                    var record = ds.getAt(0);
                    new Leaf.Window({
                        id: 'hls030_doc_layout_tab_button_detail_window',
                        url: $('hls030_doc_layout_tab_button_detail').getUrl(),
                        params: {
                            layout_code: '${/parameter/@layout_code}',
                            layout_desc: '${/parameter/@layout_desc}',
                            function_code: record.get('function_code'),
                            function_name: record.get('function_name'),
                            tab_code: record.get('tab_code'),
                            tab_desc: record.get('tab_desc')
                        },
                        title: '${l:HLS031.LAYOUT_BUTTON_CONFIG_DETAIL}',
                        fullScreen: true
                    });
                    $('hls030_doc_layout_tab_button_add_window').close();
                }
            }
            
            function hls031_tab_button_add_function_close() {
                $('hls030_doc_layout_tab_button_add_window').close();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls031_tab_button_add_function_ds" autoCreate="true">
                <a:fields>
                    <a:field name="layout_code" defaultValue="${/parameter/@layout_code}" prompt="HLS030.HLS_DOC_LAYOUT.LAYOUT_CODE" readOnly="true"/>
                    <a:field name="layout_desc" defaultValue="${/parameter/@layout_desc}" prompt="HLS.DESCRIPTION" readOnly="true"/>
                    <a:field name="function_name" readOnly="true"/>
                    <a:field name="function_code" autoComplete="true" autoCompleteField="function_code" lovGridHeight="300" lovHeight="460" lovService="hls.HLS030N.hls_doc_layout_button_add" lovWidth="480" required="true" title="功能选择">
                        <a:mapping>
                            <a:map from="function_id" to="function_id"/>
                            <a:map from="function_name" to="function_name"/>
                            <a:map from="function_code" to="function_code"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="tab_code" lovGridHeight="300" lovHeight="450" lovService="hls.HLS030.hls_doc_layout_tab_lov?layout_code=${/parameter/@layout_code}" lovWidth="500" required="true" title="HLS030.HLS_DOC_LAYOUT_TAB.TAB_CODE">
                        <a:mapping>
                            <a:map from="tab_code" to="tab_code"/>
                            <a:map from="tab_desc" to="tab_desc"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="tab_desc" readOnly="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenTopToolbar>
            <a:toolbarButton click="hls031_tab_button_add_function_close" text="HLS.CLOSE" width="80"/>
            <a:toolbarButton click="hls031_tab_button_add_function_ok" text="HLS.CONFIRM" width="80"/>
        </a:screenTopToolbar>
        <a:form width="550">
            <a:hBox labelSeparator=" " labelWidth="100">
                <a:textField name="layout_code" bindTarget="hls031_tab_button_add_function_ds" width="150"/>
                <a:textField name="layout_desc" bindTarget="hls031_tab_button_add_function_ds" width="150"/>
            </a:hBox>
            <a:hBox labelSeparator=" " labelWidth="100">
                <a:lov name="function_code" bindTarget="hls031_tab_button_add_function_ds" prompt="SYS8010.SYS_FUNCTION.FUNCTION_CODE" width="150"/>
                <a:textField name="function_name" bindTarget="hls031_tab_button_add_function_ds" prompt="SYS8010.SYS_FUNCTION.FUNCTION_NAME" width="150"/>
            </a:hBox>
            <a:hBox labelSeparator=" " labelWidth="100">
                <a:lov name="tab_code" bindTarget="hls031_tab_button_add_function_ds" prompt="HLS030.HLS_DOC_LAYOUT_TAB.TAB_CODE"/>
                <a:textField name="tab_desc" bindTarget="hls031_tab_button_add_function_ds" prompt="HLS030.HLS_DOC_LAYOUT_TAB.TAB_DESC"/>
            </a:hBox>
        </a:form>
    </a:view>
</a:screen>
