-
Notifications
You must be signed in to change notification settings - Fork 27
/
ticket-hotkeys.js
44 lines (44 loc) · 1.1 KB
/
ticket-hotkeys.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$(document).bind(
'keydown',
'e',
function (evt){
$.post(
$("a.update-bug-link").attr("href"),
{ YII_CSRF_TOKEN :YII_CSRF_TOKEN },
function(data){
jQuery("#bugUpdateForm").html(data);
jQuery("#updateBugDialog").dialog("open");
jQuery(".chzn-select").chosen();
},
"html"
);
return false;
}
);
$(document).bind(
'keydown',
'c',
function (evt){
// if (confirm('Close this ticket?')){
window.location='/bug/setarchived/' + $("#archived-link").attr("ticket-id");
// }
return false;
}
);
$(document).bind(
'keydown',
'd',
function (evt){
if (confirm('Delete this ticket?')){
$.post(
'/bug/delete/' + $("#archived-link").attr("ticket-id"),
{YII_CSRF_TOKEN :YII_CSRF_TOKEN},
function(data){
window.location='/bug/';
},
"html"
);
}
return false;
}
);