Compare commits

...

23 Commits
1.2.3 ... 1.3.2

Author SHA1 Message Date
Rowan Manning
0b1daf1482 Version 1.3.2 2015-01-17 18:37:03 +00:00
Rowan Manning
57933c074b Update pa11y-webservice dependency 2015-01-17 18:35:35 +00:00
Rowan Manning
977dfa9dd0 Version 1.3.1 2014-03-05 10:00:51 +00:00
Rowan Manning
a94b1a45ae Merge branch 'filter-urls' of github.com:nature/pa11y-dashboard into develop
Conflicts:
	view/partial/tasks.html
2014-03-05 09:57:18 +00:00
perryharlock
e830d48074 Fix for url filter position when in demo mode with a message 2014-03-05 09:39:07 +00:00
Rowan Manning
ff239edf5a Version 1.3.0 2014-03-04 14:28:03 +00:00
Rowan Manning
c2013e42d4 Commit style changes 2014-03-04 14:15:31 +00:00
Rowan Manning
a79a5a2fe6 Merge branch 'filter-urls' of github.com:nature/pa11y-dashboard into develop 2014-03-04 14:14:49 +00:00
perryharlock
85fe2c4a37 Move toggle functionality from filter input to containing div 2014-03-04 14:08:57 +00:00
Rowan Manning
c04396e80e Merge branch 'gpl-preamble' of github.com:nature/pa11y-dashboard into develop 2014-02-10 14:56:06 +00:00
Jude Robinson
7b10f2de91 adding the gpl preamble 2014-02-10 14:08:38 +00:00
perryharlock
890ec38216 Add filter styling 2014-01-21 10:50:57 +00:00
Rowan Manning
d8cb1b6c71 Write the JavaScript for URL filtering 2014-01-14 11:40:23 +00:00
Rowan Manning
a605835cc9 Attempt to fix timeout errors in tests 2014-01-13 09:59:21 +00:00
perryharlock
01897d8a17 Amend styles for ignore button 2014-01-13 09:59:21 +00:00
Rowan Manning
02e22eb094 Add "unigore" buttons to ignored rules 2014-01-13 09:59:13 +00:00
perryharlock
dfac541294 Amends to task-card min heights 2014-01-13 09:59:13 +00:00
Rowan Manning
f3b295982f Fix typo 2014-01-13 09:58:35 +00:00
Rowan Manning
ddf2c705c9 Fix the ignore buttons for readonly/result pages 2014-01-13 09:58:35 +00:00
perryharlock
20de93bf2d Change ignore rules in results to come from mainResult 2014-01-13 09:58:35 +00:00
Rowan Manning
ccc7ddfc18 Write the back-end for rule ignoring 2014-01-13 09:58:35 +00:00
perryharlock
4347acf654 Issue 65 - Ability to select a rule to ignore from result - css / html 2014-01-13 09:58:35 +00:00
Rowan Manning
da9b383909 Fix mistakes in versioning instructions 2014-01-13 09:58:34 +00:00
60 changed files with 1133 additions and 61 deletions

View File

