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/03/03 23:19:58 UTC

incubator-zeppelin git commit: [ZEPPELIN-698] Change shortcut for changing paragraph width

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master b88f52e3c -> 40bb5e631


[ZEPPELIN-698] Change shortcut for changing paragraph width

### What is this PR for?
Changing shortcuts for change paragraph width from

```
Ctrl + Alt + [1~9,0,-,=]
```

to

```
Ctrl + Shift + -

or

Ctrl + Shift + =
```

### What type of PR is it?
Bug Fix

### Todos
* [x] - change shortcut
* [x] - update help modal

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

### How should this be tested?
Select(focus) one paragraph and change width with shortcuts

### Screenshots (if appropriate)
N/A

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

Author: Lee moon soo <mo...@apache.org>

Closes #756 from Leemoonsoo/ZEPPELIN-698 and squashes the following commits:

11ccc7f [Lee moon soo] = to +
efb6517 [Lee moon soo] Update help modal
51d99cb [Lee moon soo] Change shortcut for changing paragraph width


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

Branch: refs/heads/master
Commit: 40bb5e6314b53308013502acfc746c47cb4a4620
Parents: b88f52e
Author: Lee moon soo <mo...@apache.org>
Authored: Tue Mar 1 18:22:30 2016 -0800
Committer: Lee moon soo <mo...@apache.org>
Committed: Thu Mar 3 14:23:44 2016 -0800

----------------------------------------------------------------------
 .../app/notebook/paragraph/paragraph.controller.js   |  6 ++++++
 .../components/modal-shortcut/modal-shortcut.html    | 15 +++++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/40bb5e63/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 3935cfc..c96ee65 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -973,6 +973,12 @@ angular.module('zeppelinWebApp')
         } else {
           $scope.showLineNumbers();
         }
+      } else if (keyEvent.ctrlKey && keyEvent.shiftKey && keyCode === 189) { // Ctrl + Shift + -
+        $scope.paragraph.config.colWidth = Math.max(1, $scope.paragraph.config.colWidth - 1);
+        $scope.changeColWidth();
+      } else if (keyEvent.ctrlKey && keyEvent.shiftKey && keyCode === 187) { // Ctrl + Shift + =
+        $scope.paragraph.config.colWidth = Math.min(12, $scope.paragraph.config.colWidth + 1);
+        $scope.changeColWidth();
       } else if (keyEvent.ctrlKey && keyEvent.altKey && ((keyCode >= 48 && keyCode <=57) || keyCode === 189 || keyCode === 187)) { // Ctrl + Alt + [1~9,0,-,=]
         var colWidth = 12;
         if (keyCode === 48) {

http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/40bb5e63/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 c07f5e0..1beb4b5 100644
--- a/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html
+++ b/zeppelin-web/src/components/modal-shortcut/modal-shortcut.html
@@ -180,11 +180,22 @@ 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">1</kbd>~<kbd class="kbd-dark">0</kbd>,<kbd class="kbd-dark">-</kbd>,<kbd class="kbd-dark">+</kbd>
+              <kbd class="kbd-dark">Ctrl</kbd> + <kbd class="kbd-dark">Shift</kbd> + <kbd class="kbd-dark">-</kbd>
             </div>
           </div>
           <div class="col-md-8">
-            Set paragraph width from 1 to 12
+            Reduce paragraph width
+          </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>
+          <div class="col-md-8">
+            Increase paragraph width
           </div>
         </div>