Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #400 from markhop/shortcut_keys

Shortcut keys
  • Loading branch information...
commit cc4d8816454cc7c9d3a1ba1654aace97e0b4d86f 2 parents 6e1b19b + e8651e8
@amolenaar amolenaar authored
View
4 FitNesseRoot/FitNesse/UserGuide/ShortcutKeys/content.txt
@@ -4,3 +4,7 @@ Some of the buttons on the wiki page have shortcut keys. These may or may not w
|'''Test'''|''ALT-t''|
|'''Search'''|''ALT-s''|
|'''Versions'''|''ALT-v''|
+
+Due to the above shortcut keys not working on most browsers a set of more modern shortcut keys have been provided. Pressing ? on any normal wiki page (not the edit page, etc.) will bring up a modal dialog showing the standard set of shortcut keys.
+
+!img http://files/fitnesse/images/keyboard_shortcuts.png
View
1  FitNesseRoot/FitNesse/UserGuide/ShortcutKeys/properties.xml
@@ -1,7 +1,6 @@
<?xml version="1.0"?>
<properties>
<Files/>
- <LastModified>20090228113824</LastModified>
<Properties/>
<RecentChanges>true</RecentChanges>
<Search/>
View
1  src/fitnesse/resources/bootstrap/templates/skeleton.vm
@@ -20,6 +20,7 @@
<link rel="stylesheet" type="text/css" href="/files/fitnesse/css/fitnesse_pages.css" />
<link rel="stylesheet" type="text/css" href="/files/fitnesse/wysiwyg/wysiwyg.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/files/fitnesse/bootstrap/css/fitnesse-bootstrap.css">
+ <link rel="stylesheet" type="text/css" href="/files/fitnesse/question.mark/question.mark.css" />
<link rel="wysiwyg.base" href="/" />
<link rel="wysiwyg.stylesheet" type="text/css" href="/files/fitnesse/css/fitnesse.css" media="screen" />
View
2  src/fitnesse/resources/bootstrap/templates/wikiNav.vm
@@ -2,6 +2,6 @@
<form class="navbar-form navbar-right" role="search" action="?search">
<input type="hidden" name="responder" value="search" />
- <input type="text" name="searchString" class="form-control" placeholder="Search page" />
+ <input type="text" id="searchString" name="searchString" class="form-control" placeholder="Search page" />
<input type="hidden" name="searchType" value="Search Titles" />
</form>
View
BIN  src/fitnesse/resources/images/keyboard_shortcuts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 src/fitnesse/resources/javascript/mousetrap.min.js
@@ -0,0 +1,9 @@
+/* mousetrap v1.4.6 craig.is/killing/mice */
+(function(J,r,f){function s(a,b,d){a.addEventListener?a.addEventListener(b,d,!1):a.attachEvent("on"+b,d)}function A(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return h[a.which]?h[a.which]:B[a.which]?B[a.which]:String.fromCharCode(a.which).toLowerCase()}function t(a){a=a||{};var b=!1,d;for(d in n)a[d]?b=!0:n[d]=0;b||(u=!1)}function C(a,b,d,c,e,v){var g,k,f=[],h=d.type;if(!l[a])return[];"keyup"==h&&w(a)&&(b=[a]);for(g=0;g<l[a].length;++g)if(k=
+l[a][g],!(!c&&k.seq&&n[k.seq]!=k.level||h!=k.action||("keypress"!=h||d.metaKey||d.ctrlKey)&&b.sort().join(",")!==k.modifiers.sort().join(","))){var m=c&&k.seq==c&&k.level==v;(!c&&k.combo==e||m)&&l[a].splice(g,1);f.push(k)}return f}function K(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function x(a,b,d,c){m.stopCallback(b,b.target||b.srcElement,d,c)||!1!==a(b,d)||(b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopPropagation?
+b.stopPropagation():b.cancelBubble=!0)}function y(a){"number"!==typeof a.which&&(a.which=a.keyCode);var b=A(a);b&&("keyup"==a.type&&z===b?z=!1:m.handleKey(b,K(a),a))}function w(a){return"shift"==a||"ctrl"==a||"alt"==a||"meta"==a}function L(a,b,d,c){function e(b){return function(){u=b;++n[a];clearTimeout(D);D=setTimeout(t,1E3)}}function v(b){x(d,b,a);"keyup"!==c&&(z=A(b));setTimeout(t,10)}for(var g=n[a]=0;g<b.length;++g){var f=g+1===b.length?v:e(c||E(b[g+1]).action);F(b[g],f,c,a,g)}}function E(a,b){var d,
+c,e,f=[];d="+"===a?["+"]:a.split("+");for(e=0;e<d.length;++e)c=d[e],G[c]&&(c=G[c]),b&&"keypress"!=b&&H[c]&&(c=H[c],f.push("shift")),w(c)&&f.push(c);d=c;e=b;if(!e){if(!p){p={};for(var g in h)95<g&&112>g||h.hasOwnProperty(g)&&(p[h[g]]=g)}e=p[d]?"keydown":"keypress"}"keypress"==e&&f.length&&(e="keydown");return{key:c,modifiers:f,action:e}}function F(a,b,d,c,e){q[a+":"+d]=b;a=a.replace(/\s+/g," ");var f=a.split(" ");1<f.length?L(a,f,b,d):(d=E(a,d),l[d.key]=l[d.key]||[],C(d.key,d.modifiers,{type:d.action},
+c,a,e),l[d.key][c?"unshift":"push"]({callback:b,modifiers:d.modifiers,action:d.action,seq:c,level:e,combo:a}))}var h={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},B={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},H={"~":"`","!":"1",
+"@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},G={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p,l={},q={},n={},D,z=!1,I=!1,u=!1;for(f=1;20>f;++f)h[111+f]="f"+f;for(f=0;9>=f;++f)h[f+96]=f;s(r,"keypress",y);s(r,"keydown",y);s(r,"keyup",y);var m={bind:function(a,b,d){a=a instanceof Array?a:[a];for(var c=0;c<a.length;++c)F(a[c],b,d);return this},
+unbind:function(a,b){return m.bind(a,function(){},b)},trigger:function(a,b){if(q[a+":"+b])q[a+":"+b]({},a);return this},reset:function(){l={};q={};return this},stopCallback:function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable},handleKey:function(a,b,d){var c=C(a,b,d),e;b={};var f=0,g=!1;for(e=0;e<c.length;++e)c[e].seq&&(f=Math.max(f,c[e].level));for(e=0;e<c.length;++e)c[e].seq?c[e].level==f&&(g=!0,
+b[c[e].seq]=1,x(c[e].callback,d,c[e].combo,c[e].seq)):g||x(c[e].callback,d,c[e].combo);c="keypress"==d.type&&I;d.type!=u||w(a)||c||t(b);I=g&&"keydown"==d.type}};J.Mousetrap=m;"function"===typeof define&&define.amd&&define(m)})(window,document);
View
155 src/fitnesse/resources/question.mark/question.mark.css
@@ -0,0 +1,155 @@
+.help-underlay * {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.help-underlay {
+ position: absolute;
+ background: #555;
+ background: rgba(0,0,0,0.5);
+ visibility: hidden;
+ opacity: 0;
+ -webkit-transition: opacity .2s linear;
+ -moz-transition: opacity .2s linear;
+ -o-transition: opacity .2s linear;
+ transition: opacity .2s linear;
+ left: 0; right: 0; top: 0; bottom: 0;
+}
+
+.ie8 .help-underlay {
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=95)"; /* for IE8 in IE7 mode */
+ filter: alpha(opacity=95); /* for IE8 */
+ visibility: hidden;
+}
+
+.help-modal {
+ position: fixed;
+ z-index: 99999;
+ left: 0; right: 0; top: 0; bottom: 0;
+ width: 80%;
+ margin: auto;
+ background: #fff;
+ color: #676767;
+ max-height: 80%;
+ overflow: auto;
+ font-family: Arial, sans-serif;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-box-shadow: 0 4px 12px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.5);
+ box-shadow: 0 4px 12px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.5);
+ -webkit-transition: width .2s linear;
+ -moz-transition: width .2s linear;
+ -o-transition: width .2s linear;
+ transition: width .2s linear;
+}
+
+ .help-modal-content {
+ padding: 0 20px;
+ }
+
+ .help-close {
+ position: absolute;
+ top: .4em;
+ right: .5em;
+ font-size: 1.8em;
+ cursor: pointer;
+ -webkit-transition: color .2s linear;
+ -moz-transition: color .2s linear;
+ -o-transition: color .2s linear;
+ transition: color .2s linear;
+ }
+
+ .help-close:hover {
+ color: #000;
+ }
+
+.help-modal h1 {
+ text-align: center;
+ margin: .5em;
+ font-size: 1.5em;
+ padding-bottom: .4em;
+ border-bottom: solid 2px #ccc;
+ font-weight: normal;
+}
+
+ .help-modal h1 .help-key {
+ float: none;
+ line-height: 1.5;
+ position: relative;
+ bottom: 4px;
+ }
+
+.help-isVisible {
+ opacity: 1;
+ visibility: visible;
+ height: auto;
+ z-index: 8888;
+}
+
+.ie8 .help-underlay.help-isVisible {
+ visibility: visible;
+}
+
+.help-list-wrap {
+ overflow: hidden;
+ margin: 0 auto;
+ -webkit-transition: width .2s linear;
+ -moz-transition: width .2s linear;
+ -o-transition: width .2s linear;
+ transition: width .2s linear;
+}
+
+.help-list {
+ list-style: none;
+ margin: 0;
+ padding: 0 0 10px 0;
+ overflow: hidden;
+ float: left;
+ width: 280px;
+}
+
+ .help-list li {
+ margin-right: 40px;
+ }
+
+.help-key-unit {
+ line-height: 1.8;
+ margin-right: 2em;
+ padding: 5px 0;
+}
+
+.help-key {
+ min-width: 60px;
+ float: left;
+ clear: left;
+ position: relative;
+ bottom: 2px;
+}
+
+.help-key span {
+ font-size: 15px;
+ color: #555;
+ display: inline-block;
+ padding: 0 8px;
+ text-align: center;
+ background-color: #eee;
+ background-repeat: repeat-x;
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#eee));
+ background-image: -webkit-linear-gradient(#f5f5f5 0%, #eee 100%);
+ background-image: -moz-linear-gradient(#f5f5f5 0%, #eee 100%);
+ background-image: -o-linear-gradient(#f5f5f5 0%, #eee 100%);
+ background-image: linear-gradient(#f5f5f5 0%, #eee 100%);
+ border: 1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 #ccc;
+ box-shadow: inset 0 1px 0 #fff, 0 1px 0 #ccc;
+}
+
+.help-key-def {
+ display: inline-block;
+ margin-left: 1em;
+}
View
59 src/fitnesse/resources/question.mark/question.mark.html
@@ -0,0 +1,59 @@
+<div id="helpUnderlay" class="help-underlay">
+ <div id="helpModal" class="help-modal">
+ <h1>Keyboard Shortcuts <kbd class="help-key"><span>?</span></kbd></h1>
+ <div id="helpClose" class="help-close">&times;</div><!-- .help-close -->
+
+ <div id="helpModalContent" class="help-modal-content">
+
+ <div id="helpListWrap" class="help-list-wrap">
+
+ <!--
+ Each <ul> below creates a column, as long as each has a class of
+ "help-list". Each <li> is a single key/definition pair.
+ The extra nested <span> is to help keep the definitions lined up
+ vertically, for aesthetic reasons.
+ If you hate the extra <span>, just remove it from each key/def pair.
+ -->
+
+ <ul class="help-list">
+
+ <li class="help-key-unit">
+ <kbd class="help-key"><span>t</span></kbd>
+ <span class="help-key-def">Test</span>
+ </li>
+ <li class="help-key-unit">
+ <kbd class="help-key"><span>e</span></kbd>
+ <span class="help-key-def">Edit page</span>
+ </li>
+ <li class="help-key-unit">
+ <kbd class="help-key"><span>a</span></kbd>
+ <span class="help-key-def">Add new page</span>
+ </li>
+ <li class="help-key-unit">
+ <kbd class="help-key"><span>p</span></kbd>
+ <span class="help-key-def">Properties</span>
+ </li>
+ <li class="help-key-unit">
+ <kbd class="help-key"><span>w</span></kbd>
+ <span class="help-key-def">Where used?</span>
+ </li>
+ <li class="help-key-unit">
+ <kbd class="help-key"><span>/</span></kbd>
+ <span class="help-key-def">Focus on search bar</span>
+ </li>
+ <li class="help-key-unit">
+ <kbd class="help-key"><span>s</span></kbd>
+ <span class="help-key-def">Open search page</span>
+ </li>
+ <li class="help-key-unit">
+ <kbd class="help-key"><span>g</span> <span>u</span></kbd>
+ <span class="help-key-def">Go to User Guide</span>
+ </li>
+
+ </ul><!-- .help-list -->
+
+ </div><!-- .help-list-wrap -->
+
+ </div><!-- .help-modal-content -->
+ </div><!-- .help-modal -->
+</div><!-- .help-underlay -->
View
218 src/fitnesse/resources/question.mark/question.mark.js
@@ -0,0 +1,218 @@
+/*
+ QuestionMark.js by Louis Lazaris
+ http://impressivewebs.github.io/QuestionMark.js/
+ License: http://creativecommons.org/licenses/by/2.0/, no credit needed.
+ This script should work everywhere, including IE8+.
+ If you want IE8 support, include the following
+ polyfill for addEventListener() at the top:
+ https://gist.github.com/jonathantneal/2415137
+ (included in the repo as attachevent.js).
+ Doesn't work in IE6/7, but feel free to fork and fix.
+ Included and adjusted for FitNesse by Mark Hopkins.
+*/
+
+$(function() {
+
+ 'use strict';
+
+ function removeModal(helpUnderlay) {
+ helpUnderlay.className = helpUnderlay.className.replace(/help-isVisible*/g, '');
+ helpUnderlay.className = helpUnderlay.className.trim();
+ }
+
+ function getWindowWidth() {
+ var w = window,
+ d = document,
+ e = d.documentElement,
+ g = d.getElementsByTagName('body')[0],
+ x = w.innerWidth || e.clientWidth || g.clientWidth;
+ //var y = w.innerHeight || e.clientHeight || g.clientHeight;
+ return x;
+ }
+
+ function doUnderlayHeight() {
+ var D = document;
+ return Math.max(
+ D.body.scrollHeight, D.documentElement.scrollHeight,
+ D.body.offsetHeight, D.documentElement.offsetHeight,
+ D.body.clientHeight, D.documentElement.clientHeight
+ );
+ }
+
+ function doModalSize(o) {
+ // Find out how many columns there are, create array of heights
+ o.helpColsTotal = 0;
+ for (o.i = 0; o.i < o.helpLists.length; o.i += 1) {
+ if (o.helpLists[o.i].className.indexOf('help-list') !== -1) {
+ o.helpColsTotal += 1;
+ }
+ o.helpListsHeights[o.i] = o.helpLists[o.i].offsetHeight;
+ }
+
+ // get the tallest column from the array of heights
+ o.maxHeight = Math.max.apply(Math, o.helpListsHeights);
+
+ // Quasi-responsive
+ if (getWindowWidth() <= 1180 && getWindowWidth() > 630 && o.helpColsTotal > 2) {
+ o.helpColsTotal = 2;
+ o.maxHeight = o.maxHeight * o.helpColsTotal;
+ }
+
+ if (getWindowWidth() <= 630) {
+ o.maxHeight = o.maxHeight * o.helpColsTotal;
+ o.helpColsTotal = 1;
+ }
+
+ // Change the width/height of the modal and wrapper to fit the columns
+ // Sorry for the magic numbers. Whatevs.
+ o.helpListWrap.style.offsetWidth = (o.helpList.offsetWidth * o.helpColsTotal) + 'px';
+ o.helpListWrap.style.height = o.maxHeight + 'px';
+ o.helpModal.style.width = (o.helpList.offsetWidth * o.helpColsTotal) + 60 + 'px';
+ o.helpModal.style.height = o.maxHeight + 100 + 'px';
+ }
+
+ function doWhichKey(e) {
+ e = e || window.event;
+ var charCode = e.keyCode || e.which;
+ //Line below not needed, but you can read the key with it
+ //var charStr = String.fromCharCode(charCode);
+ return charCode;
+ }
+
+ // Primary function, called in checkServerResponse()
+ function doQuestionMark() {
+
+ var helpUnderlay = document.getElementById('helpUnderlay'),
+ helpModal = document.getElementById('helpModal'),
+ helpClose = document.getElementById('helpClose'),
+ timeOut = null,
+ objDoSize = {
+ i: null,
+ maxHeight: null,
+ helpListWrap: document.getElementById('helpListWrap'),
+ helpList: document.querySelector('.help-list'),
+ helpLists: document.querySelectorAll('.help-list'),
+ helpModal: helpModal,
+ helpColsTotal: null,
+ helpListsHeights: []
+ },
+ classCol;
+
+ doModalSize(objDoSize);
+
+ document.addEventListener('keypress', function(e) {
+
+ // 63 = '?' key
+ // '?' key toggles the modal
+ if (doWhichKey(e) === 63) {
+ classCol = document.getElementById('helpUnderlay').className;
+ if (classCol.indexOf('help-isVisible') === -1) {
+ document.getElementById('helpUnderlay').className += ' help-isVisible';
+ }
+
+ }
+
+ helpUnderlay.style.height = doUnderlayHeight() + 'px';
+
+ }, false);
+
+ document.addEventListener('keyup', function(e) {
+ // 27 = ESC key
+ if (doWhichKey(e) === 27) {
+ removeModal(helpUnderlay);
+ }
+ }, false);
+
+ // Modal is removed if the background is clicked
+ helpUnderlay.addEventListener('click', function() {
+ removeModal(helpUnderlay);
+ }, false);
+
+ // this prevents click on modal from removing the modal
+ helpModal.addEventListener('click', function(e) {
+ e.stopPropagation();
+ }, false);
+
+ // the close button
+ helpClose.addEventListener('click', function() {
+ removeModal(helpUnderlay);
+ }, false);
+
+ // If the window is resized, the doModalSize() function is called again.
+ // If your menu includes only a single column of keyboard shortcuts,
+ // then you won't need this. Keep only if you have 2 columns or more.
+ window.onresize = function() {
+ if (timeOut !== null) {
+ clearTimeout(timeOut);
+ }
+ timeOut = setTimeout(function() {
+ doModalSize(objDoSize);
+ }, 100);
+ };
+
+ }
+
+ // All the Ajax stuff is below.
+ // Probably no reason to touch this unless you can optimize it.
+ function getXhrObject() {
+ var xhrObject = false;
+ // All browsers (except IE6) use the 3 lines below
+ if (window.XMLHttpRequest) {
+ xhrObject = new XMLHttpRequest();
+ }
+ // If you need IE6 support, uncomment the following else/if:
+ /*else if (window.ActiveXObject) {
+ try {
+ xhrObject = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch(err) {
+ try {
+ xhrObject = new ActiveXObject("Microsoft.XMLHTTP");
+ } catch(err) {
+ xhrObject = false;
+ }
+ }
+ }*/
+ return xhrObject;
+ }
+
+ function insertHelp(respText, callback) {
+ // Opera kept inserting the content multiple times
+ // so I added a check to insert it just once... bug??
+ if (!document.getElementById('helpUnderlay')) {
+ document.getElementsByTagName('body')[0].innerHTML += respText;
+ callback();
+ }
+ }
+
+ function checkServerResponse(ajaxCapable) {
+ if (ajaxCapable.readyState === 4) {
+ if (ajaxCapable.status === 200 || ajaxCapable.status === 304) {
+ var respText = ajaxCapable.responseText;
+ // here's where the help modal is inserted
+ insertHelp(respText, function() {
+ doQuestionMark();
+ });
+ }
+ }
+ }
+
+ function doAjax() {
+ var ajaxCapable = getXhrObject();
+ if (ajaxCapable) {
+ ajaxCapable.onreadystatechange = function() {
+ checkServerResponse(ajaxCapable);
+ };
+ ajaxCapable.open("POST", "/files/fitnesse/question.mark/question.mark.html", true);
+ ajaxCapable.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+ ajaxCapable.send(null);
+ } else {
+ // Browser does not support ajax
+ document.getElementsByTagName('body')[0].innerHTML += 'Error: Your browser does not support Ajax';
+ }
+ }
+
+ // This fires all the Ajax stuff, and, in turn,
+ // the primary function for the modal.
+ doAjax();
+
+}());
View
1  src/fitnesse/resources/templates/skeleton.vm
@@ -19,6 +19,7 @@
<link rel="stylesheet" type="text/css" href="/files/fitnesse/css/fitnesse_pages.css" />
<link rel="stylesheet" type="text/css" href="/files/fitnesse/css/${theme}.css" />
<link rel="stylesheet" type="text/css" href="/files/fitnesse/wysiwyg/wysiwyg.css" media="screen"/>
+ <link rel="stylesheet" type="text/css" href="/files/fitnesse/question.mark/question.mark.css" />
<link rel="wysiwyg.base" href="/" />
<link rel="wysiwyg.stylesheet" type="text/css" href="/files/fitnesse/css/fitnesse.css" media="screen" />
<link rel="wysiwyg.stylesheet" type="text/css" href="/files/fitnesse/wysiwyg/editor.css" media="screen" />
View
40 src/fitnesse/resources/templates/wikiPage.vm
@@ -1 +1,39 @@
-$content.render()
+$content.render()
+
+<script src="/files/fitnesse/javascript/mousetrap.min.js" type="text/javascript"></script>
+<script src="/files/fitnesse/question.mark/question.mark.js" type="text/javascript"></script>
+
+<script type="text/javascript">
+
+ #set( $localPath = $actions.localPageName )
+
+ #if( $actions.testPage )
+ Mousetrap.bind('t', function() { window.location.href ="$localPath?test"; });
+ #end
+ #if( $actions.withEdit && !$actions.imported)
+ Mousetrap.bind('e', function() { window.location.href ="$localPath?edit"; });
+ #end
+ #if( $actions.withEdit)
+ Mousetrap.bind('a', function() { window.location.href ="$localPath?new"; });
+ #end
+ #if( $actions.withProperties )
+ Mousetrap.bind('p', function() { window.location.href ="$localPath?properties"; });
+ #end
+ #if( $actions.withWhereUsed )
+ Mousetrap.bind('w', function() { window.location.href ="$localPath?whereUsed"; });
+ #end
+ #if( $actions.withVersions )
+ Mousetrap.bind('v', function() { window.location.href ="$localPath?versions"; });
+ #end
+ #if( $actions.withSearch )
+ Mousetrap.bind('s', function() { window.location.href ="$localPath?searchForm"; });
+ Mousetrap.bind('/', function() {
+ document.getElementById('searchString').focus();
+ return false; // stops the / character appearing in search box
+ });
+ #end
+ #if( $actions.withUserGuide )
+ Mousetrap.bind('g u', function() { window.location.href =".FitNesse.UserGuide"; });
+ #end
+
+</script>
Please sign in to comment.
Something went wrong with that request. Please try again.