@@ -39,8 +39,8 @@ We use [Semantic Versioning][semver] in this project. The process for releasing
* Switch to `master` and merge the `develop` branch into it
* Update the version number in `package.json` and `README.md`
* Commit the changes with the message: "Version x.x.x" (x.x.x being the new version number)
* Tag the commit with the version number (just the numbers, no "version" or "v")
* Push with tags: `git push --tags`
* Tag the commit with the version number (just the numbers, no "version" or "v"): `git tag x.x.x`
* Push with tags: `git push && git push --tags`
* Check out the `develop` branch, merge `master` into it, and push
* On GitHub, add [release notes][release-notes] for the new version. The title should be "Version x.x.x", and the description should be a list of new features/fixes

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
module.exports = function (grunt) {
grunt.initConfig({
@@ -38,7 +53,8 @@ module.exports = function (grunt) {
functional: {
src: ['test/functional/**/*.js'],
options: {
reporter: 'spec'
reporter: 'spec',
timeout: 4000
}
}
},
@@ -75,6 +91,8 @@ module.exports = function (grunt) {
'public/js/vendor/bootstrap/js/alert.js',
'public/js/vendor/bootstrap/js/dropdown.js',
'public/js/vendor/bootstrap/js/tooltip.js',
'public/js/vendor/bootstrap/js/transition.js',
'public/js/vendor/bootstrap/js/collapse.js',
'public/js/vendor/flot/jquery.flot.js',
'public/js/vendor/flot/jquery.flot.time.js',
'public/js/vendor/flot/jquery.flot.selection.js',
@@ -113,4 +131,4 @@ module.exports = function (grunt) {
grunt.registerTask('default', ['compile', 'lint', 'test']);
grunt.registerTask('ci', ['lint', 'test']);
};
};

View File

@@ -3,7 +3,7 @@ pa11y-dashboard
pa11y-dashboard is a web interface to the [pa11y][pa11y] accessibility reporter; allowing you to focus on *fixing* issues rather than hunting them down.
**Current Version:** *1.2.3*
**Current Version:** *1.3.2*
**Build Status:** [![Build Status][travis-img]][travis]
**Node Version Support:** *0.10*

18
app.js
View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var createClient = require('pa11y-webservice-client-node');
@@ -49,6 +64,7 @@ function initApp (config, callback) {
// View helpers
require('./view/helper/date')(hbs.registerHelper);
require('./view/helper/string')(hbs.registerHelper);
require('./view/helper/url')(hbs.registerHelper);
// Populate view locals
@@ -79,6 +95,8 @@ function initApp (config, callback) {
require('./route/task/delete')(app);
require('./route/task/run')(app);
require('./route/task/edit')(app);
require('./route/task/ignore')(app);
require('./route/task/unignore')(app);
}
// Error handling

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* jshint maxlen: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var chalk = require('chalk');

View File

@@ -1,6 +1,6 @@
{
"name": "pa11y-dashboard",
"version": "1.2.3",
"version": "1.3.2",
"private": true,
"description": "pa11y-dashboard is a visual web interface to the pa11y accessibility reporter",
@@ -25,7 +25,7 @@
"express": "~3.4",
"express-hbs": "~0.2",
"moment": "~2.2",
"pa11y-webservice": "~1.3",
"pa11y-webservice": "~1.4",
"pa11y-webservice-client-node": "~1.1",
"underscore": "~1.5"
},

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
$(document).ready(function(){
var data = {};
@@ -187,9 +202,9 @@ $(document).ready(function(){
'</li>'
);
});
choiceContainer.find('input').click(plotAccordingToChoices);
function plotAccordingToChoices() {
var data = [];
choiceContainer.find('input:checked').each(function () {
@@ -198,7 +213,7 @@ $(document).ready(function(){
data.push(datasets[key]);
}
});
if (data.length > -1) {
$.plot(graphContainer, data, graphOptions);
}
@@ -230,4 +245,45 @@ $(document).ready(function(){
previousPoint = null;
}
});
});
// Task filter
function initTaskFilter (container) {
var tasks = initTaskFilterTasks(container);
var input = initTaskFilterInput(container, tasks);
}
function initTaskFilterTasks (container) {
var tasks = container.find('[data-role=task]');
return tasks;
}
function initTaskFilterInput (container, tasks) {
var input = container.find('[data-role=input]');
input.on('keyup', function () {
filterTasks(tasks, input.val());
});
return input;
}
function filterTasks (tasks, query) {
query = $.trim(query.replace(/[^a-z0-9\s]+/gi, ''));
tasks.removeClass('hidden');
if (/^\s*$/.test(query)) {
return;
}
var queryRegExp = new RegExp('(' + query.replace(/\s+/gi, '|') + ')', 'i');
tasks.filter(function () {
return !queryRegExp.test($(this).data('keywords'));
}).addClass('hidden');
}
var taskLists = $('[data-control=task-list]');
if (taskLists.length > 0) {
$('[data-control=task-list]').each(function () {
initTaskFilter($(this));
});
}
});

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
// Making up for the non support of IE8 and IE7 in Bootstrap 3
.ie7, .ie8 {
.legend {
@@ -17,7 +32,7 @@
font-size:85%;
}
.task-card-link {
min-height:190px;
min-height:160px;
}
.series-checkboxes li {
margin-right:1%;
@@ -37,15 +52,26 @@
.date-selector .btn-full-width {
width:90%;
}
.filter-toggle {
&:before {
height:110%;
width:100%;
left:0;
top:0;
}
input {
width:92%;
}
.filter-trigger {
padding-bottom:0;
}
}
}
.ie7 {
.aside .task-stats li {
width:31.5%;
}
.date-selector {
zoom:1;
}
.zfix {
position:relative;
z-index:1001;
@@ -59,7 +85,7 @@
padding-bottom:90px;
}
.date-selector {
margin-top:-155px;
zoom:1;
.btn-full-width {
width:100%;
@@ -80,4 +106,23 @@
.run-details .pull-right.dropdown-menu {
right:82px;
}
.tasks-list li {
padding-right:105px;
}
.filter-toggle {
width:30%;
margin:0 35%;
margin-top:-10px;
background-color:lighten(@gray-lighter, 4%);
padding-bottom:10px;
.glyphicon {
display:none;
}
input {
width:80%;
margin-left:-25%;
}
}
}

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* No javascript */
.no-javascript {
.graph-container, .expander {
@@ -26,4 +41,7 @@
.show-class {
display:block;
}
}
.no-js-hide {
display: none;
}
}

View File

@@ -1,9 +1,19 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* Media queries */
@media (max-width:1199px) {
.task-card .task-card-link {
min-height:215px;
}
}
@media (max-width:991px) {
.h1, h1 {
font-size:floor(@font-size-base * 2.15); // ~32px;
@@ -11,9 +21,6 @@
.h2, h2 {
font-size:floor(@font-size-base * 1.9); // ~28px;
}
.task-card .task-card-link {
min-height:200px;
}
.task-header .h4 {
font-size:floor(@font-size-base * 1.15); // ~17px;
}
@@ -40,6 +47,9 @@
.btn-full-width {
margin-bottom:0;
}
.task-card .task-stats {
margin-bottom:10px;
}
.action-buttons {
margin-bottom:20px;
}
@@ -88,6 +98,9 @@
text-align:left;
}
}
.task-card .task-card-link {
min-height:0;
}
}
@media (max-width:640px) {
body {

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* Site specific styling */
/* Helper Classes */
@@ -179,7 +194,7 @@
}
.task-card-link {
color:@gray-dark;
min-height:200px;
min-height:190px;
display:block;
transition: background 0.5s;
-webkit-transition: background 0.5s;
@@ -216,8 +231,6 @@
/* Badges */
.badge {
border-radius:0.25em;
}
.badge {
display:inline-block;
padding:10px;
font-size:ceil(@font-size-base * 0.85); // ~13px;
@@ -256,10 +269,27 @@
li {
margin-bottom:20px;
padding-right:90px;
position:relative;
&:last-child {
margin-bottom:0;
}
form {
display:none;
position:absolute;
right:0;
top:0;
&:hover .btn {
color:@brand-primary;
}
}
&:hover form {
display:block;
}
}
.rule-name {
@@ -267,6 +297,7 @@
font-style:italic;
word-wrap:break-word;
}
}
.task-danger {
border-color:@brand-danger;
@@ -416,3 +447,34 @@ ul.date-links {
}
}
}
.filter-toggle {
top:-20px;
margin-top:-10px;
font-size:18px;
font-weight:bold;
.filter-trigger {
padding-bottom:20px;
cursor: pointer;
.glyphicon {
display:block;
margin:0 auto;
}
}
&:before {
position:absolute;
content:"";
height:90px;
width:90px;
left:50%;
top:-45px;
background-color:lighten(@gray-lighter, 4%);
transform: translateX(-50%) rotate(45deg);
-ms-transform: translateX(-50%) rotate(45deg);
-webkit-transform: translateX(-50%) rotate(45deg);
z-index:-1;
}
}

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var presentTask = require('../view/presenter/task');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var getStandards = require('../data/standards');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var moment = require('moment');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var presentTask = require('../../view/presenter/task');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var _ = require('underscore');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var _ = require('underscore');

30
route/task/ignore.js Normal file
View File

@@ -0,0 +1,30 @@
'use strict';
var _ = require('underscore');
var presentTask = require('../../view/presenter/task');
var getStandards = require('../../data/standards');
module.exports = route;
// Route definition
function route (app) {
app.express.post('/:id/ignore', function (req, res, next) {
app.webservice.task(req.params.id).get({}, function (err, task) {
if (err) {
return next();
}
var edit = {
name: task.name,
ignore: task.ignore
};
if (typeof req.body.rule === 'string') {
edit.ignore.push(req.body.rule);
}
app.webservice.task(req.params.id).edit(edit, function () {
res.redirect('/' + req.params.id + '?rule-ignored');
});
});
});
}

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var presentTask = require('../../view/presenter/task');
@@ -25,6 +40,8 @@ function route (app) {
mainResult: task.lastResult || null,
added: (typeof req.query.added !== 'undefined'),
running: (typeof req.query.running !== 'undefined'),
ruleIgnored: (typeof req.query['rule-ignored'] !== 'undefined'),
ruleUnignored: (typeof req.query['rule-unignored'] !== 'undefined'),
hasOneResult: (presentedResults.length < 2),
isTaskPage: true
});

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
module.exports = route;

31
route/task/unignore.js Normal file
View File

@@ -0,0 +1,31 @@
'use strict';
var _ = require('underscore');
var presentTask = require('../../view/presenter/task');
var getStandards = require('../../data/standards');
module.exports = route;
// Route definition
function route (app) {
app.express.post('/:id/unignore', function (req, res, next) {
app.webservice.task(req.params.id).get({}, function (err, task) {
if (err) {
return next();
}
var edit = {
name: task.name,
ignore: task.ignore
};
var indexOfRule = edit.ignore.indexOf(req.body.rule);
if (typeof req.body.rule === 'string' && indexOfRule !== -1) {
edit.ignore.splice(indexOfRule, 1);
}
app.webservice.task(req.params.id).edit(edit, function () {
res.redirect('/' + req.params.id + '?rule-unignored');
});
});
});
}

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var jsdom = require('jsdom');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var createClient = require('pa11y-webservice-client-node');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global beforeEach, describe, it */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
/* global afterEach, before */
/* jshint maxlen: false, maxstatements: false */
'use strict';

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-8">
<h1>Hmmm, this page indicates a 404 error.</h1>
<p class="h2">That is techy babble for "We couldn't find the page you were looking for".</h2>

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-8">
<h1>Eeek! 500 error. This is serious.</h1>
<p class="h2">There isn't much you can do about this.</h2>

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var moment = require('moment');

12
view/helper/string.js Normal file
View File

@@ -0,0 +1,12 @@
'use strict';
module.exports = helper;
function helper (register) {
// Convert a string to lower-case
register('lowercase', function (context) {
return context.toLowerCase();
});
}

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
module.exports = helper;
@@ -6,7 +21,7 @@ function helper (register) {
// Simplify url by removing (eg http://, https://, trailing slashes) from url
register('simplify-url', function (context) {
return context.replace(/^https?:\/\//i, '').replace(/\/$/, '');
return context.replace(/^https?:\/\//i, '').replace(/\/$/, '').toLowerCase();
});
}

View File

@@ -1,22 +1,52 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}pa11y-dashboard{{/content}}
{{#if siteMessage}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-info site-message">
<h3 class="crunch-top"><span class="pull-left glyphicon glyphicon-exclamation-sign"></span> Important</h3>
<p class="h5">{{siteMessage}}</p>
</div>
</div>
{{/if}}
<div data-control="task-list">
{{#deleted}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-info">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<strong>Bye Bye URL</strong>
<p>The URL you selected and its associated results have been deleted.</p>
</div>
<div class="clearfix">
<div class="col-md-6 col-md-offset-3 filter-toggle no-js-hide text-center">
<label for="filter-input" class="filter-trigger" data-toggle="collapse" data-target="#filter-input">Filter<span class="glyphicon glyphicon-filter"></span>
</label>
<div id="filter-input" class="collapse">
<input class="form-control" id="task-filter" type="text" data-role="input" placeholder="Type filter term (name or standard)"/>
</div>
</div>
{{/deleted}}
</div>
{{> tasks}}
{{#if siteMessage}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-info site-message">
<h3 class="crunch-top"><span class="pull-left glyphicon glyphicon-exclamation-sign"></span> Important</h3>
<p class="h5">{{siteMessage}}</p>
</div>
</div>
{{/if}}
{{#deleted}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-info">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<strong>Bye Bye URL</strong>
<p>The URL you selected and its associated results have been deleted.</p>
</div>
</div>
{{/deleted}}
{{> tasks}}
</div>

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<!DOCTYPE html>
<html lang="{{lang}}" class="no-javascript">
<head>

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}
Add a new URL

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#unless isHomePage}}
<div class="container">
<div class="row">

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-12 clearfix">
<div class="graph-container graph-spacer ruled">
<div data-role="graph" class="graph"></div>

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<footer>
<div class="footer" role="contentinfo">
<div class="container">

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<header>
<div role="banner" class="header">
<div class="container">

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-12">
<div class="ruled task-header">
<div class="row clearfix">

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-12 zfix">
<div class="row">
<div class="col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3">

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-3 aside">
<div class="row">
<div id="top" class="col-md-12 col-sm-6 col-xs-12">
@@ -47,6 +63,14 @@
<li>
<p class="crunch rule-name">{{code}} <span class="badge">{{count}}</span></p>
<p>{{message}}</p>
{{#unless readonly}}
{{#if ../../isTaskPage}}
<form action="{{../../../task.hrefIgnore}}" method="post">
<input type="hidden" name="rule" value="{{code}}"/>
<input type="submit" class="btn btn-sm" value="Ignore rule"/>
</form>
{{/if}}
{{/unless}}
</li>
{{/mainResult.errors}}
</ul>
@@ -67,6 +91,14 @@
<li>
<p class="crunch rule-name">{{code}} <span class="badge">{{count}}</span></p>
<p>{{message}}</p>
{{#unless readonly}}
{{#if ../../isTaskPage}}
<form action="{{../../../task.hrefIgnore}}" method="post">
<input type="hidden" name="rule" value="{{code}}"/>
<input type="submit" class="btn btn-sm" value="Ignore rule"/>
</form>
{{/if}}
{{/unless}}
</li>
{{/mainResult.warnings}}
</ul>
@@ -88,6 +120,14 @@
<li>
<p class="crunch rule-name">{{code}} <span class="badge">{{count}}</span></p>
<p>{{message}}</p>
{{#unless readonly}}
{{#if ../../isTaskPage}}
<form action="{{../../../task.hrefIgnore}}" method="post">
<input type="hidden" name="rule" value="{{code}}"/>
<input type="submit" class="btn btn-sm" value="Ignore rule"/>
</form>
{{/if}}
{{/unless}}
</li>
{{/mainResult.notices}}
</ul>
@@ -97,21 +137,29 @@
<p class="heading label-info" id="notices">Well done! You have 0 notices. <span class="glyphicon glyphicon-ok pull-right"></span></p>
{{/if}}
{{#if task.ignore.length}}
{{#if mainResult.ignore.length}}
<div class="heading label-default">
<span data-role="expander" class="pull-right expander"> + </span>
Ignored Rules ( {{task.ignore.length}} )
Ignored Rules ( {{mainResult.ignore.length}} )
</div>
<div class="task-default tasks-list collapse clearfix">
<ul class="list-unstyled">
{{#task.ignore}}
{{#mainResult.ignore}}
<li>
<p class="crunch rule-name">{{name}}</p>
{{#if description}}
<p>{{description}}</p>
{{/if}}
{{#unless readonly}}
{{#if ../../isTaskPage}}
<form action="{{../../../task.hrefUnignore}}" method="post">
<input type="hidden" name="rule" value="{{name}}"/>
<input type="submit" class="btn btn-sm" value="Unignore rule"/>
</form>
{{/if}}
{{/unless}}
</li>
{{/task.ignore}}
{{/mainResult.ignore}}
</ul>
<a class="pull-right" href="#top" data-role="top">Back to top</a>
</div>

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<div class="col-md-12 zfix">
<div class="ruled task-header">
<div class="row clearfix">

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
<ul class="list-unstyled clearfix crunch-bottom">
<li class="col-md-4 col-sm-6 task-card add-task">
@@ -14,7 +30,7 @@
{{/if}}
</li>
{{#each tasks}}
<li class="col-md-4 col-sm-6 task-card" data-test="task">
<li class="col-md-4 col-sm-6 task-card" data-test="task" data-role="task" data-keywords="{{lowercase name}} {{lowercase standard}} {{simplify-url url}}">
<a class="well task-card-link crunch-bottom" title="Details for URL {{simplify-url url}}" href="{{href}}">
<p class="h3">{{name}}</p>
<p class="h5">({{standard}})</p>
@@ -33,14 +49,14 @@
</a>
{{#unless ../readonly}}
<div class="btn-group options-button text-right">
<button type="button" class="btn btn-info btn-xs dropdown-toggle" data-toggle="dropdown"><span class="sr-only">Options</span><span class="glyphicon glyphicon-cog"></span></button>
<ul class="dropdown-menu pull-right" role="menu">
<li><a href="{{href}}/edit">Edit this task</a></li>
<button type="button" class="btn btn-info btn-xs dropdown-toggle" data-toggle="dropdown"><span class="sr-only">Options</span><span class="glyphicon glyphicon-cog"></span></button>
<ul class="dropdown-menu pull-right" role="menu">
<li><a href="{{href}}/edit">Edit this task</a></li>
<li><a href="{{href}}/delete">Delete this task</a></li>
<li class="divider"></li>
<li><a href="{{href}}/run" data-test="run-task">Run pa11y</a></li>
</ul>
</div>
</div>
{{/unless}}
</li>
{{/each}}

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var standardsArray = require('../../data/standards')();

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var _ = require('underscore');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var _ = require('underscore');

View File

@@ -1,3 +1,18 @@
// This file is part of pa11y-dashboard.
//
// pa11y-dashboard is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// pa11y-dashboard is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
'use strict';
var _ = require('underscore');
@@ -14,6 +29,8 @@ function presentTask (task) {
task.hrefRun = '/' + task.id + '/run';
task.hrefJson = '/' + task.id + '.json';
task.hrefEdit = '/' + task.id + '/edit';
task.hrefIgnore = '/' + task.id + '/ignore';
task.hrefUnignore = '/' + task.id + '/unignore';
// Enhance the ignored rules
task.ignore = presentIgnoreRules(task.ignore);

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}
{{task.name}} - {{simplify-url task.url}} ({{task.standard}}) - {{date-format mainResult.date format="DD MMM YYYY"}}

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}
Delete {{task.url}} ({{task.standard}})

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}
Edit URL

View File

@@ -1,3 +1,19 @@
{{!
This file is part of pa11y-dashboard.
pa11y-dashboard is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pa11y-dashboard is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pa11y-dashboard. If not, see <http://www.gnu.org/licenses/>.
}}
{{#content "title"}}
{{task.name}} - {{simplify-url task.url}} ({{task.standard}})
@@ -26,10 +42,36 @@
</div>
{{/running}}
{{#ruleIgnored}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-success">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<strong>Rule ignored!</strong>
<p>
You've ignored an accessibility rule for this URL.
<a href="{{task.hrefRun}}">Click here to generate results with the ignored rule excluded</a>
</p>
</div>
</div>
{{/ruleIgnored}}
{{#ruleUnignored}}
<div class="col-md-12 clearfix" data-test="alert">
<div class="alert alert-success">
<button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
<strong>Rule unignored!</strong>
<p>
You've removed an ignored accessibility rule for this URL.
<a href="{{task.hrefRun}}">Click here to generate results with the ignored rule included again</a>
</p>
</div>
</div>
{{/ruleUnignored}}
{{> task-header}}
{{#if results}}
{{#unless hasOneResult}}
{{> graph}}
{{/unless}}
@@ -48,4 +90,4 @@
<p><a href="{{task.hrefRun}}">Click here to generate results for this URL</a>.</p>
</div>
</div>
{{/if}}
{{/if}}