",
6 | "dependencies": {
7 | "express": "4.x.x",
8 | "body-parser" : "1.0.0",
9 | "mongoose": "4.x.x",
10 | "underscore": "1.6.x",
11 | "node-uuid": "1.4.x",
12 | "minimist": "1.1.x"
13 | },
14 | "devDependencies": {
15 | },
16 | "keywords": [
17 | "open",
18 | "city",
19 | "database",
20 | "web",
21 | "rest",
22 | "api"
23 | ],
24 | "repository": "git://github.com/fraunhoferfokus/ocdb",
25 | "scripts": {
26 | },
27 | "engines": {
28 | "node": ">= 0.8.0"
29 | },
30 | "main": "./main.js",
31 | "license": "http://www.apache.org/licenses/LICENSE-2.0"
32 | }
33 |
--------------------------------------------------------------------------------
/playground.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": {
3 | "path": "web_root/playground",
4 | "file": "index.html"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/startdb.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | BASEDIR=$(dirname $0)
4 | echo "DB PATH: $BASEDIR"
5 | $BASEDIR/db/mongodb/bin/mongod --dbpath $BASEDIR/db --logpath $BASEDIR/db/ocdb.log &
6 | echo "DB startup done. Everything fine so far, if no errors appeared. You might want to check ./db/ocdb.log"
7 |
--------------------------------------------------------------------------------
/stopdb.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | BASEDIR=$(dirname $0)
4 | echo "shutting down..."
5 | $BASEDIR/db/mongodb/bin/mongo --eval "db.getSiblingDB('min').shutdownServer()"
6 |
--------------------------------------------------------------------------------
/tests/README.md:
--------------------------------------------------------------------------------
1 | Tests
2 | =====
3 |
4 |
--------------------------------------------------------------------------------
/tests/docker_smoketest.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | HOST=$1
4 | PORT=$2
5 |
6 | [ "$HOST" ] || HOST="localhost"
7 | [ "$PORT" ] || PORT="443"
8 |
9 | echo "Using host: https://$HOST:$PORT"
10 |
11 | echo "Registering user...(user may already be registered)"
12 | curl -s -k -X POST "https://$HOST:$PORT/v1/users" -H "Accept: application/json" -H "Content-Type: application/json" -d "{\"n\":\"user\",\"a\":\"user@domain.com\",\"b\":\"441d05da1f570f55e0c8172787cdc1302ecad5db\"}"
13 | ec=$?
14 | if [ $ec -ne 0 ]; then
15 | echo "Failed with cURL return code: $ec";
16 | exit 1;
17 | fi
18 |
19 | echo "Log in..."
20 | at=`curl -s -k -X GET "https://$HOST:$PORT/v1/users?a=12dea96fec20593566ab75692c9949596833adc9&b=441d05da1f570f55e0c8172787cdc1302ecad5db" -H "Accept: application/json" | cut -f 4 -d \" -`
21 | ec=$?
22 | if [ $ec -ne 0 ]; then
23 | echo "Failed with cURL return code: $ec";
24 | exit 1;
25 | fi
26 | echo "Got this access token: "$at
27 |
28 | echo "Sample request (Get 10 cities around given location)..."
29 | curl -s -k -X GET "https://$HOST:$PORT/v1/cities?lat=52.5258885&lon=13.3142135&offset=0&limit=10" -H "Accept: application/json" -H "Authorization: token "$at
30 | ec=$?
31 | if [ $ec -ne 0 ]; then
32 | echo "Failed with cURL return code: $ec";
33 | exit 1;
34 | fi
35 |
36 | echo "\nOCDB: Smoke test ran successful."
37 |
--------------------------------------------------------------------------------
/web_root/api/swagger.yaml:
--------------------------------------------------------------------------------
1 | swagger: '2.0'
2 | info:
3 | title: Open City Database API
4 | description: Quick and easy deployable cities related data service with read/write access to user generated content, points of interest and social interactions (likes, comments, ratings, check-ins). Notice:Beware the authentication requirements for the OCDB API. A appropriately configured API console is available at http://fraunhoferfokus.github.io/OCDB/apiconsole/index.html
5 | version: "1.0.2"
6 | license:
7 | name: Apache 2.0
8 | # array of all schemes that the OCDB API supports
9 | schemes:
10 | - https
11 | # will be prefixed to all paths
12 | basePath: /v1
13 | produces:
14 | - application/json
15 | consumes:
16 | - application/json
17 | paths:
18 | /users:
19 | get:
20 | summary: Login/logout a user
21 | description:
22 | To access any OCDB instance a authorization token needs to be created. For this purpose the login request must be performed
23 | parameters:
24 | - name: a
25 | in: query
26 | description: (SHA1) hashed user name or email of the user to log in. For a log out just leave this parameter empty
27 | required: true
28 | type: string
29 | format: string
30 | - name: b
31 | in: query
32 | description: (SHA1) hashed password of the user to log in. For a log out just leave this parameter empty
33 | required: true
34 | type: string
35 | format: string
36 | tags:
37 | - User
38 | responses:
39 | 200:
40 | description: Access object
41 | schema:
42 | $ref: '#/definitions/Access'
43 | 400:
44 | description: Bad request
45 | schema:
46 | $ref: '#/definitions/Error'
47 | 401:
48 | description: Unauthorized request
49 | schema:
50 | $ref: '#/definitions/Error'
51 | 404:
52 | description: User not found
53 | schema:
54 | $ref: '#/definitions/Error'
55 | 500:
56 | description: Internal error
57 | schema:
58 | $ref: '#/definitions/Error'
59 | post:
60 | summary: Register a user
61 | description:
62 | To access any OCDB instance a authorization token needs to be created. For this purpose the login request must be performed
63 | parameters:
64 | - name: user
65 | in: body
66 | required: true
67 | schema:
68 | $ref: '#/definitions/AccessRequest'
69 | tags:
70 | - User
71 | responses:
72 | 200:
73 | description: Registration confirmation
74 | schema:
75 | $ref: '#/definitions/AccessRequestResponse'
76 | 400:
77 | description: Bad request
78 | schema:
79 | $ref: '#/definitions/Error'
80 | 401:
81 | description: Unauthorized request
82 | schema:
83 | $ref: '#/definitions/Error'
84 | 409:
85 | description: User exists already
86 | schema:
87 | $ref: '#/definitions/Error'
88 | 500:
89 | description: Internal error
90 | schema:
91 | $ref: '#/definitions/Error'
92 | /cities:
93 | get:
94 | summary: Get a list of cities
95 | description:
96 | A list of cities based on a location and an optional name can be requested. Location and name will be discarded if fulltext search parameter is used.
97 | parameters:
98 | - name: lat
99 | in: query
100 | description: Latitude of the center point to start the query from
101 | required: true
102 | type: string
103 | format: string
104 | - name: lon
105 | in: query
106 | description: Longitude of the center point to start the query from
107 | required: true
108 | type: string
109 | format: string
110 | - name: name
111 | in: query
112 | description: Query explicitely by city name (can be combined with lat/lon)
113 | type: string
114 | format: string
115 | - name: search
116 | in: query
117 | description: Fulltext search to be applied (can NOT be combined with lat/lon)
118 | type: string
119 | format: string
120 | - name: offset
121 | in: query
122 | description: The offset of the first index in the result array
123 | type: string
124 | format: string
125 | - name: limit
126 | in: query
127 | description: Limit the returned item count to this value
128 | type: string
129 | format: string
130 | tags:
131 | - City
132 | responses:
133 | 200:
134 | description: An array of cities. May be an empty Array.
135 | schema:
136 | type: array
137 | items:
138 | $ref: '#/definitions/City'
139 | 400:
140 | description: Bad request
141 | schema:
142 | $ref: '#/definitions/Error'
143 | 401:
144 | description: Unauthorized request
145 | schema:
146 | $ref: '#/definitions/Error'
147 | 500:
148 | description: Internal error
149 | schema:
150 | $ref: '#/definitions/Error'
151 | /cities/{cityid}:
152 | get:
153 | summary: Get a single city record
154 | description:
155 | A single city record can be requested by its id
156 | parameters:
157 | - name: cityid
158 | in: path
159 | description: The id of the city
160 | required: true
161 | type: string
162 | format: string
163 | tags:
164 | - City
165 | responses:
166 | 200:
167 | description: A single city record
168 | schema:
169 | $ref: '#/definitions/City'
170 | 400:
171 | description: Bad request
172 | schema:
173 | $ref: '#/definitions/Error'
174 | 401:
175 | description: Unauthorized request
176 | schema:
177 | $ref: '#/definitions/Error'
178 | 404:
179 | description: City not found
180 | schema:
181 | $ref: '#/definitions/Error'
182 | 500:
183 | description: Internal error
184 | schema:
185 | $ref: '#/definitions/Error'
186 | /cities/{cityid}/pois:
187 | get:
188 | summary: Get a list of pois for a selected city
189 | description:
190 | A list of pois based on a location and an optional search query can be requested.
191 | parameters:
192 | - name: cityid
193 | in: path
194 | description: The id of the city
195 | required: true
196 | type: string
197 | format: string
198 | - name: lat
199 | in: query
200 | description: Latitude of the center point to start the query from
201 | required: true
202 | type: string
203 | format: string
204 | - name: lon
205 | in: query
206 | description: Longitude of the center point to start the query from
207 | required: true
208 | type: string
209 | format: string
210 | - name: lat2
211 | in: query
212 | description: Secondary Latitude for bounding box search
213 | type: string
214 | format: string
215 | - name: lon2
216 | in: query
217 | description: Secondary Longitude for bounding box search
218 | type: string
219 | format: string
220 | - name: search
221 | in: query
222 | description: Fulltext search to be applied
223 | type: string
224 | format: string
225 | - name: offset
226 | in: query
227 | description: The offset of the first index in the result array
228 | type: string
229 | format: string
230 | - name: limit
231 | in: query
232 | description: Limit the returned item count to this value
233 | type: string
234 | format: string
235 | tags:
236 | - Poi
237 | responses:
238 | 200:
239 | description: An array of pois. May be an empty Array.
240 | schema:
241 | type: array
242 | items:
243 | $ref: '#/definitions/Poi'
244 | 400:
245 | description: Bad request
246 | schema:
247 | $ref: '#/definitions/Error'
248 | 401:
249 | description: Unauthorized request
250 | schema:
251 | $ref: '#/definitions/Error'
252 | 500:
253 | description: Internal error
254 | schema:
255 | $ref: '#/definitions/Error'
256 | post:
257 | summary: Create a new poi
258 | description:
259 | To create a new poi record a document with relevant information needs to be posted
260 | parameters:
261 | - name: cityid
262 | in: path
263 | description: The id of the city
264 | required: true
265 | type: string
266 | format: string
267 | - name: poi
268 | in: body
269 | required: true
270 | schema:
271 | $ref: '#/definitions/Poi'
272 | tags:
273 | - Poi
274 | responses:
275 | 200:
276 | description: Registration confirmation
277 | schema:
278 | $ref: '#/definitions/Poi'
279 | 400:
280 | description: Bad request
281 | schema:
282 | $ref: '#/definitions/Error'
283 | 401:
284 | description: Unauthorized request
285 | schema:
286 | $ref: '#/definitions/Error'
287 | 409:
288 | description: User exists already
289 | schema:
290 | $ref: '#/definitions/Error'
291 | 500:
292 | description: Internal error
293 | schema:
294 | $ref: '#/definitions/Error'
295 | /pois:
296 | get:
297 | summary: Get a list of pois for a selected city
298 | description:
299 | A list of pois based on a location and an optional search query can be requested.
300 | parameters:
301 | - name: cityid
302 | in: query
303 | description: The id of the city
304 | required: true
305 | type: string
306 | format: string
307 | - name: lat
308 | in: query
309 | description: Latitude of the center point to start the query from
310 | required: true
311 | type: string
312 | format: string
313 | - name: lon
314 | in: query
315 | description: Longitude of the center point to start the query from
316 | required: true
317 | type: string
318 | format: string
319 | - name: lat2
320 | in: query
321 | description: Secondary Latitude for bounding box search
322 | type: string
323 | format: string
324 | - name: lon2
325 | in: query
326 | description: Secondary Longitude for bounding box search
327 | type: string
328 | format: string
329 | - name: search
330 | in: query
331 | description: Fulltext search to be applied
332 | type: string
333 | format: string
334 | - name: offset
335 | in: query
336 | description: The offset of the first index in the result array
337 | type: string
338 | format: string
339 | - name: limit
340 | in: query
341 | description: Limit the returned item count to this value
342 | type: string
343 | format: string
344 | tags:
345 | - Poi
346 | responses:
347 | 200:
348 | description: An array of pois. May be an empty Array.
349 | schema:
350 | type: array
351 | items:
352 | $ref: '#/definitions/Poi'
353 | 400:
354 | description: Bad request
355 | schema:
356 | $ref: '#/definitions/Error'
357 | 401:
358 | description: Unauthorized request
359 | schema:
360 | $ref: '#/definitions/Error'
361 | 500:
362 | description: Internal error
363 | schema:
364 | $ref: '#/definitions/Error'
365 | post:
366 | summary: Create a new poi
367 | description:
368 | To create a new poi record a document with relevant information needs to be posted
369 | parameters:
370 | - name: cityid
371 | in: query
372 | description: The id of the city
373 | required: true
374 | type: string
375 | format: string
376 | - name: poi
377 | in: body
378 | required: true
379 | schema:
380 | $ref: '#/definitions/Poi'
381 | tags:
382 | - Poi
383 | responses:
384 | 200:
385 | description: Registration confirmation
386 | schema:
387 | $ref: '#/definitions/Poi'
388 | 400:
389 | description: Bad request
390 | schema:
391 | $ref: '#/definitions/Error'
392 | 401:
393 | description: Unauthorized request
394 | schema:
395 | $ref: '#/definitions/Error'
396 | 409:
397 | description: User exists already
398 | schema:
399 | $ref: '#/definitions/Error'
400 | 500:
401 | description: Internal error
402 | schema:
403 | $ref: '#/definitions/Error'
404 | /pois/{poiid}:
405 | get:
406 | summary: Get a single specific poi
407 | description:
408 | A single poi record can be requested by its id
409 | parameters:
410 | - name: poiid
411 | in: path
412 | description: The id of the poi
413 | required: true
414 | type: string
415 | format: string
416 | - name: expand
417 | in: query
418 | description: Name of the poi attribute to fully expand
419 | type: string
420 | format: string
421 | tags:
422 | - Poi
423 | responses:
424 | 200:
425 | description: The poi record
426 | schema:
427 | $ref: '#/definitions/Poi'
428 | 400:
429 | description: Bad request
430 | schema:
431 | $ref: '#/definitions/Error'
432 | 401:
433 | description: Unauthorized request
434 | schema:
435 | $ref: '#/definitions/Error'
436 | 404:
437 | description: Poi not found
438 | schema:
439 | $ref: '#/definitions/Error'
440 | 500:
441 | description: Internal error
442 | schema:
443 | $ref: '#/definitions/Error'
444 | definitions:
445 | Poi:
446 | properties:
447 | name:
448 | type: string
449 | description:
450 | type: string
451 | contact:
452 | $ref: '#/definitions/Contact'
453 | openHours:
454 | type: array
455 | items:
456 | $ref: '#/definitions/OpenHours'
457 | fee:
458 | type: array
459 | items:
460 | $ref: '#/definitions/Fee'
461 | tags:
462 | type: array
463 | items:
464 | type: string
465 | coords:
466 | type: array
467 | items:
468 | type: integer
469 | city:
470 | $ref: '#/definitions/City'
471 | media:
472 | $ref: '#/definitions/Medias'
473 | public:
474 | type: boolean
475 | user:
476 | $ref: '#/definitions/User'
477 | socatt:
478 | $ref: '#/definitions/SocialAttributes'
479 | source:
480 | type: string
481 | Contact:
482 | properties:
483 | address:
484 | type: string
485 | phone:
486 | type: string
487 | link:
488 | type: string
489 | email:
490 | type: string
491 | Fee:
492 | properties:
493 | currency:
494 | type: string
495 | value:
496 | type: number
497 | hint:
498 | type: string
499 | OpenHours:
500 | properties:
501 | frondow:
502 | type: integer
503 | fromtime:
504 | type: integer
505 | todow:
506 | type: integer
507 | totime:
508 | type: integer
509 | startdate:
510 | type: integer
511 | occurance:
512 | type: integer
513 | every:
514 | type: integer
515 | Medias:
516 | properties:
517 | refurl:
518 | type: string
519 | mediaCount:
520 | type: integer
521 | _media:
522 | type: array
523 | items:
524 | $ref: '#/definitions/Media'
525 | Media:
526 | properties:
527 | title:
528 | type: string
529 | url:
530 | type: array
531 | items:
532 | type: string
533 | type:
534 | type: string
535 | user:
536 | $ref: '#/definitions/User'
537 | timestamp:
538 | type: string
539 | featured:
540 | type: boolean
541 | poi:
542 | $ref: '#/definitions/Poi'
543 | attributes:
544 | type: object
545 | coords:
546 | type: array
547 | items:
548 | type: integer
549 | socatt:
550 | $ref: '#/definitions/SocialAttributes'
551 | City:
552 | properties:
553 | locode:
554 | type: string
555 | displayName:
556 | type: string
557 | description:
558 | type: string
559 | locale:
560 | type: string
561 | coords:
562 | type: array
563 | items:
564 | type: integer
565 | socatt:
566 | $ref: '#/definitions/SocialAttributes'
567 | SocialAttributes:
568 | properties:
569 | likes:
570 | $ref: '#/definitions/Likes'
571 | checkins :
572 | $ref: '#/definitions/Checkins'
573 | ratings:
574 | $ref: '#/definitions/Ratings'
575 | comments:
576 | $ref: '#/definitions/Comments'
577 | Likes:
578 | properties:
579 | count:
580 | type: integer
581 | like:
582 | type: array
583 | items:
584 | $ref: '#/definitions/Like'
585 | Like:
586 | properties:
587 | user._user:
588 | $ref: '#/definitions/User'
589 | like:
590 | type: boolean
591 | ts:
592 | type: integer
593 | coords:
594 | type: array
595 | items:
596 | type: integer
597 | city._city:
598 | $ref: '#/definitions/City'
599 | Checkins:
600 | properties:
601 | count:
602 | type: integer
603 | checkin:
604 | type: array
605 | items:
606 | $ref: '#/definitions/Checkin'
607 | Checkin:
608 | properties:
609 | user._user:
610 | $ref: '#/definitions/User'
611 | ts:
612 | type: integer
613 | coords:
614 | type: array
615 | items:
616 | type: integer
617 | city._city:
618 | $ref: '#/definitions/City'
619 | Ratings:
620 | properties:
621 | count:
622 | type: integer
623 | average:
624 | type: integer
625 | rating:
626 | type: array
627 | items:
628 | $ref: '#/definitions/Rating'
629 | Rating:
630 | properties:
631 | user._user:
632 | $ref: '#/definitions/User'
633 | rating:
634 | type: number
635 | ts:
636 | type: integer
637 | coords:
638 | type: array
639 | items:
640 | type: integer
641 | city._city:
642 | $ref: '#/definitions/City'
643 | Comments:
644 | properties:
645 | count:
646 | type: integer
647 | comment:
648 | type: array
649 | items:
650 | $ref: '#/definitions/Comment'
651 | Comment:
652 | properties:
653 | user._user:
654 | $ref: '#/definitions/User'
655 | comment:
656 | type: string
657 | ts:
658 | type: integer
659 | coords:
660 | type: array
661 | items:
662 | type: integer
663 | city._city:
664 | $ref: '#/definitions/City'
665 | Access:
666 | properties:
667 | access_token:
668 | type: string
669 | description: The access token after successful log in. This token is to be used in any subsequent request as header parameter
670 | uid:
671 | type: string
672 | description: The unique identifier for the logged in user
673 | AccessRequest:
674 | properties:
675 | n:
676 | type: string
677 | description: user name of the user to register
678 | a:
679 | type: string
680 | description: email of the user to register
681 | b:
682 | type: string
683 | description: (SHA1) hashed password of the user to register
684 | AccessRequestResponse:
685 | properties:
686 | name:
687 | type: string
688 | description: user name of the registered user
689 | User:
690 | properties:
691 | name:
692 | type: string
693 | description: user name of the linked user
694 | email:
695 | type: string
696 | description: email of the linked user
697 | Error:
698 | properties:
699 | errorType:
700 | type: string
701 | description: One of the following possible values with regard to the request and correlation to the HTTP error code - "wrong_mimetype", "method_not_allowed", "resource_not_found", "resource_conflict", "request_invalid", "request_unauthorized", "internal_server_error"
702 |
703 |
704 |
--------------------------------------------------------------------------------
/web_root/css/jquery.dataTables.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Table styles
3 | */
4 | table.dataTable {
5 | width: 100%;
6 | margin: 0 auto;
7 | clear: both;
8 | border-collapse: separate;
9 | border-spacing: 0;
10 | /*
11 | * Header and footer styles
12 | */
13 | /*
14 | * Body styles
15 | */
16 | }
17 | table.dataTable thead th,
18 | table.dataTable tfoot th {
19 | font-weight: bold;
20 | }
21 | table.dataTable thead th,
22 | table.dataTable thead td {
23 | padding: 10px 18px;
24 | border-bottom: 1px solid #111111;
25 | }
26 | table.dataTable thead th:active,
27 | table.dataTable thead td:active {
28 | outline: none;
29 | }
30 | table.dataTable tfoot th,
31 | table.dataTable tfoot td {
32 | padding: 10px 18px 6px 18px;
33 | border-top: 1px solid #111111;
34 | }
35 | table.dataTable thead .sorting_asc,
36 | table.dataTable thead .sorting_desc,
37 | table.dataTable thead .sorting {
38 | cursor: pointer;
39 | *cursor: hand;
40 | }
41 | table.dataTable thead .sorting {
42 | background: url("../images/sort_both.png") no-repeat center right;
43 | }
44 | table.dataTable thead .sorting_asc {
45 | background: url("../images/sort_asc.png") no-repeat center right;
46 | }
47 | table.dataTable thead .sorting_desc {
48 | background: url("../images/sort_desc.png") no-repeat center right;
49 | }
50 | table.dataTable thead .sorting_asc_disabled {
51 | background: url("../images/sort_asc_disabled.png") no-repeat center right;
52 | }
53 | table.dataTable thead .sorting_desc_disabled {
54 | background: url("../images/sort_desc_disabled.png") no-repeat center right;
55 | }
56 | table.dataTable tbody tr {
57 | background-color: white;
58 | }
59 | table.dataTable tbody tr.selected {
60 | background-color: #b0bed9;
61 | }
62 | table.dataTable tbody th,
63 | table.dataTable tbody td {
64 | padding: 8px 10px;
65 | }
66 | table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
67 | border-top: 1px solid #dddddd;
68 | }
69 | table.dataTable.row-border tbody tr:first-child th,
70 | table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
71 | table.dataTable.display tbody tr:first-child td {
72 | border-top: none;
73 | }
74 | table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
75 | border-top: 1px solid #dddddd;
76 | border-right: 1px solid #dddddd;
77 | }
78 | table.dataTable.cell-border tbody tr th:first-child,
79 | table.dataTable.cell-border tbody tr td:first-child {
80 | border-left: 1px solid #dddddd;
81 | }
82 | table.dataTable.cell-border tbody tr:first-child th,
83 | table.dataTable.cell-border tbody tr:first-child td {
84 | border-top: none;
85 | }
86 | table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
87 | background-color: #f9f9f9;
88 | }
89 | table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
90 | background-color: #abb9d3;
91 | }
92 | table.dataTable.hover tbody tr:hover,
93 | table.dataTable.hover tbody tr.odd:hover,
94 | table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover,
95 | table.dataTable.display tbody tr.odd:hover,
96 | table.dataTable.display tbody tr.even:hover {
97 | background-color: whitesmoke;
98 | }
99 | table.dataTable.hover tbody tr:hover.selected,
100 | table.dataTable.hover tbody tr.odd:hover.selected,
101 | table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected,
102 | table.dataTable.display tbody tr.odd:hover.selected,
103 | table.dataTable.display tbody tr.even:hover.selected {
104 | background-color: #a9b7d1;
105 | }
106 | table.dataTable.order-column tbody tr > .sorting_1,
107 | table.dataTable.order-column tbody tr > .sorting_2,
108 | table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
109 | table.dataTable.display tbody tr > .sorting_2,
110 | table.dataTable.display tbody tr > .sorting_3 {
111 | background-color: #f9f9f9;
112 | }
113 | table.dataTable.order-column tbody tr.selected > .sorting_1,
114 | table.dataTable.order-column tbody tr.selected > .sorting_2,
115 | table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
116 | table.dataTable.display tbody tr.selected > .sorting_2,
117 | table.dataTable.display tbody tr.selected > .sorting_3 {
118 | background-color: #acbad4;
119 | }
120 | table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
121 | background-color: #f1f1f1;
122 | }
123 | table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
124 | background-color: #f3f3f3;
125 | }
126 | table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
127 | background-color: whitesmoke;
128 | }
129 | table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
130 | background-color: #a6b3cd;
131 | }
132 | table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
133 | background-color: #a7b5ce;
134 | }
135 | table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
136 | background-color: #a9b6d0;
137 | }
138 | table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
139 | background-color: #f9f9f9;
140 | }
141 | table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
142 | background-color: #fbfbfb;
143 | }
144 | table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
145 | background-color: #fdfdfd;
146 | }
147 | table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
148 | background-color: #acbad4;
149 | }
150 | table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
151 | background-color: #adbbd6;
152 | }
153 | table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
154 | background-color: #afbdd8;
155 | }
156 | table.dataTable.display tbody tr:hover > .sorting_1,
157 | table.dataTable.display tbody tr.odd:hover > .sorting_1,
158 | table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1,
159 | table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1,
160 | table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 {
161 | background-color: #eaeaea;
162 | }
163 | table.dataTable.display tbody tr:hover > .sorting_2,
164 | table.dataTable.display tbody tr.odd:hover > .sorting_2,
165 | table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2,
166 | table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2,
167 | table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 {
168 | background-color: #ebebeb;
169 | }
170 | table.dataTable.display tbody tr:hover > .sorting_3,
171 | table.dataTable.display tbody tr.odd:hover > .sorting_3,
172 | table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3,
173 | table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3,
174 | table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 {
175 | background-color: #eeeeee;
176 | }
177 | table.dataTable.display tbody tr:hover.selected > .sorting_1,
178 | table.dataTable.display tbody tr.odd:hover.selected > .sorting_1,
179 | table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1,
180 | table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1,
181 | table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 {
182 | background-color: #a1aec7;
183 | }
184 | table.dataTable.display tbody tr:hover.selected > .sorting_2,
185 | table.dataTable.display tbody tr.odd:hover.selected > .sorting_2,
186 | table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2,
187 | table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2,
188 | table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 {
189 | background-color: #a2afc8;
190 | }
191 | table.dataTable.display tbody tr:hover.selected > .sorting_3,
192 | table.dataTable.display tbody tr.odd:hover.selected > .sorting_3,
193 | table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3,
194 | table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3,
195 | table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 {
196 | background-color: #a4b2cb;
197 | }
198 | table.dataTable.no-footer {
199 | border-bottom: 1px solid #111111;
200 | }
201 | table.dataTable.nowrap th, table.dataTable.nowrap td {
202 | white-space: nowrap;
203 | }
204 | table.dataTable.compact thead th,
205 | table.dataTable.compact thead td {
206 | padding: 5px 9px;
207 | }
208 | table.dataTable.compact tfoot th,
209 | table.dataTable.compact tfoot td {
210 | padding: 5px 9px 3px 9px;
211 | }
212 | table.dataTable.compact tbody th,
213 | table.dataTable.compact tbody td {
214 | padding: 4px 5px;
215 | }
216 | table.dataTable th.dt-left,
217 | table.dataTable td.dt-left {
218 | text-align: left;
219 | }
220 | table.dataTable th.dt-center,
221 | table.dataTable td.dt-center,
222 | table.dataTable td.dataTables_empty {
223 | text-align: center;
224 | }
225 | table.dataTable th.dt-right,
226 | table.dataTable td.dt-right {
227 | text-align: right;
228 | }
229 | table.dataTable th.dt-justify,
230 | table.dataTable td.dt-justify {
231 | text-align: justify;
232 | }
233 | table.dataTable th.dt-nowrap,
234 | table.dataTable td.dt-nowrap {
235 | white-space: nowrap;
236 | }
237 | table.dataTable thead th.dt-head-left,
238 | table.dataTable thead td.dt-head-left,
239 | table.dataTable tfoot th.dt-head-left,
240 | table.dataTable tfoot td.dt-head-left {
241 | text-align: left;
242 | }
243 | table.dataTable thead th.dt-head-center,
244 | table.dataTable thead td.dt-head-center,
245 | table.dataTable tfoot th.dt-head-center,
246 | table.dataTable tfoot td.dt-head-center {
247 | text-align: center;
248 | }
249 | table.dataTable thead th.dt-head-right,
250 | table.dataTable thead td.dt-head-right,
251 | table.dataTable tfoot th.dt-head-right,
252 | table.dataTable tfoot td.dt-head-right {
253 | text-align: right;
254 | }
255 | table.dataTable thead th.dt-head-justify,
256 | table.dataTable thead td.dt-head-justify,
257 | table.dataTable tfoot th.dt-head-justify,
258 | table.dataTable tfoot td.dt-head-justify {
259 | text-align: justify;
260 | }
261 | table.dataTable thead th.dt-head-nowrap,
262 | table.dataTable thead td.dt-head-nowrap,
263 | table.dataTable tfoot th.dt-head-nowrap,
264 | table.dataTable tfoot td.dt-head-nowrap {
265 | white-space: nowrap;
266 | }
267 | table.dataTable tbody th.dt-body-left,
268 | table.dataTable tbody td.dt-body-left {
269 | text-align: left;
270 | }
271 | table.dataTable tbody th.dt-body-center,
272 | table.dataTable tbody td.dt-body-center {
273 | text-align: center;
274 | }
275 | table.dataTable tbody th.dt-body-right,
276 | table.dataTable tbody td.dt-body-right {
277 | text-align: right;
278 | }
279 | table.dataTable tbody th.dt-body-justify,
280 | table.dataTable tbody td.dt-body-justify {
281 | text-align: justify;
282 | }
283 | table.dataTable tbody th.dt-body-nowrap,
284 | table.dataTable tbody td.dt-body-nowrap {
285 | white-space: nowrap;
286 | }
287 |
288 | table.dataTable,
289 | table.dataTable th,
290 | table.dataTable td {
291 | -webkit-box-sizing: content-box;
292 | -moz-box-sizing: content-box;
293 | box-sizing: content-box;
294 | }
295 |
296 | /*
297 | * Control feature layout
298 | */
299 | .dataTables_wrapper {
300 | position: relative;
301 | clear: both;
302 | *zoom: 1;
303 | zoom: 1;
304 | }
305 | .dataTables_wrapper .dataTables_length {
306 | float: left;
307 | }
308 | .dataTables_wrapper .dataTables_filter {
309 | float: right;
310 | text-align: right;
311 | }
312 | .dataTables_wrapper .dataTables_filter input {
313 | margin-left: 0.5em;
314 | }
315 | .dataTables_wrapper .dataTables_info {
316 | clear: both;
317 | float: left;
318 | padding-top: 0.755em;
319 | }
320 | .dataTables_wrapper .dataTables_paginate {
321 | float: right;
322 | text-align: right;
323 | padding-top: 0.25em;
324 | }
325 | .dataTables_wrapper .dataTables_paginate .paginate_button {
326 | box-sizing: border-box;
327 | display: inline-block;
328 | min-width: 1.5em;
329 | padding: 0.5em 1em;
330 | margin-left: 2px;
331 | text-align: center;
332 | text-decoration: none !important;
333 | cursor: pointer;
334 | *cursor: hand;
335 | color: #333333 !important;
336 | border: 1px solid transparent;
337 | }
338 | .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
339 | color: #333333 !important;
340 | border: 1px solid #cacaca;
341 | background-color: white;
342 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, gainsboro));
343 | /* Chrome,Safari4+ */
344 | background: -webkit-linear-gradient(top, white 0%, gainsboro 100%);
345 | /* Chrome10+,Safari5.1+ */
346 | background: -moz-linear-gradient(top, white 0%, gainsboro 100%);
347 | /* FF3.6+ */
348 | background: -ms-linear-gradient(top, white 0%, gainsboro 100%);
349 | /* IE10+ */
350 | background: -o-linear-gradient(top, white 0%, gainsboro 100%);
351 | /* Opera 11.10+ */
352 | background: linear-gradient(to bottom, white 0%, gainsboro 100%);
353 | /* W3C */
354 | }
355 | .dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
356 | cursor: default;
357 | color: #666 !important;
358 | border: 1px solid transparent;
359 | background: transparent;
360 | box-shadow: none;
361 | }
362 | .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
363 | color: white !important;
364 | border: 1px solid #111111;
365 | background-color: #585858;
366 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111111));
367 | /* Chrome,Safari4+ */
368 | background: -webkit-linear-gradient(top, #585858 0%, #111111 100%);
369 | /* Chrome10+,Safari5.1+ */
370 | background: -moz-linear-gradient(top, #585858 0%, #111111 100%);
371 | /* FF3.6+ */
372 | background: -ms-linear-gradient(top, #585858 0%, #111111 100%);
373 | /* IE10+ */
374 | background: -o-linear-gradient(top, #585858 0%, #111111 100%);
375 | /* Opera 11.10+ */
376 | background: linear-gradient(to bottom, #585858 0%, #111111 100%);
377 | /* W3C */
378 | }
379 | .dataTables_wrapper .dataTables_paginate .paginate_button:active {
380 | outline: none;
381 | background-color: #2b2b2b;
382 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
383 | /* Chrome,Safari4+ */
384 | background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
385 | /* Chrome10+,Safari5.1+ */
386 | background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
387 | /* FF3.6+ */
388 | background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
389 | /* IE10+ */
390 | background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
391 | /* Opera 11.10+ */
392 | background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
393 | /* W3C */
394 | box-shadow: inset 0 0 3px #111;
395 | }
396 | .dataTables_wrapper .dataTables_processing {
397 | position: absolute;
398 | top: 50%;
399 | left: 50%;
400 | width: 100%;
401 | height: 40px;
402 | margin-left: -50%;
403 | margin-top: -25px;
404 | padding-top: 20px;
405 | text-align: center;
406 | font-size: 1.2em;
407 | background-color: white;
408 | background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
409 | /* Chrome,Safari4+ */
410 | background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
411 | /* Chrome10+,Safari5.1+ */
412 | background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
413 | /* FF3.6+ */
414 | background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
415 | /* IE10+ */
416 | background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
417 | /* Opera 11.10+ */
418 | background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
419 | /* W3C */
420 | }
421 | .dataTables_wrapper .dataTables_length,
422 | .dataTables_wrapper .dataTables_filter,
423 | .dataTables_wrapper .dataTables_info,
424 | .dataTables_wrapper .dataTables_processing,
425 | .dataTables_wrapper .dataTables_paginate {
426 | color: #333333;
427 | }
428 | .dataTables_wrapper .dataTables_scroll {
429 | clear: both;
430 | }
431 | .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
432 | *margin-top: -1px;
433 | -webkit-overflow-scrolling: touch;
434 | }
435 | .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing,
436 | .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing {
437 | height: 0;
438 | overflow: hidden;
439 | margin: 0 !important;
440 | padding: 0 !important;
441 | }
442 | .dataTables_wrapper.no-footer .dataTables_scrollBody {
443 | border-bottom: 1px solid #111111;
444 | }
445 | .dataTables_wrapper.no-footer div.dataTables_scrollHead table,
446 | .dataTables_wrapper.no-footer div.dataTables_scrollBody table {
447 | border-bottom: none;
448 | }
449 | .dataTables_wrapper:after {
450 | visibility: hidden;
451 | display: block;
452 | content: "";
453 | clear: both;
454 | height: 0;
455 | }
456 |
457 | @media screen and (max-width: 767px) {
458 | .dataTables_wrapper .dataTables_info,
459 | .dataTables_wrapper .dataTables_paginate {
460 | float: none;
461 | text-align: center;
462 | }
463 | .dataTables_wrapper .dataTables_paginate {
464 | margin-top: 0.5em;
465 | }
466 | }
467 | @media screen and (max-width: 640px) {
468 | .dataTables_wrapper .dataTables_length,
469 | .dataTables_wrapper .dataTables_filter {
470 | float: none;
471 | text-align: center;
472 | }
473 | .dataTables_wrapper .dataTables_filter {
474 | margin-top: 0.5em;
475 | }
476 | }
477 |
--------------------------------------------------------------------------------
/web_root/css/style.css:
--------------------------------------------------------------------------------
1 | #socials ul{
2 | list-style: none inside;
3 | -webkit-padding-start: 0px;
4 | padding-start: 0px;
5 | }
6 |
7 | .logoutPane {
8 | display: none;
9 | }
10 |
--------------------------------------------------------------------------------
/web_root/images/Sorting icons.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/Sorting icons.psd
--------------------------------------------------------------------------------
/web_root/images/back_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/back_disabled.png
--------------------------------------------------------------------------------
/web_root/images/back_enabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/back_enabled.png
--------------------------------------------------------------------------------
/web_root/images/back_enabled_hover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/back_enabled_hover.png
--------------------------------------------------------------------------------
/web_root/images/forward_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/forward_disabled.png
--------------------------------------------------------------------------------
/web_root/images/forward_enabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/forward_enabled.png
--------------------------------------------------------------------------------
/web_root/images/forward_enabled_hover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/forward_enabled_hover.png
--------------------------------------------------------------------------------
/web_root/images/sort_asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/sort_asc.png
--------------------------------------------------------------------------------
/web_root/images/sort_asc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/sort_asc_disabled.png
--------------------------------------------------------------------------------
/web_root/images/sort_both.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/sort_both.png
--------------------------------------------------------------------------------
/web_root/images/sort_desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/sort_desc.png
--------------------------------------------------------------------------------
/web_root/images/sort_desc_disabled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fraunhoferfokus/OCDB/1eafe7b57729acbf9a7f361a58809330e9a13274/web_root/images/sort_desc_disabled.png
--------------------------------------------------------------------------------
/web_root/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Open City Database | Frontend
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Open City Database | Frontend
20 | Interface for Application Providers and Users
21 |
22 | Login
23 |
30 |
31 |
32 |
33 |
34 | Logout
35 |
38 |
39 |
40 |
41 | Registration
42 |
53 |
54 |
55 |
56 | Cities
57 |
58 |
59 |
60 | City ID
61 | Name
62 | Description
63 | Latitude
64 | Longitude
65 | Action
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 | Pois
78 | Selected City:
79 |
80 |
81 |
82 |
83 |
84 |
85 | POI ID
86 | Name
87 | Description
88 | Latitude
89 | Longitude
90 | Public?
91 | Social
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 | Social Interactions
102 | Selected Poi:
103 |
104 |
105 |
106 |
107 |
108 |
109 | POI ID
110 | Checkins
111 | Comments
112 | Likes
113 | Ratings
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 | Media
124 | Selected Poi:
125 |
126 |
127 |
128 |
144 |
145 |
146 |
147 |
--------------------------------------------------------------------------------
/web_root/index.js:
--------------------------------------------------------------------------------
1 | var loginForm, logoutForm, registerForm;
2 |
3 | window.onload=function(){
4 | var forms = document.querySelectorAll("form");
5 | for(var s in forms){
6 | var action = forms[s].getAttribute && forms[s].getAttribute("action");
7 | if(action && action.indexOf("login")!==-1){
8 | loginForm=forms[s];
9 | loginForm.onsubmit=loginHandler;
10 | }
11 | if(action && action.indexOf("logout")!==-1){
12 | logoutForm=forms[s];
13 | logoutForm.onsubmit=logoutHandler;
14 | }
15 | if(action && action.indexOf("register")!==-1){
16 | registerForm=forms[s];
17 | registerForm.onsubmit=registerHandler;
18 | }
19 | }
20 | }
21 |
22 | var loginHandler = function(e){
23 | e.preventDefault();
24 | var email = ocdb.tools.SHA1(loginForm.querySelector('input[name="email"]').value);
25 | var password = ocdb.tools.SHA1(loginForm.querySelector('input[name="password"]').value);
26 | ocdb.user.login(email, password, loginRequestHandler);
27 | return false;
28 | };
29 |
30 | var logoutHandler = function(e){
31 | e.preventDefault();
32 | ocdb.user.logout(logoutRequestHandler);
33 | return false;
34 | };
35 |
36 | var registerHandler = function(e){
37 | e.preventDefault();
38 | var name = registerForm.querySelector('input[name="name"]').value;
39 | var email = registerForm.querySelector('input[name="email"]').value;
40 | var password = ocdb.tools.SHA1(registerForm.querySelector('input[name="password"]').value);
41 | var password2 = ocdb.tools.SHA1(registerForm.querySelector('input[name="repassword"]').value);
42 |
43 | if(password!==password2){
44 | registerForm.querySelector('input[name="repassword"]').value="";
45 | registerForm.querySelector('input[name="repassword"]').setAttribute("placeholder","passwords do not match!");
46 | return false;
47 | }
48 |
49 | ocdb.user.register(name, email, password, registerRequestHandler);
50 | return false;
51 | };
52 |
53 | var loginRequestHandler = function(err,response){
54 | if(err){
55 | document.querySelector("#loginErr").innerText="error:"+err;
56 | return;
57 | }
58 | document.querySelector("#loginErr").innerText="";
59 | document.querySelector(".logoutPane").style.display="inherit";
60 | document.querySelector(".loginPane").style.display="none";
61 | document.querySelector(".registerPane").style.display="none";
62 | if(response&&response.access_token){
63 | document.querySelector("#accesstoken").innerHTML="Access token: "+response.access_token+
64 | ' View data below or use the API console . '
67 |
68 | }
69 | console.log(err,response);
70 | if(ocdb.user.getUid()){
71 | //$('#cities').DataTable();
72 | initCityDt('#cities',
73 | (function(){
74 | return function(options,cb){
75 | var opt={lat:53,lon:13};
76 | opt.limit=options.length;
77 | opt.offset=options.start;
78 | opt.search=options.search&&options.search.value||'';
79 | ocdb.cities.get(opt,function(e,r,meta){
80 | if(!e)
81 | cb({data:r,draw:options.draw,recordsTotal:meta.recordsTotal,recordsFiltered:meta.recordsFiltered});
82 | })}
83 | })()
84 | );
85 | }
86 | }
87 |
88 | var logoutRequestHandler = function(err,response){
89 | console.log(err,response);
90 | document.querySelector(".logoutPane").style.display="none";
91 | document.querySelector(".loginPane").style.display="";
92 | document.querySelector(".registerPane").style.display="";
93 | $("#cities").DataTable().clear().destroy();
94 | $("#pois").DataTable().clear().destroy();
95 | $("#socials").DataTable().clear().destroy();
96 | $("#medias").DataTable().clear().destroy();
97 | }
98 |
99 | var registerRequestHandler = function(err,response){
100 | console.log(err,response);
101 | if(err){
102 | document.querySelector("#registerErr").innerText="error:"+err;
103 | return;
104 | }
105 | document.querySelector("#registerErr").innerText="";
106 | }
107 |
108 | window.addEventListener("hashchange",function(){
109 | var hashMap={}, hash = location.hash.substring(1);
110 | hash=hash.split("&");
111 | for(var i=0;iview';
221 | } }
222 | ],
223 | "preDrawCallback" : function() {
224 | // Initialize the responsive datatables helper once.
225 |
226 | },
227 | "rowCallback" : function(nRow) {
228 | },
229 | "drawCallback" : function(oSettings) {
230 |
231 | }
232 | });
233 | };
234 |
235 | var initPoiDt = function(tableId, ajaxFn) {
236 | var $table = $(tableId);
237 | $table.DataTable().clear().destroy();
238 |
239 | // names for column ordering
240 | $table.data('colnames', ['_id', 'name', 'description', 'lat', 'lon', 'public', '']);
241 |
242 | return $table.dataTable({
243 | "autoWidth" : true,
244 | "processing": true,
245 | "serverSide": true,
246 | "ajax": ajaxFn,
247 | "columns": [
248 |
249 | { "data": "_id" },
250 | { "data": "name" },
251 | { "data": function ( data, type, row) {
252 | return data.description || '';
253 | } },
254 | { "data": function ( data, type, row) {
255 | return data && data.coords[1] || '';
256 | } },
257 | { "data": function ( data, type, row) {
258 | return data && data.coords[0] || '';
259 | } },
260 | { "data": function ( data, type, row) {
261 | var str = 'yes*';
262 | if(data.user&&(ocdb.user.getUid()===data.user._user||ocdb.user.getUid()===data.user._user._id)){
263 | if(data && data.public){
264 | str = 'yes ';
265 | } else {
266 | str = 'no ';
267 | }
268 | }
269 | return str;
270 | } },
271 | { "data": function ( data, type, row) {
272 | var str='';
273 | if(data.socatt){
274 | if(data.socatt.checkins.count){
275 | str=str+data.socatt.checkins.count+' checkins. ';
276 | }
277 | if(data.socatt.comments.count){
278 | str=str+data.socatt.comments.count+' comments. ';
279 | }
280 | if(data.socatt.likes.count){
281 | str=str+data.socatt.likes.count+' likes. ';
282 | }
283 | if(data.socatt.ratings.count){
284 | str=str+data.socatt.ratings.count+' ratings with ave '+data.socatt.ratings.average+'. ';
285 | }
286 | }
287 | if(str){
288 | str = str + 'view ';
289 | }
290 | if(data.media && data.media._media &&data.media._media.length){
291 | if(str) str+=" "
292 | str=str+data.media._media.length+' images . ';
293 | }
294 | return str||'-';
295 | } },
296 | ],
297 | "preDrawCallback" : function() {
298 | // Initialize the responsive datatables helper once.
299 |
300 | },
301 | "rowCallback" : function(nRow) {
302 | },
303 | "drawCallback" : function(oSettings) {
304 |
305 | }
306 | });
307 | };
308 |
309 | var initSocialDt = function(tableId, ajaxFn) {
310 | var $table = $(tableId);
311 | $table.DataTable().clear().destroy();
312 |
313 | // names for column ordering
314 | $table.data('colnames', ['_id', 'checkins', 'comments', 'likes', 'ratings']);
315 |
316 | return $table.dataTable({
317 | "bPaginate": false,
318 | "bFilter": false,
319 | "bInfo": false,
320 | 'bSortable': false,
321 | "autoWidth" : true,
322 | "processing": true,
323 | "serverSide": true,
324 | "ajax": ajaxFn,
325 | "columns": [
326 |
327 | { "data": "_id" },
328 | { "data": function ( data, type, row) {
329 | //checkins
330 | var str="";
331 | if(data.socatt){
332 | if(data.socatt.checkins.checkin.length){
333 | str+="";
334 | for(var i=0;iAt lat:"+data.socatt.checkins.checkin[i].coords[1]+", lon:"+data.socatt.checkins.checkin[i].coords[0]+""+(new Date(data.socatt.checkins.checkin[i].ts).toString())+" by "+data.socatt.checkins.checkin[i].user._user.name+" ";
336 | }
337 | str+=" ";
338 | }
339 | }
340 | return str?str:"-";
341 | } },
342 | { "data": function ( data, type, row) {
343 | //comments
344 | var str="";
345 | if(data.socatt){
346 | if(data.socatt.comments.comment.length){
347 | str+="";
352 | }
353 | if(data.socatt.likes.like.length){
354 |
355 | }
356 | if(data.socatt.ratings.rating.length){
357 |
358 | }
359 | }
360 | return str?str:"-";
361 | } },
362 | { "data": function ( data, type, row) {
363 | var str="";
364 | if(data.socatt){
365 | if(data.socatt.likes.like.length){
366 | str+="";
371 | }
372 | }
373 | return str?str:"-";
374 | } },
375 | { "data": function ( data, type, row) {
376 | var str="";
377 | if(data.socatt){
378 | if(data.socatt.ratings.rating.length){
379 | str+="";
384 | }
385 | }
386 | return str?str:"-";
387 | } },
388 | ],
389 | "preDrawCallback" : function() {
390 | // Initialize the responsive datatables helper once.
391 |
392 | },
393 | "rowCallback" : function(nRow) {
394 | },
395 | "drawCallback" : function(oSettings) {
396 |
397 | }
398 | });
399 | };
400 |
401 | var initMediaDt = function(tableId, ajaxFn) {
402 | var $table = $(tableId);
403 | $table.DataTable().clear().destroy();
404 |
405 | // names for column ordering
406 | $table.data('colnames', ['_id', 'type', 'timestamp', 'user', 'url', '']);
407 |
408 | return $table.dataTable({
409 | "bPaginate": false,
410 | "bFilter": false,
411 | "bInfo": false,
412 | 'bSortable': false,
413 | "autoWidth" : true,
414 | "processing": true,
415 | "serverSide": true,
416 | "ajax": ajaxFn,
417 | "columns": [
418 |
419 | { "data": "_id" },
420 | { "data": "type" },
421 | { "data": function ( data, type, row) {
422 | return new Date(parseInt(data.timestamp)).toString();
423 | } },
424 | { "data": function ( data, type, row) {
425 | if(!data.user||!data.user._user) return "-";
426 | return "by "+data.user._user.name+" ";
427 | } },
428 | { "data": function ( data, type, row) {
429 | return " ";
430 | } },
431 | { "data": function ( data, type, row) {
432 | if(!data.user||!data.user._user||ocdb.user.getUid()===data.user._user._id){
433 | return ' delete! ';
434 | }
435 | return "-";
436 | } },
437 | ],
438 | "preDrawCallback" : function() {
439 | // Initialize the responsive datatables helper once.
440 |
441 | },
442 | "rowCallback" : function(nRow) {
443 | },
444 | "drawCallback" : function(oSettings) {
445 |
446 | }
447 | });
448 | };
449 |
--------------------------------------------------------------------------------
/web_root/jquery.dataTables.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Table styles
3 | */
4 | table.dataTable {
5 | width: 100%;
6 | margin: 0 auto;
7 | clear: both;
8 | border-collapse: separate;
9 | border-spacing: 0;
10 | /*
11 | * Header and footer styles
12 | */
13 | /*
14 | * Body styles
15 | */
16 | }
17 | table.dataTable thead th,
18 | table.dataTable tfoot th {
19 | font-weight: bold;
20 | }
21 | table.dataTable thead th,
22 | table.dataTable thead td {
23 | padding: 10px 18px;
24 | border-bottom: 1px solid #111111;
25 | }
26 | table.dataTable thead th:active,
27 | table.dataTable thead td:active {
28 | outline: none;
29 | }
30 | table.dataTable tfoot th,
31 | table.dataTable tfoot td {
32 | padding: 10px 18px 6px 18px;
33 | border-top: 1px solid #111111;
34 | }
35 | table.dataTable thead .sorting_asc,
36 | table.dataTable thead .sorting_desc,
37 | table.dataTable thead .sorting {
38 | cursor: pointer;
39 | *cursor: hand;
40 | }
41 | table.dataTable thead .sorting {
42 | background: url("../images/sort_both.png") no-repeat center right;
43 | }
44 | table.dataTable thead .sorting_asc {
45 | background: url("../images/sort_asc.png") no-repeat center right;
46 | }
47 | table.dataTable thead .sorting_desc {
48 | background: url("../images/sort_desc.png") no-repeat center right;
49 | }
50 | table.dataTable thead .sorting_asc_disabled {
51 | background: url("../images/sort_asc_disabled.png") no-repeat center right;
52 | }
53 | table.dataTable thead .sorting_desc_disabled {
54 | background: url("../images/sort_desc_disabled.png") no-repeat center right;
55 | }
56 | table.dataTable tbody tr {
57 | background-color: white;
58 | }
59 | table.dataTable tbody tr.selected {
60 | background-color: #b0bed9;
61 | }
62 | table.dataTable tbody th,
63 | table.dataTable tbody td {
64 | padding: 8px 10px;
65 | }
66 | table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
67 | border-top: 1px solid #dddddd;
68 | }
69 | table.dataTable.row-border tbody tr:first-child th,
70 | table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
71 | table.dataTable.display tbody tr:first-child td {
72 | border-top: none;
73 | }
74 | table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
75 | border-top: 1px solid #dddddd;
76 | border-right: 1px solid #dddddd;
77 | }
78 | table.dataTable.cell-border tbody tr th:first-child,
79 | table.dataTable.cell-border tbody tr td:first-child {
80 | border-left: 1px solid #dddddd;
81 | }
82 | table.dataTable.cell-border tbody tr:first-child th,
83 | table.dataTable.cell-border tbody tr:first-child td {
84 | border-top: none;
85 | }
86 | table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
87 | background-color: #f9f9f9;
88 | }
89 | table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
90 | background-color: #abb9d3;
91 | }
92 | table.dataTable.hover tbody tr:hover,
93 | table.dataTable.hover tbody tr.odd:hover,
94 | table.dataTable.hover tbody tr.even:hover, table.dataTable.display tbody tr:hover,
95 | table.dataTable.display tbody tr.odd:hover,
96 | table.dataTable.display tbody tr.even:hover {
97 | background-color: whitesmoke;
98 | }
99 | table.dataTable.hover tbody tr:hover.selected,
100 | table.dataTable.hover tbody tr.odd:hover.selected,
101 | table.dataTable.hover tbody tr.even:hover.selected, table.dataTable.display tbody tr:hover.selected,
102 | table.dataTable.display tbody tr.odd:hover.selected,
103 | table.dataTable.display tbody tr.even:hover.selected {
104 | background-color: #a9b7d1;
105 | }
106 | table.dataTable.order-column tbody tr > .sorting_1,
107 | table.dataTable.order-column tbody tr > .sorting_2,
108 | table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
109 | table.dataTable.display tbody tr > .sorting_2,
110 | table.dataTable.display tbody tr > .sorting_3 {
111 | background-color: #f9f9f9;
112 | }
113 | table.dataTable.order-column tbody tr.selected > .sorting_1,
114 | table.dataTable.order-column tbody tr.selected > .sorting_2,
115 | table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
116 | table.dataTable.display tbody tr.selected > .sorting_2,
117 | table.dataTable.display tbody tr.selected > .sorting_3 {
118 | background-color: #acbad4;
119 | }
120 | table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
121 | background-color: #f1f1f1;
122 | }
123 | table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
124 | background-color: #f3f3f3;
125 | }
126 | table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
127 | background-color: whitesmoke;
128 | }
129 | table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
130 | background-color: #a6b3cd;
131 | }
132 | table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
133 | background-color: #a7b5ce;
134 | }
135 | table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
136 | background-color: #a9b6d0;
137 | }
138 | table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
139 | background-color: #f9f9f9;
140 | }
141 | table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
142 | background-color: #fbfbfb;
143 | }
144 | table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
145 | background-color: #fdfdfd;
146 | }
147 | table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
148 | background-color: #acbad4;
149 | }
150 | table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
151 | background-color: #adbbd6;
152 | }
153 | table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
154 | background-color: #afbdd8;
155 | }
156 | table.dataTable.display tbody tr:hover > .sorting_1,
157 | table.dataTable.display tbody tr.odd:hover > .sorting_1,
158 | table.dataTable.display tbody tr.even:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1,
159 | table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_1,
160 | table.dataTable.order-column.hover tbody tr.even:hover > .sorting_1 {
161 | background-color: #eaeaea;
162 | }
163 | table.dataTable.display tbody tr:hover > .sorting_2,
164 | table.dataTable.display tbody tr.odd:hover > .sorting_2,
165 | table.dataTable.display tbody tr.even:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2,
166 | table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_2,
167 | table.dataTable.order-column.hover tbody tr.even:hover > .sorting_2 {
168 | background-color: #ebebeb;
169 | }
170 | table.dataTable.display tbody tr:hover > .sorting_3,
171 | table.dataTable.display tbody tr.odd:hover > .sorting_3,
172 | table.dataTable.display tbody tr.even:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3,
173 | table.dataTable.order-column.hover tbody tr.odd:hover > .sorting_3,
174 | table.dataTable.order-column.hover tbody tr.even:hover > .sorting_3 {
175 | background-color: #eeeeee;
176 | }
177 | table.dataTable.display tbody tr:hover.selected > .sorting_1,
178 | table.dataTable.display tbody tr.odd:hover.selected > .sorting_1,
179 | table.dataTable.display tbody tr.even:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1,
180 | table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_1,
181 | table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_1 {
182 | background-color: #a1aec7;
183 | }
184 | table.dataTable.display tbody tr:hover.selected > .sorting_2,
185 | table.dataTable.display tbody tr.odd:hover.selected > .sorting_2,
186 | table.dataTable.display tbody tr.even:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2,
187 | table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_2,
188 | table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_2 {
189 | background-color: #a2afc8;
190 | }
191 | table.dataTable.display tbody tr:hover.selected > .sorting_3,
192 | table.dataTable.display tbody tr.odd:hover.selected > .sorting_3,
193 | table.dataTable.display tbody tr.even:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3,
194 | table.dataTable.order-column.hover tbody tr.odd:hover.selected > .sorting_3,
195 | table.dataTable.order-column.hover tbody tr.even:hover.selected > .sorting_3 {
196 | background-color: #a4b2cb;
197 | }
198 | table.dataTable.no-footer {
199 | border-bottom: 1px solid #111111;
200 | }
201 | table.dataTable.nowrap th, table.dataTable.nowrap td {
202 | white-space: nowrap;
203 | }
204 | table.dataTable.compact thead th,
205 | table.dataTable.compact thead td {
206 | padding: 5px 9px;
207 | }
208 | table.dataTable.compact tfoot th,
209 | table.dataTable.compact tfoot td {
210 | padding: 5px 9px 3px 9px;
211 | }
212 | table.dataTable.compact tbody th,
213 | table.dataTable.compact tbody td {
214 | padding: 4px 5px;
215 | }
216 | table.dataTable th.dt-left,
217 | table.dataTable td.dt-left {
218 | text-align: left;
219 | }
220 | table.dataTable th.dt-center,
221 | table.dataTable td.dt-center,
222 | table.dataTable td.dataTables_empty {
223 | text-align: center;
224 | }
225 | table.dataTable th.dt-right,
226 | table.dataTable td.dt-right {
227 | text-align: right;
228 | }
229 | table.dataTable th.dt-justify,
230 | table.dataTable td.dt-justify {
231 | text-align: justify;
232 | }
233 | table.dataTable th.dt-nowrap,
234 | table.dataTable td.dt-nowrap {
235 | white-space: nowrap;
236 | }
237 | table.dataTable thead th.dt-head-left,
238 | table.dataTable thead td.dt-head-left,
239 | table.dataTable tfoot th.dt-head-left,
240 | table.dataTable tfoot td.dt-head-left {
241 | text-align: left;
242 | }
243 | table.dataTable thead th.dt-head-center,
244 | table.dataTable thead td.dt-head-center,
245 | table.dataTable tfoot th.dt-head-center,
246 | table.dataTable tfoot td.dt-head-center {
247 | text-align: center;
248 | }
249 | table.dataTable thead th.dt-head-right,
250 | table.dataTable thead td.dt-head-right,
251 | table.dataTable tfoot th.dt-head-right,
252 | table.dataTable tfoot td.dt-head-right {
253 | text-align: right;
254 | }
255 | table.dataTable thead th.dt-head-justify,
256 | table.dataTable thead td.dt-head-justify,
257 | table.dataTable tfoot th.dt-head-justify,
258 | table.dataTable tfoot td.dt-head-justify {
259 | text-align: justify;
260 | }
261 | table.dataTable thead th.dt-head-nowrap,
262 | table.dataTable thead td.dt-head-nowrap,
263 | table.dataTable tfoot th.dt-head-nowrap,
264 | table.dataTable tfoot td.dt-head-nowrap {
265 | white-space: nowrap;
266 | }
267 | table.dataTable tbody th.dt-body-left,
268 | table.dataTable tbody td.dt-body-left {
269 | text-align: left;
270 | }
271 | table.dataTable tbody th.dt-body-center,
272 | table.dataTable tbody td.dt-body-center {
273 | text-align: center;
274 | }
275 | table.dataTable tbody th.dt-body-right,
276 | table.dataTable tbody td.dt-body-right {
277 | text-align: right;
278 | }
279 | table.dataTable tbody th.dt-body-justify,
280 | table.dataTable tbody td.dt-body-justify {
281 | text-align: justify;
282 | }
283 | table.dataTable tbody th.dt-body-nowrap,
284 | table.dataTable tbody td.dt-body-nowrap {
285 | white-space: nowrap;
286 | }
287 |
288 | table.dataTable,
289 | table.dataTable th,
290 | table.dataTable td {
291 | -webkit-box-sizing: content-box;
292 | -moz-box-sizing: content-box;
293 | box-sizing: content-box;
294 | }
295 |
296 | /*
297 | * Control feature layout
298 | */
299 | .dataTables_wrapper {
300 | position: relative;
301 | clear: both;
302 | *zoom: 1;
303 | zoom: 1;
304 | }
305 | .dataTables_wrapper .dataTables_length {
306 | float: left;
307 | }
308 | .dataTables_wrapper .dataTables_filter {
309 | float: right;
310 | text-align: right;
311 | }
312 | .dataTables_wrapper .dataTables_filter input {
313 | margin-left: 0.5em;
314 | }
315 | .dataTables_wrapper .dataTables_info {
316 | clear: both;
317 | float: left;
318 | padding-top: 0.755em;
319 | }
320 | .dataTables_wrapper .dataTables_paginate {
321 | float: right;
322 | text-align: right;
323 | padding-top: 0.25em;
324 | }
325 | .dataTables_wrapper .dataTables_paginate .paginate_button {
326 | box-sizing: border-box;
327 | display: inline-block;
328 | min-width: 1.5em;
329 | padding: 0.5em 1em;
330 | margin-left: 2px;
331 | text-align: center;
332 | text-decoration: none !important;
333 | cursor: pointer;
334 | *cursor: hand;
335 | color: #333333 !important;
336 | border: 1px solid transparent;
337 | }
338 | .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
339 | color: #333333 !important;
340 | border: 1px solid #cacaca;
341 | background-color: white;
342 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, gainsboro));
343 | /* Chrome,Safari4+ */
344 | background: -webkit-linear-gradient(top, white 0%, gainsboro 100%);
345 | /* Chrome10+,Safari5.1+ */
346 | background: -moz-linear-gradient(top, white 0%, gainsboro 100%);
347 | /* FF3.6+ */
348 | background: -ms-linear-gradient(top, white 0%, gainsboro 100%);
349 | /* IE10+ */
350 | background: -o-linear-gradient(top, white 0%, gainsboro 100%);
351 | /* Opera 11.10+ */
352 | background: linear-gradient(to bottom, white 0%, gainsboro 100%);
353 | /* W3C */
354 | }
355 | .dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
356 | cursor: default;
357 | color: #666 !important;
358 | border: 1px solid transparent;
359 | background: transparent;
360 | box-shadow: none;
361 | }
362 | .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
363 | color: white !important;
364 | border: 1px solid #111111;
365 | background-color: #585858;
366 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111111));
367 | /* Chrome,Safari4+ */
368 | background: -webkit-linear-gradient(top, #585858 0%, #111111 100%);
369 | /* Chrome10+,Safari5.1+ */
370 | background: -moz-linear-gradient(top, #585858 0%, #111111 100%);
371 | /* FF3.6+ */
372 | background: -ms-linear-gradient(top, #585858 0%, #111111 100%);
373 | /* IE10+ */
374 | background: -o-linear-gradient(top, #585858 0%, #111111 100%);
375 | /* Opera 11.10+ */
376 | background: linear-gradient(to bottom, #585858 0%, #111111 100%);
377 | /* W3C */
378 | }
379 | .dataTables_wrapper .dataTables_paginate .paginate_button:active {
380 | outline: none;
381 | background-color: #2b2b2b;
382 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
383 | /* Chrome,Safari4+ */
384 | background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
385 | /* Chrome10+,Safari5.1+ */
386 | background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
387 | /* FF3.6+ */
388 | background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
389 | /* IE10+ */
390 | background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
391 | /* Opera 11.10+ */
392 | background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
393 | /* W3C */
394 | box-shadow: inset 0 0 3px #111;
395 | }
396 | .dataTables_wrapper .dataTables_processing {
397 | position: absolute;
398 | top: 50%;
399 | left: 50%;
400 | width: 100%;
401 | height: 40px;
402 | margin-left: -50%;
403 | margin-top: -25px;
404 | padding-top: 20px;
405 | text-align: center;
406 | font-size: 1.2em;
407 | background-color: white;
408 | background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
409 | /* Chrome,Safari4+ */
410 | background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
411 | /* Chrome10+,Safari5.1+ */
412 | background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
413 | /* FF3.6+ */
414 | background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
415 | /* IE10+ */
416 | background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
417 | /* Opera 11.10+ */
418 | background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
419 | /* W3C */
420 | }
421 | .dataTables_wrapper .dataTables_length,
422 | .dataTables_wrapper .dataTables_filter,
423 | .dataTables_wrapper .dataTables_info,
424 | .dataTables_wrapper .dataTables_processing,
425 | .dataTables_wrapper .dataTables_paginate {
426 | color: #333333;
427 | }
428 | .dataTables_wrapper .dataTables_scroll {
429 | clear: both;
430 | }
431 | .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
432 | *margin-top: -1px;
433 | -webkit-overflow-scrolling: touch;
434 | }
435 | .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing,
436 | .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing {
437 | height: 0;
438 | overflow: hidden;
439 | margin: 0 !important;
440 | padding: 0 !important;
441 | }
442 | .dataTables_wrapper.no-footer .dataTables_scrollBody {
443 | border-bottom: 1px solid #111111;
444 | }
445 | .dataTables_wrapper.no-footer div.dataTables_scrollHead table,
446 | .dataTables_wrapper.no-footer div.dataTables_scrollBody table {
447 | border-bottom: none;
448 | }
449 | .dataTables_wrapper:after {
450 | visibility: hidden;
451 | display: block;
452 | content: "";
453 | clear: both;
454 | height: 0;
455 | }
456 |
457 | @media screen and (max-width: 767px) {
458 | .dataTables_wrapper .dataTables_info,
459 | .dataTables_wrapper .dataTables_paginate {
460 | float: none;
461 | text-align: center;
462 | }
463 | .dataTables_wrapper .dataTables_paginate {
464 | margin-top: 0.5em;
465 | }
466 | }
467 | @media screen and (max-width: 640px) {
468 | .dataTables_wrapper .dataTables_length,
469 | .dataTables_wrapper .dataTables_filter {
470 | float: none;
471 | text-align: center;
472 | }
473 | .dataTables_wrapper .dataTables_filter {
474 | margin-top: 0.5em;
475 | }
476 | }
477 |
--------------------------------------------------------------------------------
/web_root/ocdb-client.js:
--------------------------------------------------------------------------------
1 | //var OCDBBASEURL = "///"+location.host+"/v1/";
2 | var OCDBHOST = "localhost";
3 | if(document.location.hash && document.location.hash.split("#ocdb=")[1]){
4 | OCDBHOST = document.location.hash.split("#ocdb=")[1];
5 | }
6 |
7 | var OCDBBASEURL = "https://"+OCDBHOST+"/v1/";
8 |
9 | //ocdb related
10 | (function(){
11 |
12 | var getCities = function(options, cb){
13 | var url = OCDBBASEURL+"cities/?q=1";
14 | if(options.lat) url+="&lat="+options.lat;
15 | if(options.lon) url+="&lon="+options.lon;
16 | if(options.offset) url+="&offset="+options.offset;
17 | if(options.limit) url+="&limit="+options.limit;
18 | if(options.search) url+="&search="+options.search;
19 | sendRequest(url,cb,0);
20 | };
21 |
22 | var getCity = function(options, cb){
23 | var url = OCDBBASEURL+"cities/?q=1";
24 | if(options.lat) url+="&lat="+options.lat;
25 | if(options.lon) url+="&lon="+options.lon;
26 | if(options.offset) url+="&offset=0";
27 | if(options.limit) url+="&limit=1";
28 | if(options.name) url+="&name="+options.name;
29 | sendRequest(url,cb,0);
30 | };
31 |
32 | var postPoi = function(poi, cityid, options, cb){
33 | var url = OCDBBASEURL+"cities/"+cityid+"/pois?q=1";
34 | sendRequest(url,cb,poi);
35 | };
36 |
37 | var getPois = function(cityid, options, cb){
38 | var url = OCDBBASEURL+"cities/"+cityid+"/pois?q=1";
39 | if(options.lat) url+="&lat="+options.lat;
40 | if(options.lon) url+="&lon="+options.lon;
41 | if(options.offset) url+="&offset="+options.offset;
42 | if(options.limit) url+="&limit="+options.limit;
43 | if(options.expand) url+="&expand="+options.expand;
44 | if(options.search) url+="&search="+options.search;
45 | sendRequest(url,cb,0);
46 | };
47 |
48 | var getPoi = function(poiid, options, cb){
49 | var url = OCDBBASEURL+"pois/"+poiid+"/?q=1";
50 | if(options.expand) url+="&expand="+options.expand;
51 | sendRequest(url,cb,0);
52 | };
53 |
54 | var checkinPoi = function(poiid, options, cb){
55 | var url = OCDBBASEURL+"pois/"+poiid+"/checkin?q=1";
56 | var body = {};
57 | if(options.lat && options.lon) body.coords = [options.lon, options.lat];
58 | sendRequest(url,cb,body);
59 | };
60 |
61 | var commentPoi = function(poiid, options, cb){
62 | var url = OCDBBASEURL+"pois/"+poiid+"/comment?q=1";
63 | var body = {};
64 | if(options.lat && options.lon) body.coords = [options.lon, options.lat];
65 | if(options.comment) body.comment = options.comment;
66 | sendRequest(url,cb,body);
67 | };
68 |
69 | var getPoiComments = function(poiid, options, cb){
70 | var url = OCDBBASEURL+"pois/"+poiid+"/comment?q=1";
71 | if(options.offset) url+="&offset="+options.offset;
72 | if(options.limit) url+="&limit="+options.limit;
73 | sendRequest(url,cb,0);
74 | };
75 |
76 | var likePoi = function(poiid, options, cb){
77 | var url = OCDBBASEURL+"pois/"+poiid+"/like?q=1";
78 | var body = {};
79 | if(options.lat && options.lon) body.coords = [options.lon, options.lat];
80 | if(typeof options.like === "boolean") body.like = options.like;
81 | sendRequest(url,cb,body);
82 | };
83 |
84 | var ratingPoi = function(poiid, options, cb){
85 | var url = OCDBBASEURL+"pois/"+poiid+"/rating?q=1";
86 | var body = {};
87 | if(options.lat && options.lon) body.coords = [options.lon, options.lat];
88 | if(typeof options.rating === "number") body.rating = options.rating;
89 | sendRequest(url,cb,body);
90 | };
91 |
92 | var getMedia = function(poiid, options, cb){
93 | var url = OCDBBASEURL+"pois/"+poiid+"/media?q=1";
94 | if(options.offset) url+="&offset="+options.offset;
95 | if(options.limit) url+="&limit="+options.limit;
96 | sendRequest(url,cb,0);
97 | };
98 |
99 | var removeMedia = function(mediaid, options, cb){
100 | var url = OCDBBASEURL+"media/"+mediaid+"/?q=1";
101 | sendRequest(url,cb,0,"DELETE");
102 | };
103 |
104 | var postMedia = function(media, poiid, options, cb){
105 | var url = OCDBBASEURL+"pois/"+poiid+"/media?q=1";
106 | sendRequest(url,cb,media);
107 | };
108 |
109 | var updateMedia = function(media, options, cb){
110 | if(!media._id) {
111 | cb(404,{});
112 | return;
113 | }
114 | var url = OCDBBASEURL+"media/"+media._id+"?q=1";
115 | sendRequest(url,cb,media);
116 | };
117 |
118 | var authZ = false, uid = null;
119 |
120 | var login = function(email, password, cb){
121 | if(!email || !password) {
122 | cb(404,{});
123 | return;
124 | }
125 | var url = OCDBBASEURL+"users?a="+email+"&b="+password;
126 | sendRequest(url,function(e,r){
127 | if(e || !r || !r.access_token){
128 | authZ = false;
129 | uid = null;
130 | } else {
131 | authZ = r.access_token;
132 | uid = r.uid;
133 | }
134 | cb(e,r);
135 | });
136 | };
137 |
138 | var setAttributes = function(appPrefix, attributes, cb){
139 | if(!appPrefix || !attributes) {
140 | cb(404,{});
141 | return;
142 | }
143 | var url = OCDBBASEURL+"users";
144 | sendRequest(url,cb,{p:appPrefix, r:attributes});
145 | }
146 |
147 | var getAttributes = function(appPrefix, cb){
148 | var url = OCDBBASEURL+"users?p="+appPrefix;
149 | sendRequest(url,cb);
150 | }
151 |
152 | var setAuthZ = function(_authZ){
153 | authZ = _authZ;
154 | }
155 |
156 | var getUid = function(){
157 | return uid;
158 | }
159 |
160 | var logout = function(cb){
161 | var url = OCDBBASEURL+"users?a=&b=";
162 | sendRequest(url,function(e,r){
163 | if(!e && r){
164 | authZ = false;
165 | }
166 | cb(e,r);
167 | });
168 | };
169 |
170 | var register = function(name, email, password, cb){
171 | if(!name || !email || !password) {
172 | cb(404,{});
173 | return;
174 | }
175 | var url = OCDBBASEURL+"users";
176 | sendRequest(url,cb,{n:name,a:email,b:password});
177 | };
178 |
179 | var distinctLocations = function(l1, l2){
180 | if(!l1 || !l2) return true;
181 | //roughly check if new location is much different than the one we already know
182 | var R = 6371;
183 | var dLat = (l2.coords.latitude-l1.coords.latitude)*(Math.PI/180);
184 | var dLon = (l2.coords.longitude-l1.coords.longitude)*(Math.PI/180);
185 | var a =
186 | Math.sin(dLat/2) * Math.sin(dLat/2) +
187 | Math.cos((Math.PI/180)*(l1.coords.latitude)) * Math.cos((Math.PI/180)*(l2.coords.latitude)) *
188 | Math.sin(dLon/2) * Math.sin(dLon/2);
189 | var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
190 | var d = R * c; // Distance in km
191 | return d>0.1;
192 | };
193 |
194 | if(!window.ocdb) window.ocdb={};
195 | if(!window.ocdb.cities) window.ocdb.cities={};
196 | window.ocdb.cities = {
197 | get:getCities
198 | };
199 | window.ocdb.city = {
200 | get:getCity
201 | };
202 | window.ocdb.pois = {
203 | get:getPois,
204 | post:postPoi
205 | };
206 | window.ocdb.poi = {
207 | get:getPoi,
208 | getComments:getPoiComments,
209 | checkin:checkinPoi,
210 | comment:commentPoi,
211 | like:likePoi,
212 | rating:ratingPoi
213 | };
214 | window.ocdb.media = {
215 | get:getMedia,
216 | post:postMedia,
217 | put:updateMedia,
218 | remove:removeMedia
219 | };
220 |
221 | window.ocdb.user = {
222 | login:login,
223 | setAuthZ:setAuthZ,
224 | logout:logout,
225 | register:register,
226 | getUid:getUid,
227 | getAttributes:getAttributes,
228 | setAttributes:setAttributes
229 | }
230 |
231 | //XHR Tools
232 | var sendRequest = function(url,callback,postData,meth) {
233 | var req = createXMLHTTPObject();
234 | if (!req) return callback("XHR not supported by this browser.");
235 | var method = (postData) ? "POST" : "GET";
236 | method = (meth) ? meth : method;
237 | req.open(method,url,true);
238 | req.setRequestHeader('Accept','application/json');
239 | if(authZ) req.setRequestHeader('Authorization','token '+authZ);
240 | if (postData)
241 | req.setRequestHeader('Content-type','application/json');
242 | req.onreadystatechange = function () {
243 | if (req.readyState != 4) return;
244 | if (req.status == 401) {
245 | setAuthZ(false);
246 | //force app to reload in case of unauthorized access
247 | location.reload();
248 | }
249 | try{
250 | if (req.status != 200 && req.status != 304) {
251 | callback(req.status?req.status:"error",JSON.parse(req.responseText));
252 | return;
253 | }
254 | var meta={};
255 | var h,headersMap={},headers=req.getAllResponseHeaders().split('\n');
256 | for(var i=0;i>>(32-b))}function P(a,b,c){return a^b^c}function A(a,b){var c=(b&0xFFFF)+(a&0xFFFF),d=(b>>>16)+(a>>>16)+(c>>>16);return((d&0xFFFF)<<16)|(c&0xFFFF)}var B="0123456789abcdef";return(function(a){var c=[],d=a.length*4,e;for(var i=0;i>2]>>((3-(i%4))*8);c.push(B.charAt((e>>4)&0xF)+B.charAt(e&0xF))}return c.join('')}((function(a,b){var c,d,e,f,g,h=a.length,v=0x67452301,w=0xefcdab89,x=0x98badcfe,y=0x10325476,z=0xc3d2e1f0,M=[];U(M,0x5a827999,20);U(M,0x6ed9eba1,20);U(M,0x8f1bbcdc,20);U(M,0xca62c1d6,20);a[b>>5]|=0x80<<(24-(b%32));a[(((b+65)>>9)<<4)+15]=b;for(var i=0;i>>16)+(a>>>16)+(b>>>16)+(c>>>16)+(d>>>16)+(f>>>16);return((g&0xFFFF)<<16)|(f&0xFFFF)})(j<20?(function(t,a,b){return(t&a)^(~t&b)}(d,e,f)):j<40?P(d,e,f):j<60?(function(t,a,b){return(t&a)^(t&b)^(a&b)}(d,e,f)):P(d,e,f),g,M[j],O[j],L(c,5));g=f;f=e;e=L(d,30);d=c;c=k}v=A(v,c);w=A(w,d);x=A(x,e);y=A(y,f);z=A(z,g)}return[v,w,x,y,z]}((function(t){var a=[],b=255,c=t.length*8;for(var i=0;i>5]|=(t.charCodeAt(i/8)&b)<<(24-(i%32))}return a}(s)).slice(),s.length*8))))}
297 |
298 | window.ocdb.tools = {
299 | sendRequest: sendRequest,
300 | SHA1: SHA1
301 | }
302 |
303 | //load from ocdb host to trigger certificate consent dialog
304 | /* getCities({lat:53,lon:13,offset:0,limit:1},function(err,res){
305 | if(err){
306 | document.location.href=OCDBBASEURL+"frontend/ocdb.html";
307 | }
308 | });
309 | */
310 |
311 | })();
312 |
313 |
--------------------------------------------------------------------------------
/web_root/ocdb.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | DEV MODE
8 | Accept your self signed certificate and go back
9 |
10 |
11 |
--------------------------------------------------------------------------------
/web_root/playground/README.md:
--------------------------------------------------------------------------------
1 | OCDB - Playground Example App
2 | =============================
3 |
4 | Simple "Hello world"-like example showcasing the uasge of the OCDB service.
5 | Just serve the index.* files by your Web server, surf the location and follow
6 | the instructions.
7 |
8 | If OCDB service is running then the example is available at [https://localhost/v1/frontend/playground/](https://localhost/v1/frontend/playground/)
9 |
10 | At the [project's web page](http://fraunhoferfokus.github.io/OCDB/) a hosted version of this example is linked.
11 |
12 | License
13 | -------
14 | ```
15 | /*******************************************************************************
16 | *
17 | * Licensed under the Apache License, Version 2.0 (the "License");
18 | * you may not use this file except in compliance with the License.
19 | * You may obtain a copy of the License at
20 | *
21 | * http://www.apache.org/licenses/LICENSE-2.0
22 | *
23 | * Unless required by applicable law or agreed to in writing, software
24 | * distributed under the License is distributed on an "AS IS" BASIS,
25 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26 | * See the License for the specific language governing permissions and
27 | * limitations under the License.
28 | *
29 | * Copyright 2015 Fraunhofer FOKUS
30 | *******************************************************************************/
31 | ```
32 |
--------------------------------------------------------------------------------
/web_root/playground/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | OCDB - Playground Example App
8 |
9 |
10 |
11 |
12 |
13 | Simply, getting a list of cities around your current position:
14 |
17 |
18 |
19 |
20 | and Get cities around your current location* (* make sure your Wi-Fi is turned on)
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/web_root/playground/index.js:
--------------------------------------------------------------------------------
1 | window.onload=function(){
2 |
3 | document.querySelector("#getCities").addEventListener("click",function(){
4 | ocdb.user.login(
5 | ocdb.tools.SHA1(document.querySelector("#a").value),
6 | ocdb.tools.SHA1(document.querySelector("#b").value),
7 | loginCallback
8 | );
9 | })
10 |
11 | var loginCallback = function(err, res){
12 | if(err||!res||!res.access_token){
13 | document.querySelector("#list").innerHTML="access denied!";
14 | return;
15 | }
16 | document.querySelector("#list").innerHTML="loading...be pacient.";
17 | navigator.geolocation.getCurrentPosition(
18 | function(){
19 | ocdb.cities.get({lat:52,lon:13},function(err, res){
20 | if(err||!res||!res.length){
21 | document.querySelector("#list").innerHTML=
22 | "error: "+err+" with result "+JSON.stringify(res)+" ";
23 | return;
24 | }
25 | var list="";
26 | for(var i=0; i"+res[i].displayName+"";
28 | }
29 | document.querySelector("#list").innerHTML=list;
30 | });
31 |
32 | },
33 | function(){
34 | document.querySelector("#list").innerHTML="Wi-Fi activated?";
35 | }
36 | );
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/web_root/root.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Public OCDB instance.
4 | =====================
5 |
6 | USAGE ON A "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
7 |
8 | We highly encourage to set up an own instance.
9 | For more information visit
10 |
11 | http://fraunhoferfokus.github.io/OCDB/
12 |
13 |
--------------------------------------------------------------------------------
/web_root/style.css:
--------------------------------------------------------------------------------
1 | #socials ul{
2 | list-style: none inside;
3 | -webkit-padding-start: 0px;
4 | padding-start: 0px;
5 | }
6 |
7 | .logoutPane {
8 | display: none;
9 | }
10 |
--------------------------------------------------------------------------------