default.tplt 3.82 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${page:title}</title>
<meta name="_csrf" content="${/session/@_csrf.token}"/>
<meta name="_csrf_header" content="X-CSRF-TOKEN" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
${page:html.head.css} 
${page:html.head.script}
<script src="${page:contextPath}/javascripts/leaf-plugin.js" type="text/javascript"></script>
<script src="${page:contextPath}/javascripts/calculate.js" type="text/javascript"></script>
<style type="text/css">
	.query-form {
	    border:1px solid #ccc;
	    margin-bottom:10px;
	    -webkit-radius:0px;
	    border-radius:0px;
	    -moz-box-shadow:none;
	    -webkit-box-shadow:none;
	    box-shadow:none;
	}
	.query-form  .query_form_head {
    	padding:5px;
    	background: url(${page:contextPath}/resource/leaf.ui.std/default/grid/grid_bg.gif) repeat-x;
    	-webkit-radius:0px;
    	border-radius:0px;
    	color:#000;
	}
	.query-form .form_body_wrap {
	    padding:5px;
	    position:absolute;
	    background-color:#fcfcfc;
	    border:1px solid #ccc;
	    z-index:21;
	    background-color: #eff0ef;
	    -webkit-radius:0px;
	    border-radius:0px;
	    -moz-box-shadow:none;
	    -webkit-box-shadow:none;
	    box-shadow:none;
	}
	.cell-editor-div{
		display:none;
	}
</style>
</head>
<body>
    <script type="text/javascript">
    	/**
    	超时标志,具体操作过程为:
    	1.在default.tplt中注册timeout事件
    	2.超时时调用main.screen的showlogin方法并设置isTimeout为true
    	3.用户在login_timeout.screen输入密码,如果成功则将isTimeout重新设置为false
    	**/
    	var isTimeout = false;
        function checkFrame(){
	    	Leaf.Status.enable = false;
			Leaf.SideBar.enable = true;
            if(parent && parent.unionKey == "hap_main"){                
            }else{
                //window.location.href = '${page:contextPath}/error_wrong_entrance.lview';
            }
        }

        checkFrame();
        if(parent && parent.ajaxSuccessFunction){
			Ext.Ajax.on('requestcomplete',parent.ajaxSuccessFunction);        
        }
        
        function isIpad() {
            var ua = navigator.userAgent.toLowerCase();
            if (ua.match(/iPad/i) == "ipad") {
                return true;
            } else {
                return false;
            }
        }
        
        Leaf.manager.on('timeout',function(){
            if(top&& top.showlogin && !isTimeout){
 				isTimeout = true;
            	top.showlogin();    
            }
            return false;
        });
        
        Ext.get(document.documentElement).on('click',function(el)
        {
            if(parent && parent != self && parent.hideCurrentMenu)
            {
            	parent.hideCurrentMenu();
            }
        });

        jQuery(window).click(function(e){
            var fastButton = $jq(top.document.getElementById("fastButton"));
            var menuButton = $jq(top.document.getElementById("notice_menu"));
            if(fastButton.css("display") != 'none'){
                top.jQuery("#fast-menu-toolbar").css("background","none");
                top.jQuery(".fast_toolbar").animate({height:"0px"},function(){
                    top.jQuery(".fast_toolbar").hide();
                });
            }
           if(menuButton.css("display") != 'none'){
             top.jQuery("#notice_menu").animate({height:"0px"},function(){
                                 top.jQuery("#notice_menu").hide();
                             });
           }
        });
    </script>
    <div></div>
	${page:init}
	${page:content}
	<input type="hidden" class="logLink" screen="${/@service_name}" value="viewlog?file=${/@SERVICE_LOGGING_FILE}"/>	
</body>
</html>