Skip to content

Commit

Permalink
Merge pull request apache#198 from NFLabs/update/quickaccesstoggle
Browse files Browse the repository at this point in the history
Bringing code show/hide button back outside of dropdown for quickaccess
  • Loading branch information
Leemoonsoo committed Nov 11, 2014
2 parents f02beed + b68eeb5 commit 2e1f1a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
8 changes: 8 additions & 0 deletions zeppelin-web/app/scripts/controllers/paragraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,14 @@ angular.module('zeppelinWebApp')
commitParagraph($scope.paragraph.title, $scope.paragraph.text, newConfig, newParams);
};

$scope.toggleEditor = function() {
if ($scope.paragraph.config.editorHide) {
$scope.openEditor();
} else {
$scope.closeEditor();
}
};

$scope.closeEditor = function() {
console.log('close the note');

Expand Down
17 changes: 4 additions & 13 deletions zeppelin-web/app/views/paragraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@
<span class="icon-control-pause" style="cursor:pointer;color:#CD5C5C" tooltip-placement="top" tooltip="Cancel"
ng-click="cancelParagraph()"
ng-show="paragraph.status=='RUNNING' || paragraph.status=='PENDING'"></span>
<span class="{{paragraph.config.tableHide ? 'icon-notebook' : 'icon-book-open'}}" tooltip-placement="top" tooltip="{{(paragraph.config.tableHide ? 'Show' : 'Hide') + ' output'}}"

<span class="{{paragraph.config.editorHide ? 'icon-size-fullscreen' : 'icon-size-actual'}}" tooltip-placement="top" tooltip="{{(paragraph.config.editorHide ? 'Show' : 'Hide') + ' editor'}}"
ng-click="toggleEditor()"></span>
<span class="{{paragraph.config.tableHide ? 'icon-notebook' : 'icon-book-open'}}" tooltip-placement="top" tooltip="{{(paragraph.config.tableHide ? 'Show' : 'Hide') + ' output'}}"
ng-click="toggleOutput()"></span>

<span class="dropdown navbar-right">
Expand Down Expand Up @@ -337,18 +340,6 @@
ng-show="!paragraph.config.title"> Show title</a>
</li>

<li>
<!-- Editor handler -->
<a style="cursor:pointer"
class="fa fa-code"
ng-click="closeEditor()"
ng-show="!paragraph.config.editorHide && !paragraph.config.hide"> Hide code editor</a>
<a style="cursor:pointer"
class="fa fa-code"
ng-click="openEditor()"
ng-show="paragraph.config.editorHide && !paragraph.config.hide"> Show code editor</a>
</li>

<li>
<!-- paragraph handler -->
<a class="fa fa-compress" style="cursor:pointer"
Expand Down

0 comments on commit 2e1f1a3

Please sign in to comment.