[Trac-tickets] [The Trac Project] #1752: Keyboard shortcut for
Edit/Preview buttons
The Trac Project
noreply at edgewall.com
Mon Jul 4 08:32:11 CDT 2005
#1752: Keyboard shortcut for Edit/Preview buttons
-------------------------+--------------------------------------------------
Id: 1752 | Status: new
Component: wiki | Modified: Mon Jul 4 08:31:30 2005
Severity: enhancement | Milestone:
Priority: normal | Version: none
Owner: jonas | Reporter: Shun-ichi Goto <gotoh at taiyo.co.jp>
-------------------------+--------------------------------------------------
I'm using modified template file with adding keyboard shortcut via
'accesskey' attribute
for 'Edit' button and 'Preview' button they are frequently used.
I assigned 'r' key (ALT-R on windows) for 'Preview',
and 'e' key (ALT-E on windows) for 'Edit'.[[BR]]
## Other buttons are not assinged because of avoid submitting by miss
operation.
I think this is usefull for daily trac operation.
{{{
Index: newticket.cs
===================================================================
--- newticket.cs (revision 1886)
+++ newticket.cs (working copy)
@@ -95,7 +95,7 @@
var:htdocs_location ?>js/wikitoolbar.js"></script>
<div class="buttons">
- <input type="submit" name="preview" value="Preview" />
+ <input type="submit" name="preview" value="Preview" accesskey="r"
/>
<input type="submit" value="Submit ticket" />
</div>
</form>
Index: ticket.cs
===================================================================
--- ticket.cs (revision 1886)
+++ ticket.cs (working copy)
@@ -287,7 +287,7 @@
var:htdocs_location ?>js/wikitoolbar.js"></script>
<div class="buttons">
- <input type="submit" name="preview" value="Preview" />
+ <input type="submit" name="preview" value="Preview" accesskey="r"
/>
<input type="submit" value="Submit changes" />
</div>
</form>
Index: wiki.cs
===================================================================
--- wiki.cs (revision 1886)
+++ wiki.cs (working copy)
@@ -227,7 +227,7 @@
<?cs /if ?>
</fieldset>
<div class="buttons">
- <input type="submit" name="preview" value="Preview" />
+ <input type="submit" name="preview" value="Preview" accesskey="r"
/>
<input type="submit" name="save" value="Submit changes" />
<input type="submit" name="cancel" value="Cancel" />
</div>
@@ -257,7 +257,7 @@
if:trac.acl.WIKI_MODIFY ?>
<form method="get" action="<?cs var:wiki.current_href ?>"><div>
<input type="hidden" name="action" value="edit" />
- <input type="submit" value="<?cs if:wiki.exists ?>Edit<?cs else
?>Create<?cs /if ?> this page" />
+ <input type="submit" value="<?cs if:wiki.exists ?>Edit<?cs else
?>Create<?cs /if ?> this page" accesskey="e" />
</div></form><?cs
if:wiki.exists ?>
<form method="get" action="<?cs var:wiki.attach_href ?>"><div>
}}}
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/1752>
The Trac Project <>
More information about the Trac-Tickets
mailing list