webstaff: add keyboard shortcut legend to MARC editor
authorGalen Charlton <gmc@esilibrary.com>
Thu, 8 Oct 2015 19:23:36 +0000 (19:23 +0000)
committerKathy Lussier <klussier@masslnc.org>
Tue, 2 Feb 2016 19:58:50 +0000 (14:58 -0500)
Note that once we upgrade to angularjs-ui >= 0.13.0, using
a popover rather than a collapse might be better.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/templates/staff/cat/share/t_marcedit.tt2
Open-ILS/web/js/ui/default/staff/cat/services/marcedit.js

index 92dc60b..f1ed6c4 100644 (file)
       </div>
     </div>
     <div class="marcrecord pad-vert">
-      <label>
-        <input type="checkbox" ng-model="stackSubfields.enabled" />
-        [% l('Stack subfields') %]
-      </label>
+      <div class="input-group">
+        <label>
+          <input type="checkbox" ng-model="stackSubfields.enabled" />
+          [% l('Stack subfields') %]
+        </label>
+        <button class="btn btn-default btn-sm" ng-click="showHelp = !showHelp">[% l('Help') %]</button>
+        <!-- TODO: when we update to angular-ui >= 0.13.0 and get popover-template, switching to
+                   that rather than using ui.bootstrap.collapse might be good -->
+      </div>
+      <div collapse="!showHelp">
+        <ul>
+           <li>[% l('Undo: CTRL-z') %]</li>
+           <li>[% l('Redo: CTRL-y') %]</li>
+           <li>[% l('Add Row: CTRL+Enter') %]</li>
+           <li>[% l('Insert Row: CTRL+Shift+Enter') %]</li>
+           <li>[% l('Copy Current Row Above: CTRL+Up') %]</li>
+           <li>[% l('Copy Current Row Below: CTRL+Down') %]</li>
+           <li>[% l('Add Subfield: CTRL+D or CTRL+I') %]</li>
+           <li>[% l('Remove Row: CTRL+Del') %]</li>
+           <li>[% l('Remove Subfield: Shift+Del') %]</li>
+           <li>[% l('Create/Replace 006: Shift+F6') %]</li>
+           <li>[% l('Create/Replace 007: Shift+F7') %]</li>
+           <li>[% l('Create/Replace 008: Shift+F8') %]</li>
+        </ul>
+      </div>
       <div>
         <eg-marc-edit-leader record="record" on-keydown="onKeydown"/>
       </div>
index c295207..5fb5202 100644 (file)
@@ -672,6 +672,7 @@ angular.module('egMarcMod', ['egCoreMod', 'ui.bootstrap'])
                 $scope.controlfields = [];
                 $scope.datafields = [];
                 $scope.controlSet = egTagTable.getAuthorityControlSet();
+                $scope.showHelp = false;
                 $scope.stackSubfields = { enabled : false };
                 egCore.hatch.getItem('cat.marcedit.stack_subfields').then(function(val) {
                     $scope.stackSubfields.enabled = val;