[Rt-commit] rt branch, 4.4/keyboard-shortcut-correspond, repushed
Craig Kaiser
craig at bestpractical.com
Tue May 8 12:08:35 EDT 2018
The branch 4.4/keyboard-shortcut-correspond was deleted and repushed:
was 4630b0f56b38651df6145b40d53593bb4e038750
now 52961517f4713e0884bdcc99afe67ceed406293c
1: 4630b0f56 ! 1: 52961517f Add keyboard shortcuts for reply and comment
@@ -40,7 +40,8 @@
+ <td class="key-column"><span class="keyboard-shortcuts-key">r</span></td>
+ <td><&|/l&>Reply To Current Ticket</&></td>
+ </tr>
-+% } if ( $show_ticket_comment ) {
++% }
++% if ( $show_ticket_comment ) {
+ <tr>
+ <td class="key-column"><span class="keyboard-shortcuts-key">c</span></td>
+ <td><&|/l&>Comment On Current Ticket</&></td>
@@ -86,32 +87,6 @@
--- a/share/static/js/keyboard-shortcuts.js
+++ b/share/static/js/keyboard-shortcuts.js
@@
- return false; // prevent '/' character from being typed in search box
- };
-
-+ var generateUpdateLink = function(ticketId, action) {
-+ if (!ticketId) return '';
-+ return RT.Config.WebHomePath + '/Ticket/Update.html?Action=' + action + '&id=' + ticketId;
-+ };
-+
-+ var replyToTicket = function() {
-+ var ticketId = jQuery('tr.id').children('td.value').text();
-+ var replyLink = generateUpdateLink(ticketId, 'Respond');
-+ if (!replyLink) return;
-+ window.location.href = replyLink;
-+ };
-+
-+ var commentOnTicket = function() {
-+ var ticketId = jQuery('tr.id').children('td.value').text();
-+ var commentLink = generateUpdateLink(ticketId, 'Comment');
-+ if (!commentLink) return;
-+ window.location.href = commentLink;
-+ };
-+
- var openHelp = function() {
- var modal = jQuery('.modal');
- if (modal.length) {
-@@
var is_search = jQuery('body#comp-Search-Results').length > 0;
var is_bulk_update = jQuery('body#comp-Search-Bulk').length > 0;
@@ -127,15 +102,6 @@
jQuery.ajax({
url: url,
-@@
- Mousetrap.bind('g h', goHome);
- Mousetrap.bind('/', simpleSearch);
- Mousetrap.bind('?', openHelp);
-+ Mousetrap.bind('r', replyToTicket);
-+ Mousetrap.bind('c', commentOnTicket);
- });
-
- jQuery(function() {
@@
Mousetrap.bind('x', toggleTicketCheckbox);
});
More information about the rt-commit
mailing list