-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshowBasicInsights.html
198 lines (189 loc) · 7.46 KB
/
showBasicInsights.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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MyDiary</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/base.css">
<link rel="stylesheet" type="text/css" href="css/generateInsight.css">
<link rel="stylesheet" type="text/css" href="css/chart.css">
<link rel="stylesheet" href="css/jquery-ui.css">
<script src="libs/jquery.min.js"></script>
<script src="libs/popper.min.js"></script>
<script src="libs/jquery-ui.js"></script>
<script src="libs/bootstrap.js"></script>
<script src="libs/d3.js"></script>
<script src="js/chart.js"></script>
</head>
<body>
<header>
<div class="row">
<div class="col-3 text-left" onclick="window.location='index.html'">
<img src="images/full-logo-white.png" class="header-logo" alt="mydiary-logo">
</div>
<div class="row col-6 menu-buttons">
<div class="col-4">
<a href="showCoreInsights.html">
<p class="menu-button-text">Core Insights</p>
</a>
</div>
<div class="col-4">
<a href="showSimpleInsights.html">
<p class="menu-button-text">Simple Language</p>
</a>
</div>
<div class="col-4 active">
<a href="showBasicInsights.html">
<p class="menu-button-text">Basic Insights</p>
</a>
</div>
</div>
<div class="col-3 text-right">
<img src="images/settings.png" class="user-settings-icon" alt="user-settings" onclick="toggleGenerateInsightFormView()">
<img src="images/user-profile.jpg" class="user-profile-icon" alt="user-photo">
<p class="user-profile-name">John Mathis</p>
<img src="images/down-arrow.png" class="profile-more-icon" alt="down-arrow">
</div>
</div>
</header>
<div class="mt-8"></div>
<div class="container generate-insights" id="generateInsightsBlock">
<div class="container col-12 create-insight-container">
<div class="row mt-2">
<h5 class="col-4 extra-padding"><strong>Insights Criteria</strong></h5>
<div class="col-8 dropdown-button-group text-right extra-padding">
<div class="dropdown show custom-dropdown">
<img src="images/user.png" class="btn-small-icon" alt="user-icon">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="groupDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Groups
</a>
<div class="dropdown-menu" aria-labelledby="groupDropdownMenuLink" id="group_dropdown_container">
</div>
</div>
<div class="dropdown show">
<img src="images/star.png" class="btn-small-icon" alt="star-icon">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="favoritesDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Favorites
</a>
<div class="dropdown-menu" aria-labelledby="favoritesDropdownMenuLink" id="favorites_dropdown_container">
</div>
</div>
</div>
</div>
<div class="container row mt-4">
<div class="col-lg-4 col-md-4 col-sm-8 extra-padding">
<div class="group" id="group_a">
<p><strong>Group A</strong></p>
</div>
<div class="group mt-4" id="group_b">
<p><strong>Group B</strong></p>
</div>
</div>
<div class="col-lg-5 col-md-5 col-sm-8 border-left-right extra-padding">
<div class="group" id="time_period_group">
<p><strong>Time periods</strong></p>
</div>
<div class="group mt-4">
<p><strong>Custom Period</strong></p>
<div class="button calendar mt-3">
<input type="text" id="datepicker1" placeholder="MM/DD/YYYY">
<label for="datepicker1"><img src="images/calendar-light.png" alt="calendar" class="btn-small-icon"></label>
</div>
<span class="margin-left-right"><strong>to</strong></span>
<div class="button calendar mt-3">
<input type="text" id="datepicker2" placeholder="MM/DD/YYYY">
<label for="datepicker2"><img src="images/calendar-light.png" alt="calendar" class="btn-small-icon"></label>
</div>
</div>
<div class="group mt-4">
<div class="before-after-col">
<p><strong>Before</strong></p>
<div class="button calendar mt-3">
<input type="text" id="datepicker3" placeholder="MM/DD/YYYY">
<label for="datepicker3"><img src="images/calendar-light.png" alt="calendar" class="btn-small-icon"></label>
</div>
</div>
<div class="before-after-col">
<p><strong>After</strong></p>
<div class="button calendar mt-3">
<input type="text" id="datepicker4" placeholder="MM/DD/YYYY">
<label for="datepicker4"><img src="images/calendar-light.png" alt="calendar" class="btn-small-icon"></label>
</div>
</div>
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-8 extra-padding">
<div class="group">
<p><strong>Exact Period</strong></p>
<div class="button calendar mt-3">
<input type="text" id="datepicker5" placeholder="MM/DD/YYYY">
<label for="datepicker5"><img src="images/calendar-light.png" alt="calendar" class="btn-small-icon"></label>
</div>
</div>
</div>
</div>
<div class="row mt-5" id="bottom-buttons">
<div class="col-12 text-right">
<button class="button disabled" id="clear_button" onclick="resetView()">
<span><strong>Clear</strong></span>
</button>
<button class="button blue-border-bg">
<span><strong>Add to favorites</strong></span>
</button>
<button class="button blue-filled-bg" id="generateInsightButton" onclick="fetchNewData()">
<span><strong>Generate insights</strong></span>
</button>
</div>
</div>
</div>
</div>
<div class="container charts-main-container mt-5">
<div class="col-12">
<h5 class="data-title"><strong></strong></h5>
</div>
</div>
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body container">
<div class="row group-header">
<p class="col-6" id="modal-title"><strong>Female</strong> (25)</p>
<img src="images/edit.png" class="edit-icon" alt="edit">
</div>
<div class="row group-search-card">
<input type="text" placeholder="Find email contacts" class="col-12">
<img src="images/search.png" class="search-icon" alt="search">
</div>
<div class="container group-items mt-2">
</div>
</div>
</div>
</div>
</div>
<script src="js/generateInsights.js"></script>
<script src="js/showBasicInsights.js"></script>
<script>
$(document).ready(function(){
$( "#datepicker1" ).datepicker();
$( "#datepicker2" ).datepicker();
$( "#datepicker3" ).datepicker();
$( "#datepicker4" ).datepicker();
$( "#datepicker5" ).datepicker();
loadGenerateInsightFormData(true, 0);
loadBasicInsightsChartData();
});
function toggleGenerateInsightFormView(){
$('#generateInsightsBlock').toggle();
}
function fetchNewData(){
loadBasicInsightsChartData();
scrollTo('charts-main-container');
}
function scrollTo(elemClassName){
var $container = $("html,body");
var $scrollTo = $('.'+elemClassName);
$container.animate({scrollTop: $scrollTo.offset().top - 100, scrollLeft: 0},300);
}
</script>
</body>
</html>