<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-7-23 下午07:30:13  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="hls031_doc_layout_button_add_detail_link" url="${/request/@context_path}/modules/hls/HLS031/hls_doc_layout_button_detail.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls031_add_function_close() {
                $('hls031_doc_layout_button_add_window').close();
            }
            
            function hls031_add_function_ok() {
                var ds = $('hls031_add_function_ds');
                if (ds.validate()) {
                    var url = $('hls031_doc_layout_button_add_detail_link').getUrl();
                    var function_code = ds.getAt(0).get('function_code');
                    Leaf.go(url + '?function_code=' + function_code);
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls031_add_function_ds" autoCreate="true">
                <a:fields>
                    <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_name" to="function_name"/>
                            <a:map from="function_code" to="function_code"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenTopToolbar>
            <a:toolbarButton click="hls031_add_function_close" text="HLS.CLOSE" width="80"/>
            <a:toolbarButton click="hls031_add_function_ok" text="HLS.CONFIRM" width="80"/>
        </a:screenTopToolbar>
        <a:form height="150" width="250">
            <a:vBox labelSeparator=" ">
                <a:lov name="function_code" bindTarget="hls031_add_function_ds" prompt="SYS8010.SYS_FUNCTION.FUNCTION_CODE" width="150"/>
                <a:textField name="function_name" bindTarget="hls031_add_function_ds" prompt="SYS8010.SYS_FUNCTION.FUNCTION_NAME" width="150"/>
            </a:vBox>
        </a:form>
    </a:view>
</a:screen>
