<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author:  Yimeng
    $Date: 2015-02-13 下午01:58:31  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="con550_context_list_query" model="cont.CON550.con_context_list_update" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
         	//锁屏
            window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'] = function() {
                var detail_mask;
                if ('${/parameter/@winid}') {
                    if (parent.$L.CmpManager.get('${/parameter/@winid}')) {
                        detail_mask = parent.$('${/parameter/@winid}').wrap;
                        parent.Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
                    } else {
                        detail_mask = $('${/parameter/@winid}').wrap;
                        Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
                    }
                } else {
                    detail_mask = Ext.getBody();
                    Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
                }
            };
            //解屏
            window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'] = function() {
                var detail_mask;
                if ('${/parameter/@winid}') {
                    if (parent.$L.CmpManager.get('${/parameter/@winid}')) {
                        detail_mask = parent.$('${/parameter/@winid}').wrap;
                        parent.Leaf.Masker.unmask(detail_mask);
                    } else {
                        detail_mask = $('${/parameter/@winid}').wrap;
                        Leaf.Masker.unmask(detail_mask);
                    }
                } else {
                    detail_mask = Ext.getBody();
                    Leaf.Masker.unmask(detail_mask);
                }
                if (Ext.get(document.documentElement)) {
                    $L.Masker.unmask(Ext.get(document.documentElement));
                }
            };
        
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_export_temp');
                window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
                Leaf.request({
                    url:$('con550_context_list_query').getUrl(),
                    para:{},
                    success:function(){
                		window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                		$(ds_id).query();
                		},
                    scope:this
                });
            };
            
            window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_export_temp');
                var grid_id = ds_id.replace('ds', 'layout_grid_id');
                $(grid_id)._export();
            };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>
