-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
executable file
·44 lines (39 loc) · 1.35 KB
/
app.js
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
define(function(require, exports, module) {
"use strict";
var mainController = require('./main/src/controller');
if(!seajs.config.data.development){
require.async('./resources/css/module-min.css');
}
// 页头页脚展现
$('header').animate({top: '0px'},'fast');
$('footer').animate({bottom: '0px'},'fast');
// 加载loading图标
var loadingDiv = [
'<div id="loading">',
'<div class="loading-info">',
'<div class="loading-text">',
'系统正在加载中,请稍候...',
'</div>',
'<div class="loading-ajax"></div>',
'</div>',
'</div>'
].join('');
$(loadingDiv).appendTo(document.body);
// leftView和centerView高度控制
var clientHeight;
if(navigator.userAgent.indexOf("MSIE") != -1){
clientHeight = document.documentElement.offsetHeight;
} else {
clientHeight = document.body.scrollHeight;
}
$(window).bind("resize", function(){
$('.left-view').css('height', clientHeight - 90);
$('.center-view').css('height', clientHeight - 90);
});
$('.left-view').css('height', $('#loading').height() - 90);
$('.center-view').css('height', $('#loading').height() - 90);
$('#app-content').css('height', $('#loading').height() - 120);
$('#home-content').css('height', $('#loading').height() - 95);
// 主框架开始加载
mainController.launch();
});