` in your view file. Authors can add the script to their own sites to display badges earned, while publishers can use the script to display all badges associated with a paper:
14 |
15 | You can either use paper-badger-widget.js ([documentation](docs/paper-badger-widget.md)), which supports old browsers or widget.js ([documentation](docs/widget.md)), which is in development and currently only supports evergreen browsers and IE9+.
16 |
17 | ### Current Users
18 |
19 | Two journals, [GigaScience (BioMed Central)](http://gigascience.biomedcentral.com/) and [Journal of Open Research Software (Ubiquity Press)](http://openresearchsoftware.metajnl.com/) have added the Paper Badger widget to their papers.
20 |
21 | JORS example: [A Web-based modeling tool for the SEMAT Essence theory of software engineering](http://openresearchsoftware.metajnl.com/articles/10.5334/jors.ad/metrics/#author-contributions)
22 |
23 | 
24 |
25 | ## Contributing
26 |
27 | [Project Roadmap: #17](https://github.com/mozillascience/paperbadger/issues/17)
28 |
29 | Want to help? We love new contributors! Please review our [contributing guidelines](CONTRIBUTING.md) and take a look at some [good first bugs](https://github.com/mozillascience/PaperBadger/labels/good%20first%20bug).
30 |
31 | ### Getting Started
32 |
33 | Are you ready to contribute to Paper Badger? This section will help you set up your own development version of the Contributorship Badges prototype.
34 |
35 | Clone (or Fork) PaperBadger and enter the directory: `git clone https://github.com/mozillascience/PaperBadger && cd PaperBadger`
36 |
37 | For an overview of the [architecture](docs/high-level-architecture.md) of the system and other details, visit the [docs](docs/) section.
38 |
39 | #### Environment variables
40 | If you would like to override the default configuration, create an `.env` file in your favourite text editor and use _default.env_ as a template (do not delete or modify _default.env_).
41 |
42 | If you would like to develop against the hosted custom badgekit-api we have running specifically for PaperBadger testing, your environment values should look this:
43 |
44 | # default port is 5000
45 | export PORT=5000
46 | export SESSION_SECRET=USE_SOMETHING_GOOD_LIKE_puUJjfE6QtUnYryb
47 |
48 | # Badges
49 | export BADGES_ENDPOINT=http://badgekit-api-test-sciencelab.herokuapp.com/
50 | export BADGES_KEY=master
51 | export BADGES_SECRET=#############
52 | export BADGES_SYSTEM=badgekit
53 |
54 | # ORCID Auth
55 | export ORCID_AUTH_CLIENT_ID=#############
56 | export ORCID_AUTH_CLIENT_SECRET=#############
57 | export ORCID_AUTH_SITE=#############
58 | export ORCID_AUTH_TOKEN_PATH=#############
59 | export ORCID_REDIRECT_URI=#############
60 |
61 | Ask [@acabunoc](http://github.com/acabunoc) for ones marked `###########`. Our custom BadgeKit API code can be found [here](https://github.com/acabunoc/badgekit-api).
62 | Feel free to change `PORT` to any available port.
63 |
64 | #### Run using Docker
65 |
66 | You can use Docker to bring up a quick instance of the app to develop against. This way you don't need to have node, MongoDB, and redis installed on your host.
67 |
68 | * Make sure you have [Docker](https://www.docker.com/) (>=1.10) and docker-compose (>=1.6) installed.
69 | * Setup your environment variables as explained in the previous section
70 | * start the service with `docker-compose up`
71 | * visit the running service
72 | * If on Linux host: http://localhost:5000
73 | * If not Linux: http://(docker_host_ip):5000 (You can find your docker IP with `docker-machine ip default`)
74 |
75 | This setup will create 3 containers:
76 | - paperbadger_paperbadger_1 contains the PaperBadger code, mapped to the _/src_ volume
77 | - paperbadger_mongo_1 is the MongoDB container with a DB called _test_
78 | - paperbadger_redis_1 is the redis server
79 |
80 | You can connect to the main container by using `docker exec -it paperbadger_paperbadger_1 /bin/bash`. _ctrl+c_ will stop the three containers.
81 |
82 | #### Run locally
83 |
84 | * Make sure you have at least node version 4.4.5 installed. Installing node through [nvm](https://github.com/creationix/nvm) is recommended, so you don't need to use _sudo_ in the next step.
85 | * Install PaperBadger's Node dependencies: `npm install`
86 | * Make sure [MongoDB](https://www.mongodb.org/) and [redis-server](http://redis.io/download) are running and locally accessible. You can install these from their official website or use your favorite package manager.
87 | * Setup your environment variables as explained in a previous section
88 | * Run `npm start`, and open up `http://localhost:5000/` in your favourite web browser!
89 |
90 |
91 | ### API Endpoints
92 |
93 | * GET [/badges](http://badges.mozillascience.org/badges)
94 | * Get all badges we issue
95 | * GET [/badges/count](http://badges.mozillascience.org/badges/count)
96 | * Get a count of all badges we issue
97 | * GET /badges/:badge
98 | * Get all badge instances of a certain badge
99 | * e.g. [/badges/formal_analysis](http://badges.mozillascience.org/badges/formal_analysis)
100 | * GET /badges/:badge/count
101 | * Get a count of all badge instances of a certain badge
102 | * e.g. [/badges/formal_analysis/count](http://badges.mozillascience.org/badges/formal_analysis/count)
103 | * GET /users/:orcid/badges
104 | * Get all badge instances earned by a user
105 | * e.g. [/users/0000-0001-5979-8713/badges](http://badges.mozillascience.org/users/0000-0001-5979-8713/badges)
106 | * GET /users/:orcid/badges/count
107 | * Get a count of all badge instances earned by a user
108 | * e.g. [/users/0000-0001-5979-8713/badges/count](http://badges.mozillascience.org/users/0000-0001-5979-8713/badges/count)
109 | * GET /users/:orcid/badges/:badge
110 | * Get all badge instances of a certain badge earned by a user
111 | * e.g. [/users/0000-0001-5979-8713/badges/data_curation](http://badges.mozillascience.org/users/0000-0001-5979-8713/badges/data_curation)
112 | * GET /users/:orcid/badges/:badge/count
113 | * Get a count of all badge instances of a certain badge earned by a user
114 | * e.g. [/users/0000-0001-5979-8713/badges/data_curation/count](http://badges.mozillascience.org/users/0000-0001-5979-8713/badges/data_curation/count)
115 | * GET /papers/:doi1/:doi2/badges
116 | * Get all badge instances for a paper.
117 | * e.g. [/papers/10.1186/2047-217X-3-18/badges](http://badges.mozillascience.org/papers/10.1186/2047-217X-3-18/badges)
118 | * GET /papers/:doi1/:doi2/badges/count
119 | * Get a count of all badge instances for a paper.
120 | * e.g. [/papers/10.1186/2047-217X-3-18/badges/count](http://badges.mozillascience.org/papers/10.1186/2047-217X-3-18/badges/count)
121 | * GET /papers/:doi1/:doi2/badges/:badge
122 | * Get all badge instances of a certain badge for a paper.
123 | * e.g. [/papers/10.1186/2047-217X-3-18/badges/investigation](http://badges.mozillascience.org/papers/10.1186/2047-217X-3-18/badges/investigation)
124 | * GET /papers/:doi1/:doi2/badges/:badge/count
125 | * Get a count of all badge instances of a certain badge for a paper.
126 | * e.g. [/papers/10.1186/2047-217X-3-18/badges/investigation/count](http://badges.mozillascience.org/papers/10.1186/2047-217X-3-18/badges/investigation/count)
127 | * GET /papers/:doi1/:doi2/users/:orcid/badges
128 | * Get all badge instances earned by a user for a paper.
129 | * e.g. [/papers/10.1186/2047-217X-3-18/users/0000-0001-5979-8713/badges](http://badges.mozillascience.org/papers/10.1186/2047-217X-3-18/users/0000-0001-5979-8713/badges)
130 | * GET /papers/:doi1/:doi2/users/:orcid/badges/count
131 | * Get a count of all badge instances earned by a user for a paper.
132 | * e.g. [/papers/10.1186/2047-217X-3-18/users/0000-0001-5979-8713/badges/count](http://badges.mozillascience.org/papers/10.1186/2047-217X-3-18/users/0000-0001-5979-8713/badges/count)
133 | * GET /papers/:doi1/:doi2/users/:orcid/badges/:badge
134 | * Get all badge instances of a certain badge earned by a user for a paper.
135 | * e.g. [/papers/10.1186/2047-217X-3-18/users/0000-0001-5979-8713/badges/data_curation](http://badges.mozillascience.org/papers/10.1186/2047-217X-3-18/users/0000-0001-5979-8713/badges/data_curation)
136 | * GET /papers/:doi1/:doi2/users/:orcid/badges/:badge/count
137 | * Get a count of all badge instances of a certain badge earned by a user for a paper.
138 | * e.g. [/papers/10.1186/2047-217X-3-18/users/0000-0001-5979-8713/badges/data_curation/count](http://badges.mozillascience.org/papers/10.1186/2047-217X-3-18/users/0000-0001-5979-8713/badges/data_curation/count)
139 | * POST /papers/:doi1/:doi2/users/:orcid/badges/:badge
140 | * Issue a badge
141 |
142 | ***
143 |
144 | This work is a collaboration with publishers [BioMed Central](http://www.biomedcentral.com/) (BMC), [Ubiquity Press](http://www.ubiquitypress.com/) (UP) and the [Public Library of Science](http://www.plos.org/) (PLoS); the biomedical research foundation, [The Wellcome Trust](http://www.wellcome.ac.uk/); the software and technology firm [Digital Science](http://www.digital-science.com/); the registry of unique researcher identifiers, [ORCID](http://orcid.org/); and the [Mozilla Science Lab](http://mozillascience.org/).
145 |
--------------------------------------------------------------------------------
/public/widgets/widget.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // eslint `exported` takes no effect because `node` is used as as environment. A custom rule for vars is defined here:
4 | /* eslint no-unused-vars: [2, { "varsIgnorePattern": "PaperBadgerWidget" }] */
5 | /* global ActiveXObject: false */
6 | /**
7 | * PaperBadger widget
8 | * Displays all badges for a DOI or ORCID.
9 | *
10 | * @param {Object} settings
11 | * @param {string=} settings.DOI
12 | * @param {string=} settings.ORCID
13 | * @param {string} settings.containerClass
14 | * @param {string=} settings.ORCIDWidgetType
15 | * @param {string=} settings.loaderText
16 | * @param {string=} settings.removeClass
17 | * @param {Function=} settings.clickCallback
18 | * @constructor
19 | */
20 | var PaperBadgerWidget = function (settings) {
21 | /**
22 | * Widget container element
23 | * @type {Element}
24 | */
25 | var containerElement;
26 |
27 | /**
28 | * Determines whether the ORCID widget shows the
29 | * author's name or DOIs
30 | * @type {string}
31 | */
32 | var ORCIDWidgetType = 'default';
33 |
34 | /**
35 | * String shown in the loading animation
36 | * @type {string}
37 | */
38 | var loaderText = 'loading widget';
39 |
40 | /**
41 | * Element for the loading animation
42 | * @type {Element}
43 | */
44 | var loaderElement;
45 |
46 | /**
47 | * Contains the interval id for the animation loop
48 | * @type {Number}
49 | */
50 | var loaderInterval;
51 |
52 | /**
53 | * Checks the settings given to the function and starts
54 | * the widget creation.
55 | */
56 | var construct = function () {
57 | // fix for #135, all but the first forward slash of a DOI
58 | // should be encoded as %2F
59 | if (settings.hasOwnProperty('DOI')) {
60 | var tmp = settings.DOI.split('/');
61 | settings.DOI = tmp[0] + '/' + tmp.slice(1).join('%2F');
62 | }
63 |
64 | containerElement = document.getElementsByClassName(settings.containerClass)[0];
65 |
66 | // Changes the ORCID widget type to DOI if the user requests it.
67 | if (settings.hasOwnProperty('ORCIDWidgetType') && settings.ORCIDWidgetType === 'DOI') {
68 | ORCIDWidgetType = 'DOI';
69 | }
70 |
71 | if (settings.hasOwnProperty('loaderText')) {
72 | loaderText = settings.loaderText;
73 | }
74 |
75 | // we need a container element and either a DOI or an ORCID
76 | // proceed if these are available, throw an error if not
77 | if (containerElement && (settings.hasOwnProperty('DOI') || settings.hasOwnProperty('ORCID'))) {
78 | insertCSS();
79 | startLoader();
80 | loadWidgetContent();
81 | } else {
82 | throw 'The settings object is incomplete. You need to supply an element id and either a DOI or an ORCID.';
83 | }
84 | };
85 |
86 | /**
87 | * Injects a style tag into the header containing the necessary
88 | * styles for the widget.
89 | */
90 | function insertCSS() {
91 | var css = '.paper-badge {float: left; width: 10em; height: 20em; overflow: hidden; ' +
92 | 'border-top: 1px solid #ccc; height 15em; padding: 2%; margin-right: 1%; margin-top: 2%}' +
93 | '.paper-badge a {width: 100%; display: inline-block; font-size: 88%; line-height: 1.2; ' +
94 | 'color: #333; padding: 0.4em; cursor: pointer; text-decoration: none} .paper-badge ' +
95 | 'a.active {color: #fff; background: #7ab441; text-decoration: none} .paper-badge img ' +
96 | '{max-width: 8em; margin-left: 10%; margin-bottom: 1%} .paper-badges-hidden{display: none}';
97 |
98 | var head = document.head || document.getElementsByTagName('head')[0];
99 | var style = document.createElement('style');
100 | style.type = 'text/css';
101 | if (style.styleSheet) {
102 | style.styleSheet.cssText = css;
103 | } else {
104 | style.appendChild(document.createTextNode(css));
105 | }
106 |
107 | head.appendChild(style);
108 | }
109 |
110 | /**
111 | * Inserts the loader element into the container element
112 | * and starts an animation loop.
113 | */
114 | function startLoader() {
115 | loaderElement = document.createElement('div');
116 | loaderElement.className = 'paperbadger-loader';
117 | loaderElement.setAttribute('data-step', '4');
118 | containerElement.appendChild(loaderElement);
119 | loaderMethod();
120 |
121 | loaderInterval = setInterval(loaderMethod, 750);
122 | }
123 |
124 | /**
125 | * Animation loop for the loader text. Adds / removes
126 | * dots from the loader text.
127 | */
128 | function loaderMethod() {
129 | var step = loaderElement.getAttribute('data-step');
130 | var text = loaderText;
131 |
132 | if (step === '4') {
133 | step = 1;
134 | } else if (step === '1') {
135 | step = 2;
136 | text += '.';
137 | } else if (step === '2') {
138 | step = 3;
139 | text += '..';
140 | } else if (step === '3') {
141 | step = 4;
142 | text += '...';
143 | }
144 |
145 | loaderElement.innerHTML = text;
146 | loaderElement.setAttribute('data-step', step);
147 | }
148 |
149 | /**
150 | * Stops the loader animation loop.
151 | */
152 | var stopLoader = function () {
153 | clearInterval(loaderInterval);
154 | };
155 |
156 | /**
157 | * Loads the widget content from the Badges API.
158 | */
159 | function loadWidgetContent() {
160 | var url = getEndpoint();
161 | var xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
162 |
163 | xmlhttp.onreadystatechange = function () {
164 | if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
165 | stopLoader();
166 | processAjaxResponse(xmlhttp.responseText);
167 | }
168 | };
169 |
170 | xmlhttp.open('GET', url, true);
171 | xmlhttp.send();
172 | }
173 |
174 | /**
175 | * Generates the endpoint url depending on the
176 | * widget settings.
177 | *
178 | * @returns {string}
179 | */
180 | function getEndpoint() {
181 | var url = 'https://badges.mozillascience.org/';
182 |
183 | if (settings.DOI) {
184 | url += 'papers/' + settings.DOI;
185 | } else if (settings.ORCID) {
186 | url += 'users/' + settings.ORCID;
187 | } else {
188 | throw 'You need to supply either a DOI or an ORCID.';
189 | }
190 |
191 | url += '/badges';
192 |
193 | return url;
194 | }
195 |
196 | /**
197 | * Processes the data from the Badges API so it
198 | * can be rendered in the next step.
199 | *
200 | * @param {string} json
201 | */
202 | function processAjaxResponse(json) {
203 | var badgesJson = JSON.parse(json);
204 | var badges = {};
205 | var isDOI = (settings.hasOwnProperty('DOI') && settings.DOI.length);
206 |
207 | for (var i = 0; i < badgesJson.length; i++) {
208 | var badgeId = badgesJson[i].badge.slug;
209 | if (!badges.hasOwnProperty(badgeId)) {
210 | badges[badgeId] = {
211 | name: badgesJson[i].badge.name,
212 | consumerDescription: badgesJson[i].badge.consumerDescription,
213 | imageUrl: badgesJson[i].badge.imageUrl,
214 | links: []
215 | };
216 | }
217 |
218 | // depending whether we have a DOI widget, an ORCID default widget
219 | // ( = displays names) or an ORCID display a list
220 | // of either authors or articles for a badge
221 | if (isDOI || ORCIDWidgetType === 'default') {
222 | badges[badgeId].links.push({
223 | id: badgesJson[i].orcid,
224 | type: 'ORCID',
225 | taxonomy: badgeId,
226 | text: badgesJson[i].authorName,
227 | url: 'https://orcid.org/' + badgesJson[i].orcid
228 | });
229 | } else {
230 | var localDOI = badgesJson[i].evidenceUrl.split('doi.org/')[1];
231 |
232 | badges[badgeId].links.push({
233 | id: localDOI,
234 | type: 'DOI',
235 | taxonomy: badgeId,
236 | text: localDOI,
237 | url: badgesJson[i].evidenceUrl.replace('http:', 'https:')
238 | });
239 | }
240 | }
241 |
242 | renderBadges(badges);
243 | }
244 |
245 | /**
246 | * Generates and displays the HTML code for the received
247 | * badge data.
248 | *
249 | * @param {Object} badges
250 | */
251 | function renderBadges(badges) {
252 | var i = 0;
253 | var html = '';
254 | var numBadges = 0;
255 |
256 | for (var key in badges) {
257 | if (badges.hasOwnProperty(key)) {
258 | numBadges++;
259 |
260 | html += '
';
272 | }
273 | }
274 |
275 | containerElement.innerHTML = html;
276 |
277 | // if there were any badges and if the user supplied
278 | // removeClass in the settings, remove the class from
279 | // all elements on the page
280 | if (numBadges && settings.hasOwnProperty('removeClass') && settings.removeClass.length) {
281 | var elements = document.getElementsByClassName(settings.removeClass);
282 |
283 | for (i = 0; i < elements.length; i++) {
284 | var classes = elements[i].className.split(' ');
285 | for (var j = 0; j < classes.length; j++) {
286 | if (classes[j] === settings.removeClass) {
287 | classes.splice(j, 1);
288 | }
289 | }
290 | elements[i].className = classes.join(' ');
291 | }
292 | }
293 |
294 | // add mouseover and clickCallbacks for all links
295 | var links = document.getElementsByClassName('paper-badger-link');
296 | for (i = 0; i < links.length - 1; i++) {
297 | links[i].addEventListener('mouseover', mouseOverMethod);
298 | links[i].addEventListener('click', clickCallbackMethod);
299 | }
300 | }
301 |
302 | /**
303 | * Marks all occurrences of an author on mouse over
304 | * by adding a .active CSS class to the link element.
305 | */
306 | function mouseOverMethod() {
307 | var id = this.getAttribute('data-id');
308 | var links = document.getElementsByClassName('paper-badger-link');
309 |
310 | for (var i = 0; i < links.length; i++) {
311 | var j = 0;
312 | var classes = links[i].className.split(' ');
313 |
314 | if (links[i].getAttribute('data-id') === id) {
315 | var found = false;
316 | for (j = 0; j < classes.length - 1; j++) {
317 | if (classes[j] === 'active') {
318 | found = true;
319 | break;
320 | }
321 | }
322 |
323 | if (!found) {
324 | classes.push('active');
325 | }
326 | } else {
327 | for (j = classes.length; j > 0; j--) {
328 | if (classes[j] === 'active') {
329 | classes.splice(j, 1);
330 | }
331 | }
332 | }
333 |
334 | links[i].className = classes.join(' ');
335 | }
336 | }
337 |
338 | /**
339 | * Calls the clickCallback method if the user supplied one
340 | */
341 | function clickCallbackMethod() {
342 | if (settings.hasOwnProperty('clickCallback') && settings.clickCallback) {
343 | var data = {
344 | taxonomy: this.getAttribute('data-taxonomy')
345 | };
346 |
347 | if (this.getAttribute('data-type') === 'DOI') {
348 | data.doi = this.getAttribute('data-id');
349 | } else if (this.getAttribute('data-type') === 'ORCID') {
350 | data.orcid = this.getAttribute('data-id');
351 | }
352 |
353 | settings.clickCallback(data);
354 | }
355 | }
356 |
357 | construct();
358 | };
359 |
--------------------------------------------------------------------------------
/bin/load_badges.sql:
--------------------------------------------------------------------------------
1 | --
2 | -- Insert Contributorship Badges data into `images` table
3 | -- see: http://dictionary.casrai.org/Contributor_Roles
4 | -- desc images;
5 | -- +----------+--------------+------+-----+---------+----------------+
6 | -- | Field | Type | Null | Key | Default | Extra |
7 | -- +----------+--------------+------+-----+---------+----------------+
8 | -- | id | int(11) | NO | PRI | NULL | auto_increment |
9 | -- | slug | varchar(255) | NO | UNI | NULL | |
10 | -- | url | varchar(255) | YES | | NULL | |
11 | -- | mimetype | varchar(255) | YES | | NULL | |
12 | -- | data | longblob | YES | | NULL | |
13 | -- +----------+--------------+------+-----+---------+----------------+
14 | --
15 |
16 | LOCK TABLES `images` WRITE;
17 | /*!40000 ALTER TABLE `images` DISABLE KEYS */;
18 | INSERT INTO `images` VALUES
19 | (NULL,'conceptualization-img','https://s3.amazonaws.com/mozillascience/badges/conceptualization.png',NULL,NULL),
20 | (NULL,'data_curation-img','https://s3.amazonaws.com/mozillascience/badges/data_curation.png',NULL,NULL),
21 | (NULL,'formal_analysis-img','https://s3.amazonaws.com/mozillascience/badges/formal_analysis.png',NULL,NULL),
22 | (NULL,'funding-img','https://s3.amazonaws.com/mozillascience/badges/funding.png',NULL,NULL),
23 | (NULL,'investigation-img','https://s3.amazonaws.com/mozillascience/badges/investigation.png',NULL,NULL),
24 | (NULL,'methodology-img','https://s3.amazonaws.com/mozillascience/badges/methodology.png',NULL,NULL),
25 | (NULL,'project_administration-img','https://s3.amazonaws.com/mozillascience/badges/project_administration.png',NULL,NULL),
26 | (NULL,'resources-img','https://s3.amazonaws.com/mozillascience/badges/resources.png',NULL,NULL),
27 | (NULL,'software-img','https://s3.amazonaws.com/mozillascience/badges/software.png',NULL,NULL),
28 | (NULL,'supervision-img','https://s3.amazonaws.com/mozillascience/badges/supervision.png',NULL,NULL),
29 | (NULL,'validation-img','https://s3.amazonaws.com/mozillascience/badges/testing.png',NULL,NULL),
30 | (NULL,'data_visualization-img','https://s3.amazonaws.com/mozillascience/badges/data_visualization.png',NULL,NULL),
31 | (NULL,'writing_initial-img','https://s3.amazonaws.com/mozillascience/badges/writing_initial.png',NULL,NULL),
32 | (NULL,'writing_review-img','https://s3.amazonaws.com/mozillascience/badges/writing_review.png',NULL,NULL);
33 | /*!40000 ALTER TABLE `images` ENABLE KEYS */;
34 | UNLOCK TABLES;
35 |
36 | --
37 | -- Insert Contributorship Badges data into `badges` table
38 | -- see: http://dictionary.casrai.org/Contributor_Roles
39 | -- desc badges;
40 | -- +---------------------+--------------------------------------------+------+-----+-------------------+----------------+
41 | -- | Field | Type | Null | Key | Default | Extra |
42 | -- +---------------------+--------------------------------------------+------+-----+-------------------+----------------+
43 | -- | id | int(11) | NO | PRI | NULL | auto_increment |
44 | -- | slug | varchar(255) | NO | UNI | NULL | |
45 | -- | name | varchar(255) | NO | | NULL | |
46 | -- | strapline | varchar(140) | YES | | NULL | |
47 | -- | earnerDescription | text | NO | | NULL | |
48 | -- | consumerDescription | text | NO | | NULL | |
49 | -- | issuerUrl | varchar(255) | YES | | NULL | |
50 | -- | rubricUrl | varchar(255) | YES | | NULL | |
51 | -- | criteriaUrl | varchar(255) | NO | | NULL | |
52 | -- | timeValue | int(11) | YES | | NULL | |
53 | -- | timeUnits | enum('minutes','hours','days','weeks') | YES | | NULL | |
54 | -- | limit | int(11) | YES | | NULL | |
55 | -- | unique | tinyint(1) | NO | | 0 | |
56 | -- | archived | tinyint(1) | NO | | 0 | |
57 | -- | created | timestamp | NO | | CURRENT_TIMESTAMP | |
58 | -- | imageId | int(11) | NO | | NULL | |
59 | -- | programId | int(11) | YES | | NULL | |
60 | -- | issuerId | int(11) | YES | | NULL | |
61 | -- | systemId | int(11) | YES | | NULL | |
62 | -- | type | varchar(255) | NO | | NULL | |
63 | -- | evidenceType | enum('URL','Text','Photo','Video','Sound') | YES | | NULL | |
64 | -- +---------------------+--------------------------------------------+------+-----+-------------------+----------------+
65 | --
66 |
67 | LOCK TABLES `badges` WRITE;
68 | /*!40000 ALTER TABLE `badges` DISABLE KEYS */;
69 | INSERT INTO `badges` VALUES
70 | (NULL,'conceptualization','Conceptualization',NULL,'Ideas; formulation or evolution of overarching research goals and aims.','Ideas; formulation or evolution of overarching research goals and aims.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
71 | (NULL,'data_curation','Data curation',NULL,'Management activities to annotate (produce metadata), scrub data and maintain research data (including software code, where it is necessary for interpreting the data itself) for initial use and later re-use.','Management activities to annotate (produce metadata), scrub data and maintain research data (including software code, where it is necessary for interpreting the data itself) for initial use and later re-use.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
72 | (NULL,'formal_analysis','Formal analysis',NULL,'Application of statistical, mathematical, computational, or other formal techniques to analyse or synthesize study data.','Application of statistical, mathematical, computational, or other formal techniques to analyse or synthesize study data.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
73 | (NULL,'funding','Funding acquisition',NULL,'Acquisition of the financial support for the project leading to this publication.','Acquisition of the financial support for the project leading to this publication.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
74 | (NULL,'investigation','Investigation',NULL,'Conducting a research and investigation process, specifically performing the experiments, or data/evidence collection.','Conducting a research and investigation process, specifically performing the experiments, or data/evidence collection.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
75 | (NULL,'methodology','Methodology',NULL,'Development or design of methodology; creation of models.','Development or design of methodology; creation of models.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
76 | (NULL,'project_administration','Project administration',NULL,'Management and coordination responsibility for the research activity planning and execution.','Management and coordination responsibility for the research activity planning and execution.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
77 | (NULL,'resources','Resources',NULL,'Provision of study materials, reagents, materials, patients, laboratory samples, animals, instrumentation, computing resources, or other analysis tools.','Provision of study materials, reagents, materials, patients, laboratory samples, animals, instrumentation, computing resources, or other analysis tools.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
78 | (NULL,'software','Software',NULL,'Programming, software development; designing computer programs; implementation of the computer code and supporting algorithms; testing of existing code components.','Programming, software development; designing computer programs; implementation of the computer code and supporting algorithms; testing of existing code components.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
79 | (NULL,'supervision','Supervision',NULL,'Oversight and leadership responsibility for the research activity planning and execution, including mentorship external to the core team.','Oversight and leadership responsibility for the research activity planning and execution, including mentorship external to the core team.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
80 | (NULL,'validation','Validation',NULL,'Verification, whether as a part of the activity or separate, of the overall replication/reproducibility of results/experiments and other research outputs.','Verification, whether as a part of the activity or separate, of the overall replication/reproducibility of results/experiments and other research outputs.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
81 | (NULL,'data_visualization','Data visualization',NULL,'Preparation, creation and/or presentation of the published work, specifically visualization/data presentation.','Preparation, creation and/or presentation of the published work, specifically visualization/data presentation.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
82 | (NULL,'writing_initial','Writing - original draft',NULL,'Preparation, creation and/or presentation of the published work, specifically writing the initial draft (including substantive translation).','Preparation, creation and/or presentation of the published work, specifically writing the initial draft (including substantive translation).',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL),
83 | (NULL,'writing_review','Writing - review & editing',NULL,'Preparation, creation and/or presentation of the published work by those from the original research group, specifically critical review, commentary or revision – including pre- or post-publication stages.','Preparation, creation and/or presentation of the published work by those from the original research group, specifically critical review, commentary or revision – including pre- or post-publication stages.',NULL,NULL,'http://dictionary.casrai.org/Contributor_Roles',NULL,NULL,NULL,0,0,NULL,1,NULL,NULL,1,'contributor',NULL);
84 | /*!40000 ALTER TABLE `badges` ENABLE KEYS */;
85 | UNLOCK TABLES;
86 |
87 | --
88 | -- Insert correct imageId in badges table (id autoincremented on insert)
89 | --
90 |
91 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'conceptualization-img') WHERE slug = 'conceptualization';
92 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'data_curation-img') WHERE slug = 'data_curation';
93 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'formal_analysis-img') WHERE slug = 'formal_analysis';
94 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'funding-img') WHERE slug = 'funding';
95 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'investigation-img') WHERE slug = 'investigation';
96 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'methodology-img') WHERE slug = 'methodology';
97 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'project_administration-img') WHERE slug = 'project_administration';
98 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'resources-img') WHERE slug = 'resources';
99 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'software-img') WHERE slug = 'software';
100 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'supervision-img') WHERE slug = 'supervision';
101 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'validation-img') WHERE slug = 'validation';
102 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'data_visualization-img') WHERE slug = 'data_visualization';
103 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'writing_initial-img') WHERE slug = 'writing_initial';
104 | UPDATE `badges` SET imageId = (SELECT id FROM images where slug = 'writing_review-img') WHERE slug = 'writing_review';
105 |
106 | --
107 | -- Create system badgekit for MozillaScience. Assign all badges to this system.
108 | --
109 |
110 | INSERT INTO systems (slug, name, url) VALUES ('badgekit', 'MozillaScience', 'http://mozillascience.org/');
111 | UPDATE `badges` SET systemId = (SELECT id FROM systems where slug = 'badgekit');
112 |
--------------------------------------------------------------------------------
/public/css/vendor/pure-min.css:
--------------------------------------------------------------------------------
1 | /*!
2 | Pure v0.6.0
3 | Copyright 2014 Yahoo! Inc. All rights reserved.
4 | Licensed under the BSD License.
5 | https://github.com/yahoo/pure/blob/master/LICENSE.md
6 | */
7 | /*!
8 | normalize.css v^3.0 | MIT License | git.io/normalize
9 | Copyright (c) Nicolas Gallagher and Jonathan Neal
10 | */
11 | /*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block}.pure-g{letter-spacing:-.31em;*letter-spacing:normal;*word-spacing:-.43em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-flex;-webkit-flex-flow:row wrap;display:-ms-flexbox;-ms-flex-flow:row wrap;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-g [class *="pure-u"]{font-family:sans-serif}.pure-u-1,.pure-u-1-1,.pure-u-1-2,.pure-u-1-3,.pure-u-2-3,.pure-u-1-4,.pure-u-3-4,.pure-u-1-5,.pure-u-2-5,.pure-u-3-5,.pure-u-4-5,.pure-u-5-5,.pure-u-1-6,.pure-u-5-6,.pure-u-1-8,.pure-u-3-8,.pure-u-5-8,.pure-u-7-8,.pure-u-1-12,.pure-u-5-12,.pure-u-7-12,.pure-u-11-12,.pure-u-1-24,.pure-u-2-24,.pure-u-3-24,.pure-u-4-24,.pure-u-5-24,.pure-u-6-24,.pure-u-7-24,.pure-u-8-24,.pure-u-9-24,.pure-u-10-24,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24{display:inline-block;*display:inline;zoom:1;letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto}.pure-u-1-24{width:4.1667%;*width:4.1357%}.pure-u-1-12,.pure-u-2-24{width:8.3333%;*width:8.3023%}.pure-u-1-8,.pure-u-3-24{width:12.5%;*width:12.469%}.pure-u-1-6,.pure-u-4-24{width:16.6667%;*width:16.6357%}.pure-u-1-5{width:20%;*width:19.969%}.pure-u-5-24{width:20.8333%;*width:20.8023%}.pure-u-1-4,.pure-u-6-24{width:25%;*width:24.969%}.pure-u-7-24{width:29.1667%;*width:29.1357%}.pure-u-1-3,.pure-u-8-24{width:33.3333%;*width:33.3023%}.pure-u-3-8,.pure-u-9-24{width:37.5%;*width:37.469%}.pure-u-2-5{width:40%;*width:39.969%}.pure-u-5-12,.pure-u-10-24{width:41.6667%;*width:41.6357%}.pure-u-11-24{width:45.8333%;*width:45.8023%}.pure-u-1-2,.pure-u-12-24{width:50%;*width:49.969%}.pure-u-13-24{width:54.1667%;*width:54.1357%}.pure-u-7-12,.pure-u-14-24{width:58.3333%;*width:58.3023%}.pure-u-3-5{width:60%;*width:59.969%}.pure-u-5-8,.pure-u-15-24{width:62.5%;*width:62.469%}.pure-u-2-3,.pure-u-16-24{width:66.6667%;*width:66.6357%}.pure-u-17-24{width:70.8333%;*width:70.8023%}.pure-u-3-4,.pure-u-18-24{width:75%;*width:74.969%}.pure-u-19-24{width:79.1667%;*width:79.1357%}.pure-u-4-5{width:80%;*width:79.969%}.pure-u-5-6,.pure-u-20-24{width:83.3333%;*width:83.3023%}.pure-u-7-8,.pure-u-21-24{width:87.5%;*width:87.469%}.pure-u-11-12,.pure-u-22-24{width:91.6667%;*width:91.6357%}.pure-u-23-24{width:95.8333%;*width:95.8023%}.pure-u-1,.pure-u-1-1,.pure-u-5-5,.pure-u-24-24{width:100%}.pure-button{display:inline-block;zoom:1;line-height:normal;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:#444;color:rgba(0,0,0,.8);border:1px solid #999;border:0 rgba(0,0,0,0);background-color:#E6E6E6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:hover,.pure-button:focus{filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#1a000000', GradientType=0);background-image:-webkit-gradient(linear,0 0,0 100%,from(transparent),color-stop(40%,rgba(0,0,0,.05)),to(rgba(0,0,0,.1)));background-image:-webkit-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:-moz-linear-gradient(top,rgba(0,0,0,.05) 0,rgba(0,0,0,.1));background-image:-o-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button:focus{outline:0}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset;border-color:#000\9}.pure-button[disabled],.pure-button-disabled,.pure-button-disabled:hover,.pure-button-disabled:focus,.pure-button-disabled:active{border:0;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);filter:alpha(opacity=40);-khtml-opacity:.4;-moz-opacity:.4;opacity:.4;cursor:not-allowed;box-shadow:none}.pure-button-hidden{display:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;vertical-align:middle;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-form input[type=color]{padding:.2em .5em}.pure-form input[type=text]:focus,.pure-form input[type=password]:focus,.pure-form input[type=email]:focus,.pure-form input[type=url]:focus,.pure-form input[type=date]:focus,.pure-form input[type=month]:focus,.pure-form input[type=time]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=week]:focus,.pure-form input[type=number]:focus,.pure-form input[type=search]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=color]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129FEA}.pure-form input:not([type]):focus{outline:0;border-color:#129FEA}.pure-form input[type=file]:focus,.pure-form input[type=radio]:focus,.pure-form input[type=checkbox]:focus{outline:thin solid #129FEA;outline:1px auto #129FEA}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input[type=text][disabled],.pure-form input[type=password][disabled],.pure-form input[type=email][disabled],.pure-form input[type=url][disabled],.pure-form input[type=date][disabled],.pure-form input[type=month][disabled],.pure-form input[type=time][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=week][disabled],.pure-form input[type=number][disabled],.pure-form input[type=search][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=color][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input:not([type])[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form textarea:focus:invalid,.pure-form select:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus,.pure-form input[type=checkbox]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input[type=text],.pure-form-stacked input[type=password],.pure-form-stacked input[type=email],.pure-form-stacked input[type=url],.pure-form-stacked input[type=date],.pure-form-stacked input[type=month],.pure-form-stacked input[type=time],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=week],.pure-form-stacked input[type=number],.pure-form-stacked input[type=search],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=color],.pure-form-stacked input[type=file],.pure-form-stacked select,.pure-form-stacked label,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-stacked input:not([type]){display:block;margin:.25em 0}.pure-form-aligned input,.pure-form-aligned textarea,.pure-form-aligned select,.pure-form-aligned .pure-help-inline,.pure-form-message-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form input.pure-input-rounded,.pure-form .pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form .pure-help-inline,.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type=text],.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=tel],.pure-form input[type=color],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type=text],.pure-group input[type=password],.pure-group input[type=email],.pure-group input[type=url],.pure-group input[type=date],.pure-group input[type=month],.pure-group input[type=time],.pure-group input[type=datetime],.pure-group input[type=datetime-local],.pure-group input[type=week],.pure-group input[type=number],.pure-group input[type=search],.pure-group input[type=tel],.pure-group input[type=color]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0}.pure-form .pure-help-inline,.pure-form-message-inline,.pure-form-message{display:block;font-size:.75em;padding:.2em 0 .8em}}.pure-menu{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-list,.pure-menu-item{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-link,.pure-menu-heading{display:block;text-decoration:none;white-space:nowrap}.pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-separator{display:inline-block;*display:inline;zoom:1;vertical-align:middle}.pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-allow-hover:hover>.pure-menu-children,.pure-menu-active>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"\25B8";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"\25BE"}.pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;padding:.5em 0}.pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar{display:none}.pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-link,.pure-menu-disabled,.pure-menu-heading{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent}.pure-menu-active>.pure-menu-link,.pure-menu-link:hover,.pure-menu-link:focus{background-color:#eee}.pure-menu-selected .pure-menu-link,.pure-menu-selected .pure-menu-link:visited{color:#000}.pure-table{border-collapse:collapse;border-spacing:0;empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table td:first-child,.pure-table th:first-child{border-left-width:0}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td{background-color:#f2f2f2}.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0}
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Mozilla Public License Version 2.0
2 | ==================================
3 |
4 | 1. Definitions
5 | --------------
6 |
7 | 1.1. "Contributor"
8 | means each individual or legal entity that creates, contributes to
9 | the creation of, or owns Covered Software.
10 |
11 | 1.2. "Contributor Version"
12 | means the combination of the Contributions of others (if any) used
13 | by a Contributor and that particular Contributor's Contribution.
14 |
15 | 1.3. "Contribution"
16 | means Covered Software of a particular Contributor.
17 |
18 | 1.4. "Covered Software"
19 | means Source Code Form to which the initial Contributor has attached
20 | the notice in Exhibit A, the Executable Form of such Source Code
21 | Form, and Modifications of such Source Code Form, in each case
22 | including portions thereof.
23 |
24 | 1.5. "Incompatible With Secondary Licenses"
25 | means
26 |
27 | (a) that the initial Contributor has attached the notice described
28 | in Exhibit B to the Covered Software; or
29 |
30 | (b) that the Covered Software was made available under the terms of
31 | version 1.1 or earlier of the License, but not also under the
32 | terms of a Secondary License.
33 |
34 | 1.6. "Executable Form"
35 | means any form of the work other than Source Code Form.
36 |
37 | 1.7. "Larger Work"
38 | means a work that combines Covered Software with other material, in
39 | a separate file or files, that is not Covered Software.
40 |
41 | 1.8. "License"
42 | means this document.
43 |
44 | 1.9. "Licensable"
45 | means having the right to grant, to the maximum extent possible,
46 | whether at the time of the initial grant or subsequently, any and
47 | all of the rights conveyed by this License.
48 |
49 | 1.10. "Modifications"
50 | means any of the following:
51 |
52 | (a) any file in Source Code Form that results from an addition to,
53 | deletion from, or modification of the contents of Covered
54 | Software; or
55 |
56 | (b) any new file in Source Code Form that contains any Covered
57 | Software.
58 |
59 | 1.11. "Patent Claims" of a Contributor
60 | means any patent claim(s), including without limitation, method,
61 | process, and apparatus claims, in any patent Licensable by such
62 | Contributor that would be infringed, but for the grant of the
63 | License, by the making, using, selling, offering for sale, having
64 | made, import, or transfer of either its Contributions or its
65 | Contributor Version.
66 |
67 | 1.12. "Secondary License"
68 | means either the GNU General Public License, Version 2.0, the GNU
69 | Lesser General Public License, Version 2.1, the GNU Affero General
70 | Public License, Version 3.0, or any later versions of those
71 | licenses.
72 |
73 | 1.13. "Source Code Form"
74 | means the form of the work preferred for making modifications.
75 |
76 | 1.14. "You" (or "Your")
77 | means an individual or a legal entity exercising rights under this
78 | License. For legal entities, "You" includes any entity that
79 | controls, is controlled by, or is under common control with You. For
80 | purposes of this definition, "control" means (a) the power, direct
81 | or indirect, to cause the direction or management of such entity,
82 | whether by contract or otherwise, or (b) ownership of more than
83 | fifty percent (50%) of the outstanding shares or beneficial
84 | ownership of such entity.
85 |
86 | 2. License Grants and Conditions
87 | --------------------------------
88 |
89 | 2.1. Grants
90 |
91 | Each Contributor hereby grants You a world-wide, royalty-free,
92 | non-exclusive license:
93 |
94 | (a) under intellectual property rights (other than patent or trademark)
95 | Licensable by such Contributor to use, reproduce, make available,
96 | modify, display, perform, distribute, and otherwise exploit its
97 | Contributions, either on an unmodified basis, with Modifications, or
98 | as part of a Larger Work; and
99 |
100 | (b) under Patent Claims of such Contributor to make, use, sell, offer
101 | for sale, have made, import, and otherwise transfer either its
102 | Contributions or its Contributor Version.
103 |
104 | 2.2. Effective Date
105 |
106 | The licenses granted in Section 2.1 with respect to any Contribution
107 | become effective for each Contribution on the date the Contributor first
108 | distributes such Contribution.
109 |
110 | 2.3. Limitations on Grant Scope
111 |
112 | The licenses granted in this Section 2 are the only rights granted under
113 | this License. No additional rights or licenses will be implied from the
114 | distribution or licensing of Covered Software under this License.
115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a
116 | Contributor:
117 |
118 | (a) for any code that a Contributor has removed from Covered Software;
119 | or
120 |
121 | (b) for infringements caused by: (i) Your and any other third party's
122 | modifications of Covered Software, or (ii) the combination of its
123 | Contributions with other software (except as part of its Contributor
124 | Version); or
125 |
126 | (c) under Patent Claims infringed by Covered Software in the absence of
127 | its Contributions.
128 |
129 | This License does not grant any rights in the trademarks, service marks,
130 | or logos of any Contributor (except as may be necessary to comply with
131 | the notice requirements in Section 3.4).
132 |
133 | 2.4. Subsequent Licenses
134 |
135 | No Contributor makes additional grants as a result of Your choice to
136 | distribute the Covered Software under a subsequent version of this
137 | License (see Section 10.2) or under the terms of a Secondary License (if
138 | permitted under the terms of Section 3.3).
139 |
140 | 2.5. Representation
141 |
142 | Each Contributor represents that the Contributor believes its
143 | Contributions are its original creation(s) or it has sufficient rights
144 | to grant the rights to its Contributions conveyed by this License.
145 |
146 | 2.6. Fair Use
147 |
148 | This License is not intended to limit any rights You have under
149 | applicable copyright doctrines of fair use, fair dealing, or other
150 | equivalents.
151 |
152 | 2.7. Conditions
153 |
154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155 | in Section 2.1.
156 |
157 | 3. Responsibilities
158 | -------------------
159 |
160 | 3.1. Distribution of Source Form
161 |
162 | All distribution of Covered Software in Source Code Form, including any
163 | Modifications that You create or to which You contribute, must be under
164 | the terms of this License. You must inform recipients that the Source
165 | Code Form of the Covered Software is governed by the terms of this
166 | License, and how they can obtain a copy of this License. You may not
167 | attempt to alter or restrict the recipients' rights in the Source Code
168 | Form.
169 |
170 | 3.2. Distribution of Executable Form
171 |
172 | If You distribute Covered Software in Executable Form then:
173 |
174 | (a) such Covered Software must also be made available in Source Code
175 | Form, as described in Section 3.1, and You must inform recipients of
176 | the Executable Form how they can obtain a copy of such Source Code
177 | Form by reasonable means in a timely manner, at a charge no more
178 | than the cost of distribution to the recipient; and
179 |
180 | (b) You may distribute such Executable Form under the terms of this
181 | License, or sublicense it under different terms, provided that the
182 | license for the Executable Form does not attempt to limit or alter
183 | the recipients' rights in the Source Code Form under this License.
184 |
185 | 3.3. Distribution of a Larger Work
186 |
187 | You may create and distribute a Larger Work under terms of Your choice,
188 | provided that You also comply with the requirements of this License for
189 | the Covered Software. If the Larger Work is a combination of Covered
190 | Software with a work governed by one or more Secondary Licenses, and the
191 | Covered Software is not Incompatible With Secondary Licenses, this
192 | License permits You to additionally distribute such Covered Software
193 | under the terms of such Secondary License(s), so that the recipient of
194 | the Larger Work may, at their option, further distribute the Covered
195 | Software under the terms of either this License or such Secondary
196 | License(s).
197 |
198 | 3.4. Notices
199 |
200 | You may not remove or alter the substance of any license notices
201 | (including copyright notices, patent notices, disclaimers of warranty,
202 | or limitations of liability) contained within the Source Code Form of
203 | the Covered Software, except that You may alter any license notices to
204 | the extent required to remedy known factual inaccuracies.
205 |
206 | 3.5. Application of Additional Terms
207 |
208 | You may choose to offer, and to charge a fee for, warranty, support,
209 | indemnity or liability obligations to one or more recipients of Covered
210 | Software. However, You may do so only on Your own behalf, and not on
211 | behalf of any Contributor. You must make it absolutely clear that any
212 | such warranty, support, indemnity, or liability obligation is offered by
213 | You alone, and You hereby agree to indemnify every Contributor for any
214 | liability incurred by such Contributor as a result of warranty, support,
215 | indemnity or liability terms You offer. You may include additional
216 | disclaimers of warranty and limitations of liability specific to any
217 | jurisdiction.
218 |
219 | 4. Inability to Comply Due to Statute or Regulation
220 | ---------------------------------------------------
221 |
222 | If it is impossible for You to comply with any of the terms of this
223 | License with respect to some or all of the Covered Software due to
224 | statute, judicial order, or regulation then You must: (a) comply with
225 | the terms of this License to the maximum extent possible; and (b)
226 | describe the limitations and the code they affect. Such description must
227 | be placed in a text file included with all distributions of the Covered
228 | Software under this License. Except to the extent prohibited by statute
229 | or regulation, such description must be sufficiently detailed for a
230 | recipient of ordinary skill to be able to understand it.
231 |
232 | 5. Termination
233 | --------------
234 |
235 | 5.1. The rights granted under this License will terminate automatically
236 | if You fail to comply with any of its terms. However, if You become
237 | compliant, then the rights granted under this License from a particular
238 | Contributor are reinstated (a) provisionally, unless and until such
239 | Contributor explicitly and finally terminates Your grants, and (b) on an
240 | ongoing basis, if such Contributor fails to notify You of the
241 | non-compliance by some reasonable means prior to 60 days after You have
242 | come back into compliance. Moreover, Your grants from a particular
243 | Contributor are reinstated on an ongoing basis if such Contributor
244 | notifies You of the non-compliance by some reasonable means, this is the
245 | first time You have received notice of non-compliance with this License
246 | from such Contributor, and You become compliant prior to 30 days after
247 | Your receipt of the notice.
248 |
249 | 5.2. If You initiate litigation against any entity by asserting a patent
250 | infringement claim (excluding declaratory judgment actions,
251 | counter-claims, and cross-claims) alleging that a Contributor Version
252 | directly or indirectly infringes any patent, then the rights granted to
253 | You by any and all Contributors for the Covered Software under Section
254 | 2.1 of this License shall terminate.
255 |
256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257 | end user license agreements (excluding distributors and resellers) which
258 | have been validly granted by You or Your distributors under this License
259 | prior to termination shall survive termination.
260 |
261 | ************************************************************************
262 | * *
263 | * 6. Disclaimer of Warranty *
264 | * ------------------------- *
265 | * *
266 | * Covered Software is provided under this License on an "as is" *
267 | * basis, without warranty of any kind, either expressed, implied, or *
268 | * statutory, including, without limitation, warranties that the *
269 | * Covered Software is free of defects, merchantable, fit for a *
270 | * particular purpose or non-infringing. The entire risk as to the *
271 | * quality and performance of the Covered Software is with You. *
272 | * Should any Covered Software prove defective in any respect, You *
273 | * (not any Contributor) assume the cost of any necessary servicing, *
274 | * repair, or correction. This disclaimer of warranty constitutes an *
275 | * essential part of this License. No use of any Covered Software is *
276 | * authorized under this License except under this disclaimer. *
277 | * *
278 | ************************************************************************
279 |
280 | ************************************************************************
281 | * *
282 | * 7. Limitation of Liability *
283 | * -------------------------- *
284 | * *
285 | * Under no circumstances and under no legal theory, whether tort *
286 | * (including negligence), contract, or otherwise, shall any *
287 | * Contributor, or anyone who distributes Covered Software as *
288 | * permitted above, be liable to You for any direct, indirect, *
289 | * special, incidental, or consequential damages of any character *
290 | * including, without limitation, damages for lost profits, loss of *
291 | * goodwill, work stoppage, computer failure or malfunction, or any *
292 | * and all other commercial damages or losses, even if such party *
293 | * shall have been informed of the possibility of such damages. This *
294 | * limitation of liability shall not apply to liability for death or *
295 | * personal injury resulting from such party's negligence to the *
296 | * extent applicable law prohibits such limitation. Some *
297 | * jurisdictions do not allow the exclusion or limitation of *
298 | * incidental or consequential damages, so this exclusion and *
299 | * limitation may not apply to You. *
300 | * *
301 | ************************************************************************
302 |
303 | 8. Litigation
304 | -------------
305 |
306 | Any litigation relating to this License may be brought only in the
307 | courts of a jurisdiction where the defendant maintains its principal
308 | place of business and such litigation shall be governed by laws of that
309 | jurisdiction, without reference to its conflict-of-law provisions.
310 | Nothing in this Section shall prevent a party's ability to bring
311 | cross-claims or counter-claims.
312 |
313 | 9. Miscellaneous
314 | ----------------
315 |
316 | This License represents the complete agreement concerning the subject
317 | matter hereof. If any provision of this License is held to be
318 | unenforceable, such provision shall be reformed only to the extent
319 | necessary to make it enforceable. Any law or regulation which provides
320 | that the language of a contract shall be construed against the drafter
321 | shall not be used to construe this License against a Contributor.
322 |
323 | 10. Versions of the License
324 | ---------------------------
325 |
326 | 10.1. New Versions
327 |
328 | Mozilla Foundation is the license steward. Except as provided in Section
329 | 10.3, no one other than the license steward has the right to modify or
330 | publish new versions of this License. Each version will be given a
331 | distinguishing version number.
332 |
333 | 10.2. Effect of New Versions
334 |
335 | You may distribute the Covered Software under the terms of the version
336 | of the License under which You originally received the Covered Software,
337 | or under the terms of any subsequent version published by the license
338 | steward.
339 |
340 | 10.3. Modified Versions
341 |
342 | If you create software not governed by this License, and you want to
343 | create a new license for such software, you may create and use a
344 | modified version of this License if you rename the license and remove
345 | any references to the name of the license steward (except to note that
346 | such modified license differs from this License).
347 |
348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary
349 | Licenses
350 |
351 | If You choose to distribute Source Code Form that is Incompatible With
352 | Secondary Licenses under the terms of this version of the License, the
353 | notice described in Exhibit B of this License must be attached.
354 |
355 | Exhibit A - Source Code Form License Notice
356 | -------------------------------------------
357 |
358 | This Source Code Form is subject to the terms of the Mozilla Public
359 | License, v. 2.0. If a copy of the MPL was not distributed with this
360 | file, You can obtain one at http://mozilla.org/MPL/2.0/.
361 |
362 | If it is not possible or desirable to put the notice in a particular
363 | file, then You may include the notice in a location (such as a LICENSE
364 | file in a relevant directory) where a recipient would be likely to look
365 | for such a notice.
366 |
367 | You may add additional accurate notices of copyright ownership.
368 |
369 | Exhibit B - "Incompatible With Secondary Licenses" Notice
370 | ---------------------------------------------------------
371 |
372 | This Source Code Form is "Incompatible With Secondary Licenses", as
373 | defined by the Mozilla Public License, v. 2.0.
374 |
--------------------------------------------------------------------------------