From bfd811304601edbc3c17edc1259a1029c230726d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 24 Dec 2014 12:24:00 +0000 Subject: Adds p/n access keys for previous/next links (#18692). Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@13794 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/access_keys.rb | 4 +++- lib/redmine/pagination.rb | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/redmine/access_keys.rb b/lib/redmine/access_keys.rb index 82490d8e9..e261ed453 100644 --- a/lib/redmine/access_keys.rb +++ b/lib/redmine/access_keys.rb @@ -21,7 +21,9 @@ module Redmine :preview => 'r', :quick_search => 'f', :search => '4', - :new_issue => '7' + :new_issue => '7', + :previous => 'p', + :next => 'n' }.freeze unless const_defined?(:ACCESSKEYS) def self.key_for(action) diff --git a/lib/redmine/pagination.rb b/lib/redmine/pagination.rb index 018eed113..08ec22753 100644 --- a/lib/redmine/pagination.rb +++ b/lib/redmine/pagination.rb @@ -176,7 +176,8 @@ module Redmine if paginator.previous_page # \xc2\xab(utf-8) = « text = "\xc2\xab " + l(:label_previous) - html << yield(text, {page_param => paginator.previous_page}, :class => 'previous') + ' ' + html << yield(text, {page_param => paginator.previous_page}, + :class => 'previous', :accesskey => accesskey(:previous)) + ' ' end previous = nil @@ -196,7 +197,8 @@ module Redmine if paginator.next_page # \xc2\xbb(utf-8) = » text = l(:label_next) + " \xc2\xbb" - html << yield(text, {page_param => paginator.next_page}, :class => 'next') + ' ' + html << yield(text, {page_param => paginator.next_page}, + :class => 'next', :accesskey => accesskey(:next)) + ' ' end html << content_tag('span', "(#{paginator.first_item}-#{paginator.last_item}/#{paginator.item_count})", :class => 'items') + ' ' -- cgit v1.2.3