You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by ah...@apache.org on 2016/11/30 11:13:26 UTC

zeppelin git commit: [ZEPPELIN-1686] Added clear output to keyboard shortcut

Repository: zeppelin
Updated Branches:
  refs/heads/master b0bef98a7 -> a459c0249


[ZEPPELIN-1686] Added clear output to keyboard shortcut

### What is this PR for?
This PR Added "Clear output" of paragraph to the keyboard shortcut.

### What type of PR is it?
Improvement

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1686

### How should this be tested?
Click in paragraph and press Ctrl+Shift+c

### Screenshots (if appropriate)
![screenshot from 2016-11-27 06-29-27](https://cloud.githubusercontent.com/assets/8110458/20644011/e8d8f370-b46a-11e6-83cd-2d2fffc10a77.png)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: soralee <so...@nflabs.com>

Closes #1686 from soralee/ZEPPELIN-1686 and squashes the following commits:

e6e8d42 [soralee] changed short key from ctrl+shift+c to ctrl+alt+l
bbd96f9 [soralee] changed short key from ctrl+shift+c to ctrl+alt+l
225d18d [soralee] changed short key from ctrl+shift+c to ctrl+alt+l
d89afa1 [soralee] Added clear output to a keyboard shortcut


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/a459c024
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/a459c024
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/a459c024

Branch: refs/heads/master
Commit: a459c02494305e3cce4d151a1035c6529359ec2f
Parents: b0bef98
Author: soralee <so...@nflabs.com>
Authored: Mon Nov 28 17:23:00 2016 +0900
Committer: ahyoungryu <ah...@apache.org>
Committed: Wed Nov 30 20:12:29 2016 +0900

----------------------------------------------------------------------
 .../src/app/notebook/paragraph/paragraph.controller.js  |  4 ++++
 .../src/components/modal-shortcut/modal-shortcut.html   | 12 ++++++++++++
 2 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a459c024/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 c1ad35e..2868b8b 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -762,6 +762,8 @@
         $scope.editor.commands.bindKey('ctrl-alt-n.', null);
         $scope.editor.commands.removeCommand('showSettingsMenu');
 
+        $scope.editor.commands.bindKey('ctrl-alt-l', null);
+
         // autocomplete on 'ctrl+.'
         $scope.editor.commands.bindKey('ctrl-.', 'startAutocomplete');
         $scope.editor.commands.bindKey('ctrl-space', null);
@@ -1850,6 +1852,8 @@
           } else {
             $scope.showTitle();
           }
+        } else if (keyEvent.ctrlKey && keyEvent.altKey && keyCode === 76) { // Ctrl + Alt + l
+          $scope.clearParagraphOutput();
         } else {
           noShortcutDefined = true;
         }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a459c024/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 1beb4b5..4f051a6 100644
--- a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html
+++ b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html
@@ -180,6 +180,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">{{ isMac ? 'Option' : 'Alt'}}</kbd> + <kbd class="kbd-dark">l</kbd>
+            </div>
+          </div>
+          <div class="col-md-8">
+            Clear output
+          </div>
+        </div>
+
+        <div class="row">
+          <div class="col-md-4">
+            <div class="keys">
               <kbd class="kbd-dark">Ctrl</kbd> + <kbd class="kbd-dark">Shift</kbd> + <kbd class="kbd-dark">-</kbd>
             </div>
           </div>
@@ -199,6 +210,7 @@ limitations under the License.
           </div>
         </div>
 
+
         <h4>Editor Shortcuts</h4>
 
       <div class="row">