├── Dockerfile ├── LICENSE ├── README.md ├── _config.yml └── server ├── .jshintrc ├── api.js ├── config.js ├── package-lock.json ├── package.json ├── realtimeOSMserver.js ├── test ├── testconfig.js └── tests.js └── web ├── dashboard.css ├── dashboard.html ├── dashboard.js ├── img ├── disaster_openrouteservice.png ├── heigit_transparent.svg └── realtimeosm_screenshot.png ├── index.css ├── index.html ├── lib ├── DataTables │ ├── DataTables-1.10.18 │ │ ├── css │ │ │ ├── dataTables.bootstrap.css │ │ │ ├── dataTables.bootstrap.min.css │ │ │ ├── dataTables.bootstrap4.css │ │ │ ├── dataTables.bootstrap4.min.css │ │ │ ├── dataTables.foundation.css │ │ │ ├── dataTables.foundation.min.css │ │ │ ├── dataTables.jqueryui.css │ │ │ ├── dataTables.jqueryui.min.css │ │ │ ├── dataTables.semanticui.css │ │ │ ├── dataTables.semanticui.min.css │ │ │ ├── jquery.dataTables.css │ │ │ └── jquery.dataTables.min.css │ │ ├── images │ │ │ ├── sort_asc.png │ │ │ ├── sort_asc_disabled.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ └── sort_desc_disabled.png │ │ └── js │ │ │ ├── dataTables.bootstrap.js │ │ │ ├── dataTables.bootstrap.min.js │ │ │ ├── dataTables.bootstrap4.js │ │ │ ├── dataTables.bootstrap4.min.js │ │ │ ├── dataTables.foundation.js │ │ │ ├── dataTables.foundation.min.js │ │ │ ├── dataTables.jqueryui.js │ │ │ ├── dataTables.jqueryui.min.js │ │ │ ├── dataTables.semanticui.js │ │ │ ├── dataTables.semanticui.min.js │ │ │ ├── jquery.dataTables.js │ │ │ └── jquery.dataTables.min.js │ ├── FixedHeader-3.1.4 │ │ ├── css │ │ │ ├── fixedHeader.bootstrap.css │ │ │ ├── fixedHeader.bootstrap.min.css │ │ │ ├── fixedHeader.bootstrap4.css │ │ │ ├── fixedHeader.bootstrap4.min.css │ │ │ ├── fixedHeader.dataTables.css │ │ │ ├── fixedHeader.dataTables.min.css │ │ │ ├── fixedHeader.foundation.css │ │ │ ├── fixedHeader.foundation.min.css │ │ │ ├── fixedHeader.jqueryui.css │ │ │ ├── fixedHeader.jqueryui.min.css │ │ │ ├── fixedHeader.semanticui.css │ │ │ └── fixedHeader.semanticui.min.css │ │ └── js │ │ │ ├── dataTables.fixedHeader.js │ │ │ ├── dataTables.fixedHeader.min.js │ │ │ ├── fixedHeader.bootstrap.js │ │ │ ├── fixedHeader.bootstrap.min.js │ │ │ ├── fixedHeader.bootstrap4.js │ │ │ ├── fixedHeader.bootstrap4.min.js │ │ │ ├── fixedHeader.dataTables.js │ │ │ ├── fixedHeader.foundation.js │ │ │ ├── fixedHeader.foundation.min.js │ │ │ ├── fixedHeader.jqueryui.js │ │ │ ├── fixedHeader.jqueryui.min.js │ │ │ ├── fixedHeader.semanicui.js │ │ │ ├── fixedHeader.semanticui.js │ │ │ └── fixedHeader.semanticui.min.js │ ├── Responsive-2.2.2 │ │ ├── css │ │ │ ├── responsive.bootstrap.css │ │ │ ├── responsive.bootstrap.min.css │ │ │ ├── responsive.bootstrap4.css │ │ │ ├── responsive.bootstrap4.min.css │ │ │ ├── responsive.dataTables.css │ │ │ ├── responsive.dataTables.min.css │ │ │ ├── responsive.foundation.css │ │ │ ├── responsive.foundation.min.css │ │ │ ├── responsive.jqueryui.css │ │ │ ├── responsive.jqueryui.min.css │ │ │ ├── responsive.semanticui.css │ │ │ └── responsive.semanticui.min.css │ │ └── js │ │ │ ├── dataTables.responsive.js │ │ │ ├── dataTables.responsive.min.js │ │ │ ├── responsive.bootstrap.js │ │ │ ├── responsive.bootstrap.min.js │ │ │ ├── responsive.bootstrap4.js │ │ │ ├── responsive.bootstrap4.min.js │ │ │ ├── responsive.foundation.js │ │ │ ├── responsive.foundation.min.js │ │ │ ├── responsive.jqueryui.js │ │ │ ├── responsive.jqueryui.min.js │ │ │ ├── responsive.semanticui.js │ │ │ └── responsive.semanticui.min.js │ ├── Select-1.2.6 │ │ ├── css │ │ │ ├── select.bootstrap.css │ │ │ ├── select.bootstrap.min.css │ │ │ ├── select.bootstrap4.css │ │ │ ├── select.bootstrap4.min.css │ │ │ ├── select.dataTables.css │ │ │ ├── select.dataTables.min.css │ │ │ ├── select.foundation.css │ │ │ ├── select.foundation.min.css │ │ │ ├── select.jqueryui.css │ │ │ ├── select.jqueryui.min.css │ │ │ ├── select.semanticui.css │ │ │ └── select.semanticui.min.css │ │ └── js │ │ │ ├── dataTables.select.js │ │ │ ├── dataTables.select.min.js │ │ │ ├── select.bootstrap.js │ │ │ ├── select.bootstrap.min.js │ │ │ ├── select.bootstrap4.js │ │ │ ├── select.bootstrap4.min.js │ │ │ ├── select.dataTables.js │ │ │ ├── select.foundation.js │ │ │ ├── select.foundation.min.js │ │ │ ├── select.jqueryui.js │ │ │ ├── select.jqueryui.min.js │ │ │ ├── select.semanticui.js │ │ │ └── select.semanticui.min.js │ ├── datatables.css │ ├── datatables.js │ ├── datatables.min.css │ ├── datatables.min.js │ └── jQuery-1.12.4 │ │ ├── jquery-1.12.4.js │ │ └── jquery-1.12.4.min.js ├── jquery-ui-1.12.1 │ ├── AUTHORS.txt │ ├── LICENSE.txt │ ├── external │ │ └── jquery │ │ │ └── jquery.js │ ├── images │ │ ├── ui-icons_444444_256x240.png │ │ ├── ui-icons_555555_256x240.png │ │ ├── ui-icons_777620_256x240.png │ │ ├── ui-icons_777777_256x240.png │ │ ├── ui-icons_cc0000_256x240.png │ │ └── ui-icons_ffffff_256x240.png │ ├── index.html │ ├── jquery-ui.css │ ├── jquery-ui.js │ ├── jquery-ui.min.css │ ├── jquery-ui.min.js │ ├── jquery-ui.structure.css │ ├── jquery-ui.structure.min.css │ ├── jquery-ui.theme.css │ ├── jquery-ui.theme.min.css │ └── package.json ├── ol_v4.2.0 │ ├── build │ │ ├── ol-debug.js │ │ └── ol.js │ └── css │ │ └── ol.css └── ol_v5.1.3 │ ├── ol.css │ ├── ol.css.map │ ├── ol.js │ └── ol.js.map ├── signup.css ├── signup.html ├── signup.js ├── usermanagement.css ├── usermanagement.html └── usermanagement.js /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node 2 | EXPOSE 1234 3 | RUN apt-get update 4 | RUN apt-get install -y osmctools 5 | RUN apt-get upgrade -y 6 | COPY . . 7 | WORKDIR /server 8 | RUN npm install 9 | CMD ["npm", "start"] 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 GIScience Research Group 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-minimal -------------------------------------------------------------------------------- /server/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "esnext": true 3 | } -------------------------------------------------------------------------------- /server/config.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | /* supported loglevels (syslog) 3 | 0 emerg: system is unusable 4 | 1 alert: action must be taken immediately 5 | 2 crit: the system is in critical condition 6 | 3 error: error condition 7 | 4 warning: warning condition 8 | 5 notice: a normal but significant condition 9 | 6 info: a purely informational message 10 | 7 debug: messages to debug an application */ 11 | loglevel: 'notice', 12 | server: { 13 | // time threshold after which data is redownloaded 14 | // instead of updated (days) 15 | dataAgeThreshold: 1, 16 | maxParallelUpdates: 6, 17 | geofabrikMetaDir: "./geofabrikbounds/", 18 | geofabrikMetaUpdateInterval: 60*60*24, // [seconds] 19 | planetfile: null, 20 | workerUpdateInterval: 5, 21 | }, 22 | api: { 23 | port: 1234, 24 | accesslog: "access.log", 25 | database: "realtimeosm.db", 26 | adminkey: "masterpassword", 27 | // backup interval in minutes, default: daily 28 | backupInterval: 1440, 29 | // directory where osm data is stored and served 30 | dataDirectory: "./data/", 31 | } 32 | }; 33 | 34 | module.exports = config; 35 | -------------------------------------------------------------------------------- /server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "realtimeOSM", 3 | "version": "0.1.0", 4 | "description": "server that manages and runs tasks to provide realtime osm data", 5 | "main": "realtimeOSM.js", 6 | "scripts": { 7 | "start": "node realtimeOSMserver.js", 8 | "pretest": "./node_modules/.bin/eslint **.js && rm -r -f ./test/testdata ./test/testgeofabrikbounds ./test/test.db ./test/testaccess.log", 9 | "test": "node test/tests.js", 10 | "posttest": "rm -r -f ./test/testdata ./test/testgeofabrikbounds ./test/test.db ./test/testaccess.log" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "https://gitlab.gistools.geog.uni-heidelberg.de/giscience/realtime_osm/realtime_osm" 15 | }, 16 | "author": "Stefan Eberlein", 17 | "license": "MIT", 18 | "dependencies": { 19 | "@mapbox/geojsonhint": "^2.2.0", 20 | "@mapbox/togeojson": "^0.16.0", 21 | "@turf/area": "^5.1.5", 22 | "@turf/boolean-within": "^5.1.5", 23 | "@turf/flatten": "^5.1.5", 24 | "body-parser": "^1.19.0", 25 | "express": "^4.17.1", 26 | "geojson-rewind": "^0.2.0", 27 | "minimist": "^1.2.3", 28 | "morgan": "^1.9.1", 29 | "sequelize": "^5.15.1", 30 | "serve-index": "^1.9.1", 31 | "sqlite3": "^4.1.1", 32 | "wellknown": "^0.5.0", 33 | "winston": "^2.4.4", 34 | "xmldom": "^0.5.0" 35 | }, 36 | "eslintConfig": { 37 | "env": { 38 | "browser": true, 39 | "es6": true, 40 | "node": true, 41 | "jquery": true 42 | }, 43 | "extends": "eslint:recommended", 44 | "parserOptions": { 45 | "sourceType": "module" 46 | }, 47 | "rules": { 48 | "linebreak-style": [ 49 | "error", 50 | "unix" 51 | ], 52 | "semi": [ 53 | "error", 54 | "always" 55 | ], 56 | "no-console": "off" 57 | } 58 | }, 59 | "devDependencies": { 60 | "eslint": "^5.16.0", 61 | "eslint-plugin-node": "^6.0.1" 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /server/test/testconfig.js: -------------------------------------------------------------------------------- 1 | const config = { 2 | /* supported loglevels (syslog) 3 | 0 emerg: system is unusable 4 | 1 alert: action must be taken immediately 5 | 2 crit: the system is in critical condition 6 | 3 error: error condition 7 | 4 warning: warning condition 8 | 5 notice: a normal but significant condition 9 | 6 info: a purely informational message 10 | 7 debug: messages to debug an application */ 11 | loglevel: 'debug', 12 | server: { 13 | // time threshold after which data is redownloaded 14 | // instead of updated (days) 15 | dataAgeThreshold: 1, 16 | maxParallelUpdates: 10, 17 | geofabrikMetaDir: "./test/geofabrikbounds/", 18 | geofabrikMetaUpdateInterval: 60*60*24, // [seconds] 19 | planetfile: "planet.osm.pbf", 20 | workerUpdateInterval: 1, 21 | }, 22 | api: { 23 | port: 1234, 24 | accesslog: "./test/testaccess.log", 25 | database: "./test/test.db", 26 | adminkey: "masterpassword", 27 | // backup interval in minutes, default: daily 28 | backupInterval: 1440, 29 | // directory where osm data is stored and served 30 | dataDirectory: "./test/testdata/", 31 | } 32 | }; 33 | 34 | module.exports = config; 35 | -------------------------------------------------------------------------------- /server/web/dashboard.css: -------------------------------------------------------------------------------- 1 | *{ 2 | box-sizing: border-box; 3 | } 4 | body, p { 5 | font-family: sans-serif; 6 | } 7 | td { 8 | cursor: pointer; 9 | } 10 | a, a:active { 11 | color: black; 12 | text-decoration: none; 13 | border-bottom: 1px gray dotted; 14 | } 15 | #container{ 16 | max-width: 98%; 17 | margin: 0 auto; /* Zentriert Inhalt */ 18 | } 19 | #header { 20 | display: flex; 21 | flex-flow: row wrap; 22 | align-items: baseline; 23 | justify-content: space-between; 24 | } 25 | #inputAPIkey { 26 | width: 25em; 27 | } 28 | #flexrow{ 29 | display: flex; 30 | flex-flow: row wrap; 31 | } 32 | #sidebar{ 33 | flex: 1 1 700px; 34 | margin: .5em; 35 | overflow: auto; 36 | } 37 | #map{ 38 | flex: 1 1 700px; 39 | height: 75vh; 40 | margin: .5em; 41 | } 42 | .footerlink { 43 | float: right; 44 | margin-bottom: 1em; 45 | margin-right: 1em; 46 | } 47 | .ol-popup { 48 | position: absolute; 49 | background-color: white; 50 | -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); 51 | filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2)); 52 | padding: 15px; 53 | border-radius: 10px; 54 | border: 1px solid #cccccc; 55 | bottom: 12px; 56 | left: -50px; 57 | min-width: 280px; 58 | } 59 | .ol-popup:after, .ol-popup:before { 60 | top: 100%; 61 | border: solid transparent; 62 | content: " "; 63 | height: 0; 64 | width: 0; 65 | position: absolute; 66 | pointer-events: none; 67 | } 68 | .ol-popup:after { 69 | border-top-color: white; 70 | border-width: 10px; 71 | left: 49px; 72 | margin-left: -10px; 73 | } 74 | .ol-popup:before { 75 | border-top-color: #cccccc; 76 | border-width: 11px; 77 | left: 49px; 78 | margin-left: -11px; 79 | } 80 | .ol-popup-closer { 81 | text-decoration: none; 82 | position: absolute; 83 | top: 2px; 84 | right: 8px; 85 | } 86 | .ol-popup-closer:after { 87 | content: "✖"; 88 | } 89 | .popupAddedDate { 90 | margin-bottom: auto; 91 | } 92 | .popupName { 93 | margin-top: auto; 94 | margin-bottom: .5em; 95 | font-size: 14pt; 96 | } 97 | .popupSubmit { 98 | width: 100%; 99 | } 100 | .inputText { 101 | margin-bottom: .7em; 102 | width: 100%; 103 | display: inline-block; 104 | } 105 | .inputDate { 106 | margin-bottom: .7em; 107 | width: 100%; 108 | display: inline-block; 109 | } 110 | .inputNumber { 111 | margin-bottom: .7em; 112 | width: 100%; 113 | display: inline-block; 114 | } 115 | -------------------------------------------------------------------------------- /server/web/dashboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Real-time OSM task manager 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 33 | 34 |
35 | 42 |
43 | 47 |
48 | 49 | Return to main page. 50 | 51 | User management. 52 | 53 | Get all tasks as JSON. 54 | 55 | Get data. 56 | 57 | 58 |
59 | 60 | 61 | -------------------------------------------------------------------------------- /server/web/img/disaster_openrouteservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/OSM-realtime-update/bad49ba4546e013289274e5567ef6ef69bd3470e/server/web/img/disaster_openrouteservice.png -------------------------------------------------------------------------------- /server/web/img/heigit_transparent.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | image/svg+xml 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /server/web/img/realtimeosm_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/OSM-realtime-update/bad49ba4546e013289274e5567ef6ef69bd3470e/server/web/img/realtimeosm_screenshot.png -------------------------------------------------------------------------------- /server/web/index.css: -------------------------------------------------------------------------------- 1 | body, p { 2 | font-family: sans-serif; 3 | } 4 | body{ 5 | padding: 5vh 2vw; 6 | } 7 | .center { 8 | margin: 0 auto; 9 | } 10 | .logo { 11 | display: block; 12 | margin-top: 1em; 13 | border-bottom: none; 14 | } 15 | a, a:active { 16 | color: black; 17 | text-decoration: none; 18 | border-bottom: 1px gray dotted; 19 | } 20 | #flexrow{ 21 | display: flex; 22 | flex-flow: row wrap; 23 | } 24 | header{ 25 | flex: 0 1 350px; 26 | margin: 1vh 1.5vw; 27 | } 28 | section{ 29 | flex: 1 1 700px; 30 | max-width: 700px; 31 | margin: 1vh 1.5vw; 32 | } 33 | footer{ 34 | flex: 0 1 300px; 35 | margin: 1vh 1.5vw; 36 | } 37 | -------------------------------------------------------------------------------- /server/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Real-time OSM 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 |

Real-time OSM

18 | 19 |

A service providing near real-time OSM extracts.

20 | 21 |

22 | View the Project on GitHub
GIScience/OSM-realtime-update 23 |

24 | 25 |

26 | See it running in production. 27 |

28 |
29 | 30 |
31 |

32 | If you want to use our instance, 33 | request an API key here. 34 |

35 | 36 |

Real-time OSM is a server that provides custom OSM extracts and keeps them up-to-date at any interval. If your machine is fast enough, in near real-time. Extraction jobs are managed via a REST API or a web dashboard. The software consists of three components:

37 | 38 |
    39 |
  1. The API adds, deletes and requests information about tasks that provide 40 | continuously updated region-bound OSM data via a permanent URL.

  2. 41 | 42 |
  3. The backend runs, manages and gathers statistics for tasks.

  4. 43 | 44 |
  5. The frontend allows manipulating tasks and serves the OSM extracts.

  6. 45 |
46 | 47 |

Here is a screenshot:

48 | Screenshot real-time OSM 49 | 50 |

51 | You can look at the code at GitHub 52 | or see our instance running live here. 53 | If you have any questions, send a mail to info@heigit.org. 54 |

55 | 56 |
57 | 58 | 70 | 71 |
72 | 73 | 74 |
75 | 76 | 77 | 78 | 79 | 101 | -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/css/dataTables.bootstrap.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:75px;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:8px;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:8px;right:8px;display:block;font-family:'Glyphicons Halflings';opacity:0.5}table.dataTable thead .sorting:after{opacity:0.2;content:"\e150"}table.dataTable thead .sorting_asc:after{content:"\e155"}table.dataTable thead .sorting_desc:after{content:"\e156"}table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{color:#eee}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody>tr:first-child>th,div.dataTables_scrollBody>table>tbody>tr:first-child>td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-condensed>thead>tr>th{padding-right:20px}table.dataTable.table-condensed .sorting:after,table.dataTable.table-condensed .sorting_asc:after,table.dataTable.table-condensed .sorting_desc:after{top:6px;right:6px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} 2 | -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/css/dataTables.bootstrap4.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:0.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:0.85em;white-space:nowrap}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1em 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:30px}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer;position:relative}table.dataTable thead .sorting:before,table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{position:absolute;bottom:0.9em;display:block;opacity:0.3}table.dataTable thead .sorting:before,table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:before,table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:before{right:1em;content:"\2191"}table.dataTable thead .sorting:after,table.dataTable thead .sorting_asc:after,table.dataTable thead .sorting_desc:after,table.dataTable thead .sorting_asc_disabled:after,table.dataTable thead .sorting_desc_disabled:after{right:0.5em;content:"\2193"}table.dataTable thead .sorting_asc:before,table.dataTable thead .sorting_desc:after{opacity:1}table.dataTable thead .sorting_asc_disabled:before,table.dataTable thead .sorting_desc_disabled:after{opacity:0}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table thead .sorting:before,div.dataTables_scrollBody table thead .sorting_asc:before,div.dataTables_scrollBody table thead .sorting_desc:before,div.dataTables_scrollBody table thead .sorting:after,div.dataTables_scrollBody table thead .sorting_asc:after,div.dataTables_scrollBody table thead .sorting_desc:after{display:none}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}}table.dataTable.table-sm>thead>tr>th{padding-right:20px}table.dataTable.table-sm .sorting:before,table.dataTable.table-sm .sorting_asc:before,table.dataTable.table-sm .sorting_desc:before{top:5px;right:0.85em}table.dataTable.table-sm .sorting:after,table.dataTable.table-sm .sorting_asc:after,table.dataTable.table-sm .sorting_desc:after{top:5px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:0}table.table-bordered.dataTable tbody th,table.table-bordered.dataTable tbody td{border-bottom-width:0}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^="col-"]:last-child{padding-right:0} 2 | -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/css/dataTables.foundation.css: -------------------------------------------------------------------------------- 1 | table.dataTable { 2 | clear: both; 3 | margin: 0.5em 0 !important; 4 | max-width: none !important; 5 | width: 100%; 6 | } 7 | table.dataTable td, 8 | table.dataTable th { 9 | -webkit-box-sizing: content-box; 10 | box-sizing: content-box; 11 | } 12 | table.dataTable td.dataTables_empty, 13 | table.dataTable th.dataTables_empty { 14 | text-align: center; 15 | } 16 | table.dataTable.nowrap th, table.dataTable.nowrap td { 17 | white-space: nowrap; 18 | } 19 | 20 | div.dataTables_wrapper { 21 | position: relative; 22 | } 23 | div.dataTables_wrapper div.dataTables_length label { 24 | float: left; 25 | text-align: left; 26 | margin-bottom: 0; 27 | } 28 | div.dataTables_wrapper div.dataTables_length select { 29 | width: 75px; 30 | margin-bottom: 0; 31 | } 32 | div.dataTables_wrapper div.dataTables_filter label { 33 | float: right; 34 | margin-bottom: 0; 35 | } 36 | div.dataTables_wrapper div.dataTables_filter input { 37 | display: inline-block !important; 38 | width: auto !important; 39 | margin-bottom: 0; 40 | margin-left: 0.5em; 41 | } 42 | div.dataTables_wrapper div.dataTables_info { 43 | padding-top: 2px; 44 | } 45 | div.dataTables_wrapper div.dataTables_paginate { 46 | float: right; 47 | margin: 0; 48 | } 49 | div.dataTables_wrapper div.dataTables_processing { 50 | position: absolute; 51 | top: 50%; 52 | left: 50%; 53 | width: 200px; 54 | margin-left: -100px; 55 | margin-top: -26px; 56 | text-align: center; 57 | padding: 1rem 0; 58 | } 59 | 60 | table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting, 61 | table.dataTable thead > tr > td.sorting_asc, 62 | table.dataTable thead > tr > td.sorting_desc, 63 | table.dataTable thead > tr > td.sorting { 64 | padding-right: 1.5rem; 65 | } 66 | table.dataTable thead > tr > th:active, 67 | table.dataTable thead > tr > td:active { 68 | outline: none; 69 | } 70 | table.dataTable thead .sorting, 71 | table.dataTable thead .sorting_asc, 72 | table.dataTable thead .sorting_desc, 73 | table.dataTable thead .sorting_asc_disabled, 74 | table.dataTable thead .sorting_desc_disabled { 75 | cursor: pointer; 76 | } 77 | table.dataTable thead .sorting, 78 | table.dataTable thead .sorting_asc, 79 | table.dataTable thead .sorting_desc, 80 | table.dataTable thead .sorting_asc_disabled, 81 | table.dataTable thead .sorting_desc_disabled { 82 | background-repeat: no-repeat; 83 | background-position: center right; 84 | } 85 | table.dataTable thead .sorting { 86 | background-image: url("../images/sort_both.png"); 87 | } 88 | table.dataTable thead .sorting_asc { 89 | background-image: url("../images/sort_asc.png"); 90 | } 91 | table.dataTable thead .sorting_desc { 92 | background-image: url("../images/sort_desc.png"); 93 | } 94 | table.dataTable thead .sorting_asc_disabled { 95 | background-image: url("../images/sort_asc_disabled.png"); 96 | } 97 | table.dataTable thead .sorting_desc_disabled { 98 | background-image: url("../images/sort_desc_disabled.png"); 99 | } 100 | 101 | div.dataTables_scrollHead table { 102 | margin-bottom: 0 !important; 103 | } 104 | 105 | div.dataTables_scrollBody table { 106 | border-top: none; 107 | margin-top: 0 !important; 108 | margin-bottom: 0 !important; 109 | } 110 | div.dataTables_scrollBody table tbody tr:first-child th, 111 | div.dataTables_scrollBody table tbody tr:first-child td { 112 | border-top: none; 113 | } 114 | 115 | div.dataTables_scrollFoot table { 116 | margin-top: 0 !important; 117 | border-top: none; 118 | } 119 | -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/css/dataTables.foundation.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable{clear:both;margin:0.5em 0 !important;max-width:none !important;width:100%}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}div.dataTables_wrapper{position:relative}div.dataTables_wrapper div.dataTables_length label{float:left;text-align:left;margin-bottom:0}div.dataTables_wrapper div.dataTables_length select{width:75px;margin-bottom:0}div.dataTables_wrapper div.dataTables_filter label{float:right;margin-bottom:0}div.dataTables_wrapper div.dataTables_filter input{display:inline-block !important;width:auto !important;margin-bottom:0;margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:2px}div.dataTables_wrapper div.dataTables_paginate{float:right;margin:0}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:1rem 0}table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting{padding-right:1.5rem}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{cursor:pointer}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.dataTable thead .sorting{background-image:url("../images/sort_both.png")}table.dataTable thead .sorting_asc{background-image:url("../images/sort_asc.png")}table.dataTable thead .sorting_desc{background-image:url("../images/sort_desc.png")}table.dataTable thead .sorting_asc_disabled{background-image:url("../images/sort_asc_disabled.png")}table.dataTable thead .sorting_desc_disabled{background-image:url("../images/sort_desc_disabled.png")}div.dataTables_scrollHead table{margin-bottom:0 !important}div.dataTables_scrollBody table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody table tbody tr:first-child th,div.dataTables_scrollBody table tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot table{margin-top:0 !important;border-top:none} 2 | -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/css/dataTables.semanticui.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Styling for DataTables with Semantic UI 3 | */ 4 | table.dataTable.table { 5 | margin: 0; 6 | } 7 | table.dataTable.table thead th, 8 | table.dataTable.table thead td { 9 | position: relative; 10 | } 11 | table.dataTable.table thead th.sorting, table.dataTable.table thead th.sorting_asc, table.dataTable.table thead th.sorting_desc, 12 | table.dataTable.table thead td.sorting, 13 | table.dataTable.table thead td.sorting_asc, 14 | table.dataTable.table thead td.sorting_desc { 15 | padding-right: 20px; 16 | } 17 | table.dataTable.table thead th.sorting:after, table.dataTable.table thead th.sorting_asc:after, table.dataTable.table thead th.sorting_desc:after, 18 | table.dataTable.table thead td.sorting:after, 19 | table.dataTable.table thead td.sorting_asc:after, 20 | table.dataTable.table thead td.sorting_desc:after { 21 | position: absolute; 22 | top: 12px; 23 | right: 8px; 24 | display: block; 25 | font-family: Icons; 26 | } 27 | table.dataTable.table thead th.sorting:after, 28 | table.dataTable.table thead td.sorting:after { 29 | content: "\f0dc"; 30 | color: #ddd; 31 | font-size: 0.8em; 32 | } 33 | table.dataTable.table thead th.sorting_asc:after, 34 | table.dataTable.table thead td.sorting_asc:after { 35 | content: "\f0de"; 36 | } 37 | table.dataTable.table thead th.sorting_desc:after, 38 | table.dataTable.table thead td.sorting_desc:after { 39 | content: "\f0dd"; 40 | } 41 | table.dataTable.table td, 42 | table.dataTable.table th { 43 | -webkit-box-sizing: content-box; 44 | box-sizing: content-box; 45 | } 46 | table.dataTable.table td.dataTables_empty, 47 | table.dataTable.table th.dataTables_empty { 48 | text-align: center; 49 | } 50 | table.dataTable.table.nowrap th, 51 | table.dataTable.table.nowrap td { 52 | white-space: nowrap; 53 | } 54 | 55 | div.dataTables_wrapper div.dataTables_length select { 56 | vertical-align: middle; 57 | min-height: 2.7142em; 58 | } 59 | div.dataTables_wrapper div.dataTables_length .ui.selection.dropdown { 60 | min-width: 0; 61 | } 62 | div.dataTables_wrapper div.dataTables_filter span.input { 63 | margin-left: 0.5em; 64 | } 65 | div.dataTables_wrapper div.dataTables_info { 66 | padding-top: 13px; 67 | white-space: nowrap; 68 | } 69 | div.dataTables_wrapper div.dataTables_processing { 70 | position: absolute; 71 | top: 50%; 72 | left: 50%; 73 | width: 200px; 74 | margin-left: -100px; 75 | text-align: center; 76 | } 77 | div.dataTables_wrapper div.row.dt-table { 78 | padding: 0; 79 | } 80 | div.dataTables_wrapper div.dataTables_scrollHead table.dataTable { 81 | border-bottom-right-radius: 0; 82 | border-bottom-left-radius: 0; 83 | border-bottom: none; 84 | } 85 | div.dataTables_wrapper div.dataTables_scrollBody thead .sorting:after, 86 | div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_asc:after, 87 | div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_desc:after { 88 | display: none; 89 | } 90 | div.dataTables_wrapper div.dataTables_scrollBody table.dataTable { 91 | border-radius: 0; 92 | border-top: none; 93 | border-bottom-width: 0; 94 | } 95 | div.dataTables_wrapper div.dataTables_scrollBody table.dataTable.no-footer { 96 | border-bottom-width: 1px; 97 | } 98 | div.dataTables_wrapper div.dataTables_scrollFoot table.dataTable { 99 | border-top-right-radius: 0; 100 | border-top-left-radius: 0; 101 | border-top: none; 102 | } 103 | -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/css/dataTables.semanticui.min.css: -------------------------------------------------------------------------------- 1 | table.dataTable.table{margin:0}table.dataTable.table thead th,table.dataTable.table thead td{position:relative}table.dataTable.table thead th.sorting,table.dataTable.table thead th.sorting_asc,table.dataTable.table thead th.sorting_desc,table.dataTable.table thead td.sorting,table.dataTable.table thead td.sorting_asc,table.dataTable.table thead td.sorting_desc{padding-right:20px}table.dataTable.table thead th.sorting:after,table.dataTable.table thead th.sorting_asc:after,table.dataTable.table thead th.sorting_desc:after,table.dataTable.table thead td.sorting:after,table.dataTable.table thead td.sorting_asc:after,table.dataTable.table thead td.sorting_desc:after{position:absolute;top:12px;right:8px;display:block;font-family:Icons}table.dataTable.table thead th.sorting:after,table.dataTable.table thead td.sorting:after{content:"\f0dc";color:#ddd;font-size:0.8em}table.dataTable.table thead th.sorting_asc:after,table.dataTable.table thead td.sorting_asc:after{content:"\f0de"}table.dataTable.table thead th.sorting_desc:after,table.dataTable.table thead td.sorting_desc:after{content:"\f0dd"}table.dataTable.table td,table.dataTable.table th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable.table td.dataTables_empty,table.dataTable.table th.dataTables_empty{text-align:center}table.dataTable.table.nowrap th,table.dataTable.table.nowrap td{white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{vertical-align:middle;min-height:2.7142em}div.dataTables_wrapper div.dataTables_length .ui.selection.dropdown{min-width:0}div.dataTables_wrapper div.dataTables_filter span.input{margin-left:0.5em}div.dataTables_wrapper div.dataTables_info{padding-top:13px;white-space:nowrap}div.dataTables_wrapper div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;text-align:center}div.dataTables_wrapper div.row.dt-table{padding:0}div.dataTables_wrapper div.dataTables_scrollHead table.dataTable{border-bottom-right-radius:0;border-bottom-left-radius:0;border-bottom:none}div.dataTables_wrapper div.dataTables_scrollBody thead .sorting:after,div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_asc:after,div.dataTables_wrapper div.dataTables_scrollBody thead .sorting_desc:after{display:none}div.dataTables_wrapper div.dataTables_scrollBody table.dataTable{border-radius:0;border-top:none;border-bottom-width:0}div.dataTables_wrapper div.dataTables_scrollBody table.dataTable.no-footer{border-bottom-width:1px}div.dataTables_wrapper div.dataTables_scrollFoot table.dataTable{border-top-right-radius:0;border-top-left-radius:0;border-top:none} 2 | -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/OSM-realtime-update/bad49ba4546e013289274e5567ef6ef69bd3470e/server/web/lib/DataTables/DataTables-1.10.18/images/sort_asc.png -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/OSM-realtime-update/bad49ba4546e013289274e5567ef6ef69bd3470e/server/web/lib/DataTables/DataTables-1.10.18/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/OSM-realtime-update/bad49ba4546e013289274e5567ef6ef69bd3470e/server/web/lib/DataTables/DataTables-1.10.18/images/sort_both.png -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/OSM-realtime-update/bad49ba4546e013289274e5567ef6ef69bd3470e/server/web/lib/DataTables/DataTables-1.10.18/images/sort_desc.png -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GIScience/OSM-realtime-update/bad49ba4546e013289274e5567ef6ef69bd3470e/server/web/lib/DataTables/DataTables-1.10.18/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /server/web/lib/DataTables/DataTables-1.10.18/js/dataTables.bootstrap.js: -------------------------------------------------------------------------------- 1 | /*! DataTables Bootstrap 3 integration 2 | * ©2011-2015 SpryMedia Ltd - datatables.net/license 3 | */ 4 | 5 | /** 6 | * DataTables integration for Bootstrap 3. This requires Bootstrap 3 and 7 | * DataTables 1.10 or newer. 8 | * 9 | * This file sets the defaults and adds options to DataTables to style its 10 | * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap 11 | * for further information. 12 | */ 13 | (function( factory ){ 14 | if ( typeof define === 'function' && define.amd ) { 15 | // AMD 16 | define( ['jquery', 'datatables.net'], function ( $ ) { 17 | return factory( $, window, document ); 18 | } ); 19 | } 20 | else if ( typeof exports === 'object' ) { 21 | // CommonJS 22 | module.exports = function (root, $) { 23 | if ( ! root ) { 24 | root = window; 25 | } 26 | 27 | if ( ! $ || ! $.fn.dataTable ) { 28 | // Require DataTables, which attaches to jQuery, including 29 | // jQuery if needed and have a $ property so we can access the 30 | // jQuery object that is used 31 | $ = require('datatables.net')(root, $).$; 32 | } 33 | 34 | return factory( $, root, root.document ); 35 | }; 36 | } 37 | else { 38 | // Browser 39 | factory( jQuery, window, document ); 40 | } 41 | }(function( $, window, document, undefined ) { 42 | 'use strict'; 43 | var DataTable = $.fn.dataTable; 44 | 45 | 46 | /* Set the defaults for DataTables initialisation */ 47 | $.extend( true, DataTable.defaults, { 48 | dom: 49 | "<'row'<'col-sm-6'l><'col-sm-6'f>>" + 50 | "<'row'<'col-sm-12'tr>>" + 51 | "<'row'<'col-sm-5'i><'col-sm-7'p>>", 52 | renderer: 'bootstrap' 53 | } ); 54 | 55 | 56 | /* Default class modification */ 57 | $.extend( DataTable.ext.classes, { 58 | sWrapper: "dataTables_wrapper form-inline dt-bootstrap", 59 | sFilterInput: "form-control input-sm", 60 | sLengthSelect: "form-control input-sm", 61 | sProcessing: "dataTables_processing panel panel-default" 62 | } ); 63 | 64 | 65 | /* Bootstrap paging button renderer */ 66 | DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) { 67 | var api = new DataTable.Api( settings ); 68 | var classes = settings.oClasses; 69 | var lang = settings.oLanguage.oPaginate; 70 | var aria = settings.oLanguage.oAria.paginate || {}; 71 | var btnDisplay, btnClass, counter=0; 72 | 73 | var attach = function( container, buttons ) { 74 | var i, ien, node, button; 75 | var clickHandler = function ( e ) { 76 | e.preventDefault(); 77 | if ( !$(e.currentTarget).hasClass('disabled') && api.page() != e.data.action ) { 78 | api.page( e.data.action ).draw( 'page' ); 79 | } 80 | }; 81 | 82 | for ( i=0, ien=buttons.length ; i 0 ? 101 | '' : ' disabled'); 102 | break; 103 | 104 | case 'previous': 105 | btnDisplay = lang.sPrevious; 106 | btnClass = button + (page > 0 ? 107 | '' : ' disabled'); 108 | break; 109 | 110 | case 'next': 111 | btnDisplay = lang.sNext; 112 | btnClass = button + (page < pages-1 ? 113 | '' : ' disabled'); 114 | break; 115 | 116 | case 'last': 117 | btnDisplay = lang.sLast; 118 | btnClass = button + (page < pages-1 ? 119 | '' : ' disabled'); 120 | break; 121 | 122 | default: 123 | btnDisplay = button + 1; 124 | btnClass = page === button ? 125 | 'active' : ''; 126 | break; 127 | } 128 | 129 | if ( btnDisplay ) { 130 | node = $('
  • ', { 131 | 'class': classes.sPageButton+' '+btnClass, 132 | 'id': idx === 0 && typeof button === 'string' ? 133 | settings.sTableId +'_'+ button : 134 | null 135 | } ) 136 | .append( $('', { 137 | 'href': '#', 138 | 'aria-controls': settings.sTableId, 139 | 'aria-label': aria[ button ], 140 | 'data-dt-idx': counter, 141 | 'tabindex': settings.iTabIndex 142 | } ) 143 | .html( btnDisplay ) 144 | ) 145 | .appendTo( container ); 146 | 147 | settings.oApi._fnBindAction( 148 | node, {action: button}, clickHandler 149 | ); 150 | 151 | counter++; 152 | } 153 | } 154 | } 155 | }; 156 | 157 | // IE9 throws an 'unknown error' if document.activeElement is used 158 | // inside an iframe or frame. 159 | var activeEl; 160 | 161 | try { 162 | // Because this approach is destroying and recreating the paging 163 | // elements, focus is lost on the select button which is bad for 164 | // accessibility. So we want to restore focus once the draw has 165 | // completed 166 | activeEl = $(host).find(document.activeElement).data('dt-idx'); 167 | } 168 | catch (e) {} 169 | 170 | attach( 171 | $(host).empty().html('