You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/01/17 16:27:00 UTC
incubator-zeppelin git commit: keyboard shortcut to add above
Repository: incubator-zeppelin
Updated Branches:
refs/heads/master cbfd869c5 -> a31950770
keyboard shortcut to add above
### What is this PR for?
add a keyboard shortcut to add paragraph above to keep difference with previous add paragraph below
### What type of PR is it?
Improvement
### Todos
### Is there a relevant Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-611
### How should this be tested?
click into a paragraph and press ctrl+alt+n
### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Michael Chen <mi...@gmail.com>
Closes #643 from MikeTYChen/ZEPPELIN-611 and squashes the following commits:
732917f [Michael Chen] change to a
e9e419d [Michael Chen] keyboard shortcut to add above
Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/a3195077
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/a3195077
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/a3195077
Branch: refs/heads/master
Commit: a31950770561ab56fbb366886e5f562e2bb144b1
Parents: cbfd869
Author: Michael Chen <mi...@gmail.com>
Authored: Fri Jan 15 12:04:00 2016 -0600
Committer: Lee moon soo <mo...@apache.org>
Committed: Sun Jan 17 07:29:09 2016 -0800
----------------------------------------------------------------------
.../src/app/notebook/paragraph/paragraph.controller.js | 4 +++-
.../src/components/modal-shortcut/modal-shortcut.html | 11 +++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/a3195077/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index 6a70f48..be88498 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -796,8 +796,10 @@ angular.module('zeppelinWebApp')
$scope.moveUp();
} else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 74) { // Ctrl + Alt + j
$scope.moveDown();
+ } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 65) { // Ctrl + Alt + a
+ $scope.insertNew('above');
} else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 66) { // Ctrl + Alt + b
- $scope.insertNew();
+ $scope.insertNew('below');
} else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 79) { // Ctrl + Alt + o
$scope.toggleOutput();
} else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 69) { // Ctrl + Alt + e
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/a3195077/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html
index 9532039..1191ec5 100644
--- a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html
+++ b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html
@@ -81,6 +81,17 @@ limitations under the License.
<div class="row">
<div class="col-md-4">
<div class="keys">
+ <kbd class="kbd-dark">Ctrl</kbd> + <kbd class="kbd-dark">Alt</kbd> + <kbd class="kbd-dark">a</kbd>
+ </div>
+ </div>
+ <div class="col-md-8">
+ Insert new paragraph above
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="col-md-4">
+ <div class="keys">
<kbd class="kbd-dark">Ctrl</kbd> + <kbd class="kbd-dark">Alt</kbd> + <kbd class="kbd-dark">b</kbd>
</div>
</div>