<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-7-23 下午06:45:00  
    $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_link" url="${/request/@context_path}/modules/hls/HLS031/hls_doc_layout_button_add.lview"/>
        <a:link id="hls031_doc_layout_button_detail_link" url="${/request/@context_path}/modules/hls/HLS031/hls_doc_layout_button_detail.lview"/>
        <script type="text/javascript"><![CDATA[
            function hls031_add() {
                new Leaf.Window({
                    id: 'hls031_doc_layout_button_add_window',
                    url: $('hls031_doc_layout_button_add_link').getUrl(),
                    title: '${l:HLS031.LAYOUT_BUTTON_CONFIG}',
                    height: 200,
                    width: 300
                });
            }
            
            function hls031_result_detail_open(function_code) {
                new Leaf.Window({
                    id: 'hls031_doc_layout_button_detail_window',
                    url: $('hls031_doc_layout_button_detail_link').getUrl() + '?flag=true&function_code=' + function_code,
                    title: '${l:HLS031.LAYOUT_BUTTON_CONFIG_DETAIL}',
                    fullScreen: true
                });
            }
            
            function hls031_result_gird_render(value, record, name) {
                return '<a href="javascript:hls031_result_detail_open(\'' + record.get('function_code') + '\')">${l:HLS031.BUTTON_CONFIG}</a>';
            
            }
            
            function hls031_query() {
                $('hls031_function_result_ds').query();
            }
            
            function hls031_reset() {
                $('hls031_function_query_ds').reset();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls031_function_query_ds"/>
            <a:dataSet id="hls031_function_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS031.hls_doc_layout_button_function_query" queryDataSet="hls031_function_query_ds"/>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:toolbarButton click="hls031_add" text="HLS.NEW" width="80"/>
                <a:toolbarButton click="hls031_query" text="HLS.QUERY" width="80"/>
                <a:toolbarButton click="hls031_reset" text="HLS.RESET" width="80"/>
            </a:screenTopToolbar>
            <a:form column="2">
                <a:textField name="function_code" bindTarget="hls031_function_query_ds" prompt="SYS8010.SYS_FUNCTION.FUNCTION_CODE" typeCase="upper"/>
                <a:textField name="function_name" bindTarget="hls031_function_query_ds" prompt="SYS8010.SYS_FUNCTION.FUNCTION_NAME"/>
            </a:form>
            <a:grid id="hls031_result_gird_id" bindTarget="hls031_function_result_ds" marginHeight="180" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="function_code" prompt="SYS8010.SYS_FUNCTION.FUNCTION_CODE" width="200"/>
                    <a:column name="function_name" prompt="SYS8010.SYS_FUNCTION.FUNCTION_NAME" width="250"/>
                    <a:column name="button_config" align="center" prompt="HLS031.BUTTON_CONFIG" renderer="hls031_result_gird_render" width="150"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
