From 6b08b86cb8739abd0bebb1feb33c8bfb4d00e879 Mon Sep 17 00:00:00 2001 From: michaelpacer Date: Wed, 15 Feb 2017 17:19:22 -0800 Subject: [PATCH] Some polishing, variable name change, etc. --- notebook/static/notebook/js/shortcuteditor.js | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/notebook/static/notebook/js/shortcuteditor.js b/notebook/static/notebook/js/shortcuteditor.js index 3f343ead7..955135e6e 100644 --- a/notebook/static/notebook/js/shortcuteditor.js +++ b/notebook/static/notebook/js/shortcuteditor.js @@ -93,7 +93,7 @@ var KeyBindingList = createClass({ }, render: function() { var that = this; - var childrens = this.state.data.map(function (binding) { + var children = this.state.data.map(function (binding) { return createElement(KeyBinding, Object.assign({}, binding, { onAddBindings: function (shortcut, action) { that.props.bind(shortcut, action); @@ -106,13 +106,13 @@ var KeyBindingList = createClass({ } })); }); - childrens.unshift(createElement('div', {className:'well', key:'disclamer', dangerouslySetInnerHTML: + children.unshift(createElement('div', {className:'well', key:'disclamer', dangerouslySetInnerHTML: {__html: marked( "This dialog allows you to modify the keyboard shortcuts available in command mode. "+ "Any changes will be persisted between sessions and across environments. "+ - "You can define two kinds of shorctuts key combinations and key sequences.\n"+ + "You can define two kinds of shorctuts **key combinations** and **key sequences**.\n"+ "\n"+ " - **Key Combinations**:\n"+ " - Use hyphens `-` to represent keys that should be pressed at the same time.\n"+ @@ -136,16 +136,22 @@ var KeyBindingList = createClass({ " - Key combinations are unique elements that can be used in a sequence.\n"+ " - E.g., `Ctrl-d,d` and `d,d` can exist at the same time and are both valid key sequences.\n"+ "\n"+ - "The case of elements will have no effects: (e.g: `;` and `:` are the same on english keyboards)."+ - " You need to explicitelty write the `Shift` modifier.\n"+ - "Valid modifiers are `Cmd`, `Ctrl`, `Alt` ,`Meta`, `Cmdtrl`. Refer to developer docs "+ - "for the corresponding keys depending on the platform."+ + "**Additional notes:**\n"+ + "The case in which elements are written does not change the binding's meaning. "+ + "E.g., `Ctrl-D` and `cTrl-d` are the same key binding. "+ + "Thus, `Shift` needs to be explicitly included if it is part of the key binding. "+ + "So, for example, if you set a command to be activated by `Shift-D,D`, the second `d` "+ + "cannot be pressed at the same time as the `Shift` modifier key.\n"+ + "Valid modifiers are specified by writing out their names explicitly: "+ + "e.g., `Shift`, `Cmd`, `Ctrl`, `Alt` ,`Meta`, `Cmdtrl`. You cannot use the symbol equivalents "+ + "(e.g., `⇧`, `⌘`, `⌃`, `⌥`); refer to developer docs for the corresponding keys "+ + "(the mapping of which depends on the platform you are using)."+ "You can hover on the name/description of a command to see its exact internal name and "+ - "differentiate from actions defined in various plugins. Changing the "+ - "keybindings of edit mode is not yet possible." + "differentiate from actions defined in various plugins. \n"+ + "Changing the keybindings of edit mode is not currently available." )} })); - return createElement('div',{}, childrens); + return createElement('div',{}, children); } });