This repository has been archived by the owner on Mar 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
327 lines (284 loc) · 15.3 KB
/
index.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
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<!doctype html>
<html>
<head>
<script type="text/javascript">
/**
* Return the value of the given search parameter, or null.
*/
var get_param = function (param_name) {
var results = new RegExp('[\?&]' + param_name + '=([^&#]*)').exec(window.location.href);
return results && results[1];
};
// Set language/vocabulary, if given as parameters.
var lng = get_param('lng');
lng && localStorage.setItem('vocabulary.lng', lng);
var proj = get_param('proj');
proj && localStorage.setItem('vocabulary.vocabulary', proj);
</script>
<title>Vocabulary</title>
<link rel="shortcut icon" href="icons/icon-32.png" type="image/png" />
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- jQuery Mobile -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="lib/jq/jquery.mobile-1.4.5.min.css" rel="stylesheet">
<script src="lib/jq/jquery-2.1.3.min.js"></script>
<script src="lib/jq/jquery.mobile-1.4.5.min.js"></script>
<!-- keyboard widget css & script -->
<script src="lib/jq/jquery-ui.min.js"></script>
<link href="lib/keyboard/css/keyboard.min.css" rel="stylesheet">
<script src="lib/keyboard/js/jquery.keyboard.min.js"></script>
<script src="lib/keyboard/js/jquery.keyboard.extension-mobile.min.js"></script>
<script src="lib/keyboard/js/jquery.keyboard.extension-previewkeyset.min.js"></script>
<script src="lib/keyboard/layouts/albanian.min.js" type="text/javascript"></script>
<!--
<script src="lib/keyboard/layouts/keyboard-layouts-combined.min.js" charset="utf-8"></script>
-->
<!-- icons of social share networks -->
<!-- download from: http://andymatthews.net/code/jQuery-Mobile-Icon-Pack/builder/ -->
<link href="lib/share_icons/icon-pack-custom.css" rel="stylesheet">
<!-- translate the interface of the application -->
<!-- <script src="lib/locale/icu.js"></script> -->
<script src="l10n/translate.js"></script>
<script src="l10n/po/sq.js"></script>
<!-- Misc JS functions and libraries -->
<script src="lib/sha1.js"></script>
<script src="lib/mustache.min.js"></script>
<script src="lib/jq/jquery.timeago.js"></script>
<script src="lib/oauth2_token.js"></script>
<!-- application custom style and JS code -->
<link rel="stylesheet" href="css/app.css">
<script src="frame.js"></script>
<script src="config.js"></script>
<script src="user.js"></script>
<script src="app.js"></script>
</head>
<body>
<!-- page -->
<div data-role="page" id="vocabulary">
<!-- header -->
<div data-role="header" data-position="fixed">
<h1>Vocabulary</h1>
<a href="#" id="random" class="ui-btn ui-btn-b ui-nodisc-icon ui-btn-left ui-icon-refresh ui-btn-icon-notext" style="border-radius: 5px;">Random</a>
<a href="#popupMenu" id="menuButton" data-rel="popup" class="ui-btn ui-btn-b ui-nodisc-icon ui-btn-right ui-icon-bars ui-btn-icon-notext" style="border-radius: 5px;">Menu</a>
<div data-role="popup" id="popupMenu" data-theme="none" data-shadow="false"></div>
</div><!-- /header -->
<!-- content -->
<div data-role="main" class="ui-content">
<!-- search with autocomplete list -->
<form id="search-form" class="ui-filterable">
<a href="#" id="search-button" class="ui-btn ui-btn-b ui-nodisc-icon ui-icon-forward ui-btn-icon-notext"></a>
<input id="search-term" data-type="search" placeholder="Search for a word...">
</form>
<ul id="suggestions" data-role="listview" data-inset="true" data-filter="true" data-input="#search-term"></ul>
<a href="#" id="add-new-term" class="ui-nodisc-icon ui-btn ui-corner-all ui-btn-b ui-icon-plus ui-btn-icon-left ui-btn-inline" style="display: none;">Add New Term</a>
<!-- mustache template for suggestions -->
<script id="tmpl-suggestions" type="x-tmpl-mustache">
{{#terms}}
<li><a href="#" class="term">{{.}}</a></li>
{{/terms}}
</script>
<!-- list of available translations for the selected term -->
<ul id="translations" data-role="listview" data-inset="true" data-count-theme="b" data-icon="false" data-split-icon="edit"></ul>
<!-- mustache template for translations -->
<script id="tmpl-translations" type="x-tmpl-mustache">
{{#translations}}
<li id="{{id}}" class="translation{{voted}}">
<a href="#" data-rel="popup">
<strong>{{translation}}</strong><br/>
<p>By <strong>{{author}}</strong> ({{time}})</p>
<span class="ui-li-count">{{vote_nr}}</span>
</a>
</li>
{{/translations}}
<!-- add a new translation -->
<li>
<a href="#" style="padding-top: 5px; padding-bottom: 5px;">
<form id="new-translation-form">
<input type="text" id="new-translation" value="" placeholder="{{&New translation}}">
</form>
</a>
<a href="#" id="send-new-translation" class="ui-btn ui-alt-icon ui-icon-plus ui-nodisc-icon ui-btn-icon-notext">Send</a>
</li>
</script>
<!-- mustache template for translation details popup -->
<script id="tmpl-translation-details" type="x-tmpl-mustache">
<div data-role="popup" id="translation-details" data-transition="slide" class="dynamic-popup">
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<ul data-role="listview" data-inset="true" style="min-width:250px;">
<li><strong>{{translation}}</strong></li>
<li style="padding: 0px;">
<div style="text-align: center;">
<a href="#" id="vote" class="ui-btn ui-corner-all ui-nodisc-icon ui-btn-b ui-icon-check ui-btn-icon-left">{{&Vote}}</a>
{{#delete}}
<a href="#" id="delete" class="ui-btn ui-corner-all ui-nodisc-icon ui-btn-b ui-icon-delete ui-btn-icon-left">{{&Delete}}</a>
{{/delete}}
</div>
</li>
<li>
<div data-role="collapsible" data-inset="false" class="ui-mini">
<h4>{{&Voters}} ({{nr}})</h4>
<ul data-role="listview">
{{#voters}}
<li>{{{name}}} <span style="font-weight: normal;">({{time}})</span></li>
{{/voters}}
</ul>
</div>
</li>
</ul>
</div>
</script>
<div id="social-share-buttons" style="text-align: right;">
<a id="share-facebook" href="#" class="ui-btn ui-btn-b ui-nodisc-icon ui-btn-icon-left ui-btn-inline ui-icon-facebook ui-btn-icon-notext" style="border-radius: 5px; width: 20px; margin-right: 0px">Facebook</a>
<a id="share-googleplus" href="#" class="ui-btn ui-btn-b ui-nodisc-icon ui-btn-icon-left ui-btn-inline ui-icon-google-plus ui-btn-icon-notext" style="border-radius: 5px; width: 20px; margin-right: 0px">Google Plus</a>
<a id="share-twitter" href="#" class="ui-btn ui-btn-b ui-nodisc-icon ui-btn-icon-left ui-btn-inline ui-icon-twitter ui-btn-icon-notext" style="border-radius: 5px; width: 20px; margin-right: 0px">Twitter</a>
<a id="share-linkedin" href="#" class="ui-btn ui-btn-b ui-nodisc-icon ui-btn-icon-left ui-btn-inline ui-icon-linkedin ui-btn-icon-notext" style="border-radius: 5px; width: 20px; margin-right: 0px">LinkedIn</a>
</div>
<div id="disqus" data-role="collapsible" data-inset="false" data-content-theme="false" data-mini="true" data-collapsed-icon="carat-l" data-expanded-icon="carat-d" data-iconpos="right">
<h4>Disqus</h4>
<div id="disqus_thread" class="disqus-wrap disqus-active"></div>
</div>
</div><!-- /content -->
<!-- messages -->
<div data-role="footer" id="messages" data-position="fixed"></div>
<div id="status-line"></div>
<img id="picture">
<div id="settings" data-role="panel" data-display="reveal" data-position-fixed="true">
<div class="ui-corner-all custom-corners">
<div class="ui-bar ui-bar-a">
<h3 id="lang">Language</h3>
</div>
<div class="ui-body ui-body-a">
<fieldset id="languages" data-role="controlgroup" data-type="horizontal"></fieldset>
</div>
</div>
<div class="ui-corner-all custom-corners" style="margin-top: 10px;">
<div class="ui-bar ui-bar-a">
<h3 id="vocab">Vocabulary</h3>
</div>
<div class="ui-body ui-body-a">
<fieldset id="vocabularies" data-role="controlgroup" data-type="horizontal"></fieldset>
</div>
</div>
<!-- Custom Keyboard -->
<div style="margin-top: 10px; padding: 5px;">
<label for="custom-keyboard">Use Custom Keyboard:</label>
<input type="checkbox" id="custom-keyboard" data-role="flipswitch">
</div>
<a id="done" href="#vocabulary" data-rel="close" class="ui-btn ui-corner-all ui-btn-inline" style="margin-top: 20px;">Done</a>
</div>
<!-- Mustache template for the list of languages. -->
<script id="tmpl-languages" type="x-tmpl-mustache">
{{#languages}}
<input type="radio" name="lng" id="lng-{{lng}}" value="{{lng}}" {{selected}} class="lng">
<label for="lng-{{lng}}">{{language}}</label>
{{/languages}}
</script>
<!-- Mustache template for the list of vocabularies. -->
<script id="tmpl-vocabularies" type="x-tmpl-mustache">
{{#vocabularies}}
<input type="radio" name="vocabulary" id="{{id}}" value="{{id}}" {{selected}} class="vocabulary">
<label for="{{id}}">{{name}}</label>
{{/vocabularies}}
</script>
</div><!-- /page -->
<!-- template for the menu popup -->
<script id="tmpl-menu" type="x-tmpl-mustache">
<div data-role="collapsibleset" data-transition="slidedown" data-theme="b" data-content-theme="a" data-collapsed-icon="carat-r" data-expanded-icon="carat-d" class="ui-nodisc-icon">
<div data-role="collapsible" data-inset="false" data-collapsed="false">
<h2>{{&User}}</h2>
<ul data-role="listview">
<li><a id="login" href="#" class="ui-btn ui-icon-user ui-btn-icon-left">{{&Sign in}}</a></li>
<li><a id="logout" href="#" class="ui-btn ui-icon-user ui-btn-icon-left">{{&Sign out}}</a></li>
<li><a id="register" href="{{base_url}}/user/register?lng={{lng}}&proj=vocabulary/{{vocabulary}}" target="_blank" class="ui-btn ui-icon-user ui-btn-icon-left">{{&Sign up}}</a></li>
<li><a id="subscribe" href="#" class="ui-btn ui-icon-mail ui-btn-icon-left">{{&Subscribe}}</a></li>
<li><a id="unsubscribe" href="#" class="ui-btn ui-icon-mail ui-btn-icon-left">{{&Unsubscribe}}</a></li>
<li><a id="profile" href="{{base_url}}/user" target="_blank" class="ui-btn ui-icon-gear ui-btn-icon-left">{{&Profile}}</a></li>
<li><a href="#settings" class="ui-btn ui-icon-gear ui-btn-icon-left">{{&Settings}}</a></li>
<li><a href="{{base_url}}/contact/{{vocabulary}}/Hi" target="_blank" class="ui-btn ui-icon-action ui-btn-icon-left">{{&Contact}}</a></li>
</ul>
</div><!-- /collapsible -->
<div data-role="collapsible" data-inset="false">
<h2>{{&Project}}</h2>
<ul data-role="listview">
<li><a id="del-term" href="#" class="ui-btn ui-icon-delete ui-btn-icon-left">{{&Delete}}</a></li>
{{#webapp_url}}
<li><a id="details" href="{{webapp_url}}/vocabulary/{{vocabulary}}" target="_blank" class="ui-btn ui-icon-grid ui-btn-icon-left">{{&Details}}</a></li>
{{/webapp_url}}
<li><a href="{{base_url}}/btr/project/vocabulary/{{vocabulary}}/{{lng}}/dashboard" target="_blank" class="ui-btn ui-icon-bullets ui-btn-icon-left">{{&Dashboard}}</a></li>
<li><a href="{{base_url}}/btr/project/vocabulary/{{vocabulary}}/{{lng}}/list" target="_blank" class="ui-btn ui-icon-bullets ui-btn-icon-left">{{&List}}</a></li>
</ul>
</div><!-- /collapsible -->
<div data-role="collapsible" data-inset="false">
<h2>{{&Links}}</h2>
<ul data-role="listview">
{{#external_links}}
<li><a href="{{href}}" class="ui-btn ui-icon-action ui-btn-icon-left" target="_blank">{{title}}</a></li>
{{/external_links}}
</ul>
</div><!-- /collapsible -->
<div data-role="collapsible" data-inset="false">
<h2>{{&Download}}</h2>
<ul data-role="listview">
<li><a href="{{base_url}}/vocabulary/export/{{vocabulary}}/txt1" class="ui-btn ui-icon-arrow-d ui-btn-icon-left">txt-1</a></li>
<li><a href="{{base_url}}/vocabulary/export/{{vocabulary}}/txt2" class="ui-btn ui-icon-arrow-d ui-btn-icon-left">txt-2</a></li>
<li><a href="{{base_url}}/vocabulary/export/{{vocabulary}}/org" class="ui-btn ui-icon-arrow-d ui-btn-icon-left">org</a></li>
</ul>
</div><!-- /collapsible -->
</div><!-- /collapsible set -->
</script>
<!-- template for the login popup -->
<script id="tmpl-login" type="x-tmpl-mustache">
<div data-role="popup" id="popup-login" data-theme="a" data-dismissible="false" class="ui-corner-all" class="dynamic-popup">
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<form id="form-login">
<div style="padding: 0px 20px 10px 20px;">
<h3>{{&Please sign in}}</h3>
<label for="username" class="ui-hidden-accessible">{{&Username}}:</label>
<input type="text" name="user" id="username" value="" placeholder="username" data-theme="a">
<label for="password" class="ui-hidden-accessible">{{&Password}}:</label>
<input type="password" name="pass" id="password" value="" placeholder="password" data-theme="a">
<div style="text-align: center;">
<button type="submit" class="ui-btn ui-corner-all ui-shadow ui-btn-b ui-btn-icon-left ui-nodisc-icon ui-icon-check">{{&Sign in}}</button>
<a href="{{base_url}}/user/register?lng={{sq}}&proj=vocabulary/{{vocabulary}}" target="_blank" class="ui-btn ui-corner-all ui-shadow ui-btn-b ui-btn-icon-left ui-nodisc-icon ui-icon-user">{{&Sign up}}</a>
</div>
</div>
</form>
</div>
</script>
<!-- template for the proxy login popup -->
<script id="tmpl-proxylogin" type="x-tmpl-mustache">
<div data-role="popup" id="popup-proxylogin" data-theme="a" data-dismissible="false" class="ui-corner-all" class="dynamic-popup">
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<div style="padding: 0px 20px 10px 20px;">
<h3>{{&Please sign in}}</h3>
<div style="text-align: center;">
<button id="open-proxy-login" type="submit" class="ui-btn ui-corner-all ui-shadow ui-btn-b ui-btn-icon-left ui-nodisc-icon ui-icon-check">{{&Sign in}}</button>
<a href="{{base_url}}/user/register?lng={{sq}}&proj=vocabulary/{{vocabulary}}" target="_blank" class="ui-btn ui-corner-all ui-shadow ui-btn-b ui-btn-icon-left ui-nodisc-icon ui-icon-user">{{&Sign up}}</a>
</div>
</div>
</div>
</script>
<!-- template for the confirm popup -->
<script id="tmpl-confirm" type="x-tmpl-mustache">
<div data-role="popup" id="popup-confirm" data-theme="a" data-dismissible="false" class="ui-corner-all" class="dynamic-popup">
<div style="padding: 10px 20px;">
<p>{{&message}}</p>
<div style="text-align: center;">
<a href="#" id="confirm-ok" class="ui-btn ui-corner-all ui-shadow ui-btn-b ui-btn-icon-left ui-nodisc-icon ui-icon-check">{{&OK}}</a>
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-b ui-btn-icon-left ui-nodisc-icon ui-icon-forbidden">{{&Cancel}}</a>
</div>
</div>
</div>
</script>
<!-- template for the frame -->
<script id="tmpl-frame" type="x-tmpl-mustache">
<div id="frame">
<iframe src="{{href}}"
width="100%" height="600px"
seamless="seamless" frameborder="0">
</iframe>
</div>
</script>
</body>
</html>