dojo loading over lay



<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Demo: Loading Overlay</title>
<!--<link rel="stylesheet" href="../../../resources/style/demo.css" media="screen">
<link rel="stylesheet" href="style.css" media="screen">
<link rel="stylesheet" href="layout.css" media="screen">
-->
<link rel="stylesheet" href="../dojolib/dijit/themes/claro/claro.css" media="screen">
<!-- load dojo and provide config via data attribute -->
<script src="../dojolib/dojo/dojo.js" data-dojo-config="isDebug: true, async: true, parseOnLoad:true"></script>
<style type="text/css">
* {
outline: none !important;
}

body {
margin: 0;
padding: 2em;
font-family: Lucida Sans,Lucida Grande,Arial !important;
font-size: 13px !important;
background: white;
color: #333;
}

button {
-webkit-transition: background-color 0.2s linear;
border-radius:4px;
-moz-border-radius: 4px 4px 4px 4px;
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
background-color: #E4F2FF;
background-image: url("../dojolib/dijit/themes/claro/form/images/button.png");
background-position: center top;
background-repeat: repeat-x;
border: 1px solid #769DC0;
padding: 2px 8px 4px;
font-size:1em;
}

button:hover {
background-color: #AFD9FF;
color: #000000;
}

h1 {
font-size:1.5em;
}

.break
{
float:none;
clear:both;
}

html, body {
height: 100%;
margin: 0;
overflow: hidden;
padding: 0;
}

.pageOverlay {
top: 0;
left: 0;
position: absolute;
height: 100%;
width: 100%;
z-index: 1001;
display: block;
}

#loadingOverlay {
background: #fff url('../dojolib/dijit/themes/claro/images/loadingAnimation.gif') no-repeat 10px 23px;
}

.loadingMessage {
padding: 25px 40px;
color: #999;
}


#appLayout {
height: 100%;
}
#leftCol {
width: 14em;
}

.claro .demoLayout .edgePanel {
background-color: #d0e9fc;
}


</style>
</head>
<body class="claro">
<div id="loadingOverlay" class="loadingOverlay pageOverlay">页面加载中,请稍候。。。</div>
<script>
// demo is the object used to control the loading effects
var demo;
require(["dojo/dom-style", "dojo/_base/fx", "dojo/_base/declare", "dijit/registry", "dojo/dom"],
function(domStyle, fx, declare, registry, dom){
var Demo = declare(null,{
overlayNode:null,

// store a reference to the overlay node
constructor:function(){
this.overlayNode = dom.byId('loadingOverlay');
},

// called to hide the loading overlay
endLoading: function()
{
// fade the overlay gracefully
fx.fadeOut({
node: this.overlayNode,
onEnd: function(node){
domStyle.set(node, 'display', 'none');
}
}).play();
}
});
demo = new Demo();
});

// require layout widgets
require(["dojo/_base/lang", "dojo/domReady!",
"dijit/layout/BorderContainer",
"dijit/layout/TabContainer",
"dijit/layout/ContentPane"],
function(lang){
// layout is ready, hide the loading overlay
demo.endLoading();
// initialize the editor, after a half-second delay for older browsers
// page is ready to run
});
</script>
<div id="appLayout" class="demoLayout" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design: 'headline'">
<div class="edgePanel" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top'">
<h1>Demo: Loading Overlay</h1>
</div>
<div class="centerPanel" data-dojo-type="dijit/layout/TabContainer" id="tabs" data-dojo-props="region: 'center', tabPosition: 'bottom'">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="title: 'Group 1'">
<h4>Group 1 Content</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="title: 'Group Two'">
<h4>Group 2 Content</h4>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="title: 'Long Tab Label for this One'">
<h4>Group 3 Content</h4>
</div>
</div>
<div id="leftCol" class="edgePanel" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'left', splitter: true">Sidebar content (left)</div>
</div>
</body>
</html>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值