Permalink
Browse files

Add @marcus-herrmann PR #1 which improves keyboard accessibility of P…

…rocessPageList, enabling use of spacebar to toggle actions open/closed.
  • Loading branch information...
ryancramerdesign committed Oct 5, 2016
1 parent ad5f795 commit 3267e6ad686696b3076c2b4679d71959d95058c4
View
@@ -48,7 +48,7 @@ of contributions in different repositories. Please review the instructions for e
## Pull Requests (PRs)
- Pull requests should be submitted to the [processwire](https://github.com/processwire/processwire/pulls)
repository.
repository, and based on the [dev branch](https://github.com/processwire/processwire/tree/dev).
- Before submitting a PR, read the Contributor License Agreement (CLA) at
<https://processwire.com/about/license/cla/> and indicate your agreement (electronic signature)
@@ -63,8 +63,6 @@ of contributions in different repositories. Please review the instructions for e
before submitting a PR. While it's not required that you adhere to the style guide, it does increase
the odds that we may be able to directly merge your PR.
- Please base pull requests off of the latest ProcessWire 3.x development (dev) branch.
- Please only submit code that you feel confident is stable and you have thoroughly tested.
Verbose code comments are also appreciated when possible.
@@ -203,6 +203,21 @@ $(document).ready(function() {
});
}
}
$(document).on('keydown', '.PageListItem', function(e) {
// PR#1 makes page-list keyboard accessible
e = e || window.event;
if(e.keyCode == 0 || e.keyCode == 32) {
// spacebar
var $actions = $(this).find('.PageListActions');
if($actions.is(":visible")) {
$actions.css('display', 'none');
} else {
$actions.css('display', 'inline-block');
}
return false;
}
});
$(document).on('mouseover', '.PageListItem', function(e) {
Oops, something went wrong.

0 comments on commit 3267e6a

Please sign in to comment.