add shortcut key to open the modify/comment section
This commit is contained in:
parent
0a3718026e
commit
9d99c5e9aa
|
@ -177,6 +177,19 @@ $(function() {
|
|||
}
|
||||
});
|
||||
|
||||
// global keyboard shortcuts
|
||||
$(document).on('keypress', function(ev) {
|
||||
var element = ev.target;
|
||||
if (element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable) {
|
||||
return true; // let it handle
|
||||
}
|
||||
if (ev.key == 'm') {
|
||||
// m: open modify/comment section
|
||||
$('.contextual .icon-edit').last().trigger('click');
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
function handle_jobs(jobs) {
|
||||
$(jobs).each(function(idx, job) {
|
||||
if (job.name.indexOf('wip%2F' + issue_no) == 0) {
|
||||
|
|
Loading…
Reference in New Issue