-
Notifications
You must be signed in to change notification settings - Fork 8
/
mgtest.html
92 lines (72 loc) · 3.46 KB
/
mgtest.html
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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0.5">
<!-- title and icon -->
<title>MG-RAST</title>
<link rel="icon" href="images/MGRAST_favicon.ico" type="image/x-icon">
<!-- default js -->
<script src="Retina/js/jquery.min.js"></script>
<script src="Retina/js/stm.js"></script>
<script src="Retina/js/retina.js"></script>
<script src="Retina/js/bootstrap.min.js"></script>
<!-- config -->
<script src="js/config.js"></script>
<!-- bootstrap style -->
<link rel="stylesheet" type="text/css" href="Retina/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="Retina/css/bootstrap-responsive.min.css">
<link rel="stylesheet" type="text/css" href="css/mgrast.css">
<link rel="stylesheet" type="text/css" href="Retina/css/notebook.css">
<!-- webapp initialization -->
<script>
jQuery( document ).ready(function(){
stm.init({});
Retina.init({});
Retina.load_widget("mgtest").then( function() {
var mgt = Retina.Widget.create("mgtest", { "main": document.getElementById("content"), "sidebar": document.getElementById("sidebar")});
});
Retina.load_widget({"name": "login", "resource": "Retina/widgets"}).then( function() {
var loginAction = function (data) {
if (data.action != "logout" && data.result == "success") {
stm.user = data.user;
stm.authHeader = { "Authorization": "mgrast "+data.token};
} else {
stm.user = null;
stm.authHeader = {};
}
};
Retina.Widget.create('login', { "target": document.getElementById("login_space"),
"callback": loginAction });
});
});
</script>
</head>
<body style="padding: 0px;">
<!-- header bar -->
<div class="header">
<!-- logo and title -->
<div style="width: 235px; float: left; margin-right: 25px;">
<img src="images/MGRAST_logo.png" style="float: left; height: 59px; margin-top: 3px; cursor: pointer;" onclick="window.location='mgroot.html';">
</div>
<div style="float: right;">
<!-- user info / login section -->
<span id="login_space"></span>
</div>
</div>
<div style="height: 80px;" class="visible-desktop"></div>
<div style="height: 120px;" class="hidden-desktop"></div>
<!--border layout -->
<div class="row-fluid">
<!-- main content -->
<div id="content" class="span7 offset1">
</div>
<!-- sidebar content -->
<div class="span3 sidebar affix" style="right: 8%; background-color: white;">
<span style="float: right; margin-right: 5px; cursor: pointer;" status="on" onclick="if (this.getAttribute('status') == 'on') { this.setAttribute('status', 'off'); document.getElementById('content').className='span10 offset1'; this.parentNode.className='span1'; document.getElementById('sidebar').style.display='none'; this.firstChild.className='icon-plus'; this.style.cssFloat='left'; this.style.styleFloat='left'; } else { this.setAttribute('status', 'on'); document.getElementById('content').className='span7 offset1'; this.parentNode.className='span3 sidebar'; document.getElementById('sidebar').style.display=''; this.firstChild.className='icon-minus'; this.style.cssFloat='right'; this.style.styleFloat='right'; }" id="sidebarResizer"><icon class="icon-minus"></icon></span>
<div id="sidebar"></div>
</div>
</div>
<div style="height: 100px;"></div>
</body>
</html>