-
Notifications
You must be signed in to change notification settings - Fork 0
/
amisMenu.html
305 lines (283 loc) · 12.2 KB
/
amisMenu.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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<!--------------------------------------------------------------------------------------------- -->
<!-- JQUERY AND BOOSTRAP IMPORT -->
<!--------------------------------------------------------------------------------------------- -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdn.materialdesignicons.com/1.9.32/css/materialdesignicons.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!--------------------------------------------------------------------------------------------- -->
<!-- END JQUERY AND BOOSTRAP IMPORT -->
<!--------------------------------------------------------------------------------------------- -->
<!--------------------------------------------------------------------------------------------- -->
<!-- FIREBASE IMPORT -->
<!--------------------------------------------------------------------------------------------- -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.0.0/firebase.js"></script>
<!--------------------------------------------------------------------------------------------- -->
<!-- END FIREBASE IMPORT -->
<!--------------------------------------------------------------------------------------------- -->
<?!= Utility.include('baseStyle'); ?>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-5 text-center">
<!-- AMIS LOGO -->
<?!= Utility.include('amisLogo'); ?>
</div>
<div class="col-xs-7" style="padding-left: 0;">
<br>
<h4><b><?= countryCell ?></b></h4>
<br><br>
<?= datasourceCell ?>
<br>
</div>
</div>
</div>
<br/>
<div class="container" id="devToolbar" <?= (devMode)?"":"hidden" ?> >
<div class="row">
<div class="col-xs-12">
<button type="button" class="btn btn-primary btn-xs collapsed" data-toggle="collapse" data-target="#devBtns">Dev buttons</button>
</div>
<div class="col-xs-12 collapse" id="devBtns">
<button onclick="loginWithGoogle()">loginWithGoogle()</button>
<button onclick="logout()">logout()</button>
<button onclick="wrongToken()">wrongToken</button>
<button onclick="console.clear()">console.clear</button>
<button onclick="google.script.run.LIB_FUNC( 'AmisMarketApp.AmisDebugger.cellInfo')">cellInfo</button>
<button onclick="openExcelExportSpreadsheet()">excelExportSheet</button>
<button onclick="openFirebaseCountryConfigNode()">sheetConfigNode</button>
<button onclick="google.script.run.LIB_FUNC( 'AmisMarketApp.Utility.toggleTemplates', false)">hide templates</button>
<button onclick="google.script.run.LIB_FUNC( 'AmisMarketApp.Utility.toggleTemplates', true)">show templates</button>
<button onclick='$("#userActionsDiv,#create-sheet-form").toggle()'>Usr/Admin btn</button>
<button onclick='getAllNamedRanges()'>getAllNamedRanges</button>
<button onclick="google.script.run.LIB_FUNC( 'AmisMarketApp.AmisNamedRanges.clearNamedRanges')">clearNamedRanges</button>
<br>
DB:<?= dbName ?>
<br>
<br>
</div>
</div>
</div>
<!-- hidden part -->
<!-- <div id="userActionsDiv" hidden class="container"> -->
<div id="userActionsDiv" hidden class="container">
<? if (secretariatMode) { ?>
<div class="row">
<div class="col-xs-12 text-left">
Please chose a country:
</div>
</div>
<br>
<select class="form-control" id="countryName">
<option value="">Choose a Country</option>
<option value="argentina">Argentina</option>
<option value="australia">Australia</option>
<option value="brazil">Brazil</option>
<option value="canada">Canada</option>
<option value="china mainland">China Mainland</option>
<option value="egypt">egypt</option>
<option value="european union">european union</option>
<option value="india">india</option>
<option value="indonesia">indonesia</option>
<option value="japan">japan</option>
<option value="mexico">mexico</option>
<option value="nigeria">Nigeria</option>
<option value="philippines">philippines</option>
<option value="republic of korea">republic of korea</option>
<option value="russian federation">russian federation</option>
<option value="saudi arabia">saudi arabia</option>
<option value="south africa">south africa</option>
<option value="thailand">thailand</option>
<option value="turkey">turkey</option>
<option value="ukraine">ukraine</option>
<option value="united states of america">United States Of America</option>
<option value="viet nam">viet nam</option>
</select>
<br/>
<? } ?>
<div class="row">
<div class="col-xs-12 text-left">
Add a new Forecast:
</div>
</div>
<br>
<div class="row">
<div class="col-xs-6 text-right">
<button id="addFrcA" class="btn btn-primary btn-lg btn-block"><span class="season-label"></span> <i class="mdi mdi-table-column-plus-after"></i>
</button>
</div>
<div class="col-xs-6 text-right">
<button id="addFrcB" class="btn btn-primary btn-lg btn-block"><span class="season-label"></span> <i class="mdi mdi-table-column-plus-after"></i>
</button>
</div>
</div>
<br>
<br>
<div class="row">
<div class="col-xs-12 text-left">
Show/hide historical series
</div>
</div>
<br>
<div class="row">
<div class="col-xs-6 text-right">
<button id="showHistoricalSeries" class="btn btn-primary btn-lg btn-block">Show <i class="mdi mdi-eye"></i></button>
</div>
<div class="col-xs-6 text-right">
<button id="hideHistoricalSeries" class="btn btn-primary btn-lg btn-block">Hide <i class="mdi mdi-eye-off"></i></button>
</div>
</div>
<br/><br/>
<div class="">
<div class="row">
<div class="col-xs-12 text-left">
Validate the data of the current Sheet:
</div>
</div>
<br>
<div class="row">
<div class="col-xs-12 text-right">
<button id="buttonVerify" class="btn btn-primary btn-lg">Validate <i class="mdi mdi-verified"></i></button>
</div>
</div>
<br>
<br>
</div>
<div>
<div class="row">
<div class="col-xs-12 text-left">
Undo changes and load data from the AMIS database:
</div>
</div>
<br>
<div class="row">
<div class="col-xs-12 text-right">
<button id="buttonFetch" class="btn btn-primary btn-lg">Undo <i class="mdi mdi-undo-variant"></i></button>
</div>
</div>
<br>
<br>
</div>
<div class="row">
<div class="col-xs-12 text-left">
Save data to the AMIS database:
</div>
</div>
<br>
<div class="row">
<div class="col-xs-12 text-right">
<button id="buttonSave" class="btn btn-primary btn-lg">Save <i class="mdi mdi-cloud-upload"></i></button>
</div>
</div>
<div class="">
<div class="row">
<div class="col-xs-12 text-left">
Export Excel Format:
</div>
</div>
<br>
<div class="row">
<div class="col-xs-12 text-right">
<a id="excelExportBtn" class="btn btn-primary btn-lg">Export Excel Format <i class="mdi mdi-file-excel"></i></a>
</div>
</div>
<br>
<br>
</div>
<div class="isSecretariat isAdmin">
<div class="row">
<div class="col-xs-12 text-left">
Add a new year of season:
</div>
</div>
<br>
<div class="row">
<div class="col-xs-12 text-right">
<button id="addYear" class="btn btn-primary btn-lg">Change of season</button>
</div>
</div>
</div>
</div>
<!-- END hidden part -->
<div class="container" id="loading">
<div class="row">
<div class="text-center" id="loadingText">
<h4>Loading</h4>
</div>
<div class="animationload">
<div class="osahanloading"></div>
</div>
</div>
</div>
<!-- Begin # create sheet form -->
<form id="create-sheet-form" hidden class="container">
<div class="isMaster">
<div class="row">
<div class="col-xs-12 text-left">
Create and share the sheet:
</div>
</div>
<br>
<div class="row">
<div class="col-xs-12 text-center">
<div class="">
<div id="div-login-msg">
<div id="icon-login-msg"></div>
</div>
</div>
<br/>
<div class="">
<div id="div-login-msg">
<div id="icon-login-msg"></div>
</div>
<!-- <input id="countryName" class="form-control" type="text" placeholder="Country Name" required> -->
<select class="form-control" id="countryName">
<option value="">Choose a Country</option>
<option value="all">All countries</option>
</select>
<br/>
<!-- <input id="account" class="form-control" type="text" placeholder="Account" required> -->
<select class="form-control" id="account">
<option value="">Choose an Account</option>
<? if (devMode) { ?>
<option value="[email protected]">[email protected]</option>
<option value="[email protected]">[email protected]</option>
<? } ?>
</select>
</div>
</div>
</div>
<br>
<br>
<div class="row">
<div class="col-xs-12 text-right">
<button id="createSheetButton" class="btn btn-primary btn-lg">Create Sheet <span class="glyphicon glyphicon-share"></span></button>
</div>
</div>
<br>
<br>
<div class="row">
<div class="col-xs-12 text-right">
<button id="removeAllSpreadsheetsBtn" class="btn btn-primary btn-lg">Remove all Spreadsheets <span class="glyphicon glyphicon-share"></span></button>
</div>
</div>
<br>
<br>
<div class="row">
<div class="col-xs-12 text-right">
<button id="updateFbMappingBtn" class="btn btn-primary btn-lg">Update fb mapping <span class="glyphicon glyphicon-share"></span></button>
</div>
</div>
<br>
<br>
</div>
</form>
<!-- End # Login Form -->
<?!= Utility.include('amisMenuJs'); ?>
</body>
</html>