<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:c="leaf.application.action" xmlns:w="leaf.plugin.export.word" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" trace="true">
    <a:init-procedure>
        <a:model-update model="cont.CON500.con_contract_update_fnd_atm_access_token"/>
        <a:model-query fetchAll="true" model="cont.CON500.con_contract_update_fnd_atm_access_token" rootPath="atm_access_token"/>
    </a:init-procedure>
    <a:view>
        <a:dataSets>
            <a:dataSet id="temp"/>
        </a:dataSets>
        <iframe id="mainFrame2" border="0" frameborder="0" marginheight="50px" onload=" var body; if(mainFrame2.document){body=mainFrame2.document.body;}else{body=mainFrame2.contentWindow.document.body} this.height=body.scrollHeight;this.width=body.scrollWidth" scrolling="no" style="display:block;left:0px" width="100%"/>
        <script type="text/javascript"><![CDATA[
            function initSize() {
                var topBarHeight = 71;
                var treeWidth = 10;
                var screenWidth = Leaf.getViewportWidth();
                var screenHeight = Leaf.getViewportHeight();
                var bottomHeight = screenHeight - topBarHeight;
                var bottomWidth = screenWidth - treeWidth;
                Ext.get('mainFrame2').setHeight(bottomHeight);
                Ext.get('mainFrame2').setWidth(bottomWidth);
            }
            initSize();
            var server = 'http://172.20.0.115:9099/hls_latest/wopi/files/' + '${/parameter/@attachment_id}';
            var params = encodeURIComponent(server);
            // var url = 'http://owa.hand-china.com/wv/wordviewerframe.aspx?WOPISrc=' + params + '&access_token=' + '${/model/atm_access_token/record/@access_token}' + '&edit=1';
            var url = 'http://owa.hand-china.com/wv/wordviewerframe.aspx?WOPISrc=' + params + '&access_token=' + '${/model/atm_access_token/record/@access_token}';
            document.getElementById('mainFrame2').src = url;
        ]]></script>
    </a:view>
</a:screen>
