From 733c7eb6e7d152a1708b84d55f6a3b5a183d9326 Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Tue, 19 Jan 2016 09:37:20 -0600 Subject: [PATCH] add keyboard shortcut for toggling run paragraph ### What is this PR for? Added a keyboard shortcut to toggle enable/disable of running a paragraph ### What type of PR is it? Improvement ### Todos ### Is there a relevant Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-608 ### How should this be tested? Click in paragraph and press ctrl+alt+s ### Screenshots (if appropriate) ![after](https://cloud.githubusercontent.com/assets/6380209/12334295/ed013684-babe-11e5-8ac2-7bcb63c297aa.png) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Michael Chen Closes #638 from MikeTYChen/ZEPPELIN-608 and squashes the following commits: 83cfa85 [Michael Chen] change shortcut key to ctrl+alt+r 1651cde [Michael Chen] Merge branch 'master' into ZEPPELIN-608 aa34352 [Michael Chen] add keyboard shortcut for toggling run paragraph --- .../app/notebook/paragraph/paragraph.controller.js | 2 ++ .../src/components/modal-shortcut/modal-shortcut.html | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js index 30c7ea44015..c69f96139e1 100644 --- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js +++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js @@ -861,6 +861,8 @@ angular.module('zeppelinWebApp') $scope.insertNew('below'); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 79) { // Ctrl + Alt + o $scope.toggleOutput(); + } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 82) { // Ctrl + Alt + r + $scope.toggleEnableDisable(); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 69) { // Ctrl + Alt + e $scope.toggleEditor(); } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 77) { // Ctrl + Alt + m diff --git a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html index 1191ec51f93..baeb011c2e2 100644 --- a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html +++ b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html @@ -122,6 +122,17 @@

Control in Note

+
+
+
+ Ctrl + Alt + r +
+
+
+ Enable/Disable run paragraph +
+
+