Skip to content

Commit 88f5810

Browse files
authored
Merge pull request #291 from TextDB/jimmy-ui-menu
[Issue #246] GUI: Add a frontend menu with default operators
2 parents 8c8b1ed + eec904d commit 88f5810

7 files changed

Lines changed: 188 additions & 0 deletions

File tree

‎textdb/textdb-gui/css/style.css‎

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/* Initial body */
2+
body {
3+
left: 0;
4+
margin: 0;
5+
overflow: hidden;
6+
position: relative;
7+
}
8+
9+
/* Initial menu */
10+
.menu {
11+
background: #202024 url("../img/black-thread.png") repeat left top;
12+
left: -285px; /* start off behind the scenes */
13+
top: 0px;
14+
height: 100%;
15+
position: fixed;
16+
width: 285px;
17+
}
18+
19+
/* Basic styling */
20+
21+
.jumbotron {
22+
height: 100%;
23+
}
24+
25+
.menu ul {
26+
border-top: 1px solid #636366;
27+
list-style: none;
28+
height: 95%;
29+
width: 100%;
30+
margin: 0px;
31+
padding: 0px;
32+
overflow: auto;
33+
}
34+
35+
.menu li {
36+
border-bottom: 1px solid #636366;
37+
border-left: 3px solid transparent;
38+
font-family: 'Open Sans', sans-serif;
39+
line-height: 45px;
40+
padding-bottom: 3px;
41+
padding-left: 20px;
42+
padding-top: 3px;
43+
color: #fff;
44+
font-size: 15px;
45+
text-transform: uppercase;
46+
cursor: pointer;
47+
}
48+
49+
.blank-operator{
50+
border: 0px;
51+
height: 50px;
52+
cursor: default;
53+
}
54+
55+
.icon-close {
56+
cursor: pointer;
57+
padding: 10px;
58+
padding-bottom: 14px;
59+
}
60+
61+
.nav {
62+
background: #202024 url("../img/black-thread.png") repeat left top;
63+
}
64+
65+
.nav div {
66+
border: 1px solid #636366;
67+
cursor: pointer;
68+
border-radius: 10px;
69+
text-decoration: none;
70+
text-transform: uppercase;
71+
font-family: 'Open Sans', sans-serif;
72+
font-size: 16px;
73+
padding: 15px;
74+
display: inline-block;
75+
margin: 10px;
76+
}
77+
78+
.icon-menu {
79+
padding-right: 100px;
80+
color: #fff;
81+
}
82+
83+
.dashboard {
84+
background-image: url('../img/white-background.jpg');
85+
margin: 0;
86+
padding: 0;
87+
height: 100%;
88+
width: 100%;
89+
border: 1px solid #BBB;
90+
/* margin-bottom: 10px; */
91+
}
783 Bytes
Loading
2.95 KB
Loading
773 Bytes
Loading
21 KB
Loading

‎textdb/textdb-gui/index.html‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<html>
2+
<head>
3+
4+
<meta charset="utf-8">
5+
6+
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
7+
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
8+
<script type="text/javascript" src="thirdparty/textdb.flowchart.js"></script>
9+
<script type="text/javascript" src="js/app.js"></script>
10+
11+
<link href='thirdparty/flowchart.css' rel='stylesheet'>
12+
<link href='css/style.css' rel='stylesheet'>
13+
14+
15+
</head>
16+
<body>
17+
18+
<div class="menu">
19+
20+
<!-- Menu icon -->
21+
<div class="icon-close">
22+
<img src="img/close-icon.png">
23+
</div>
24+
25+
<!-- Menu -->
26+
<ul>
27+
<li class="operator">Create Operator</li>
28+
<li class="operator">Create Operator</li>
29+
<li class="operator">Create Operator</li>
30+
<li class="operator">Create Operator</li>
31+
<li class="operator">Create Operator</li>
32+
<li class="operator">Create Operator</li>
33+
<li class="operator">Create Operator</li>
34+
<li class="operator">Create Operator</li>
35+
<li class="operator">Create Operator</li>
36+
<li class="operator">Create Operator</li>
37+
<li class="operator">Create Operator</li>
38+
<li class="operator">Create Operator</li>
39+
<li class="operator">Create Operator</li>
40+
<li class="operator">Create Operator</li>
41+
<li class="operator">Create Operator</li>
42+
<li class="blank-operator"></li>
43+
</ul>
44+
</div>
45+
46+
<!-- Main body -->
47+
<div class="jumbotron">
48+
49+
<div class="nav">
50+
<div class="icon-menu">Menu</div>
51+
</div>
52+
53+
<div class="dashboard" id="the-flowchart">
54+
55+
</div>
56+
57+
</body>
58+
</html>

‎textdb/textdb-gui/js/app.js‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
var openMenu = function(){
3+
$('.menu').animate({
4+
'left': '0px'
5+
}, 200);
6+
7+
$('.icon-menu').css({
8+
'visibility': 'hidden',
9+
'pointer': 'default'
10+
});
11+
12+
$('body').animate({
13+
'left': '285px'
14+
}, 200);
15+
};
16+
17+
var closeMenu = function(){
18+
$('.menu').animate({
19+
'left': '-285px'
20+
}, 200);
21+
22+
$('.icon-menu').css({
23+
'visibility': 'visible',
24+
'pointer': 'pointer'
25+
});
26+
27+
$('body').animate({
28+
'left': '0px'
29+
}, 200);
30+
};
31+
32+
var main = function(){
33+
34+
$('.icon-menu').click(openMenu);
35+
36+
$('.icon-close').click(closeMenu);
37+
};
38+
39+
$(document).ready(main);

0 commit comments

Comments
 (0)