Skip to content

Commit 20425e7

Browse files
cloverheartsJongyoul Lee
authored andcommitted
add toggleNotePersonalizedMode and ui
1 parent 4fabd88 commit 20425e7

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

zeppelin-web/src/app/notebook/notebook-actionBar.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,20 @@ <h3>
6666
tooltip-placement="bottom" tooltip="Export this note">
6767
<i class="fa fa-download"></i>
6868
</button>
69+
<button type="button"
70+
class="btn btn-primary btn-xs"
71+
ng-hide="viewOnly || !note.config.personalizedMode"
72+
ng-click="toggleNotePersonalizedMode(note.config.personalizedMode)"
73+
tooltip-placement="bottom" tooltip="Personal mode">
74+
<i class="fa fa-user"></i>
75+
</button>
76+
<button type="button"
77+
class="btn btn-default btn-xs"
78+
ng-hide="viewOnly || note.config.personalizedMode"
79+
ng-click="toggleNotePersonalizedMode(note.config.personalizedMode)"
80+
tooltip-placement="bottom" tooltip="Public mode">
81+
<i class="fa fa-users"></i>
82+
</button>
6983
</span>
7084

7185
<span class="labelBtn btn-group" role="group">

zeppelin-web/src/app/notebook/notebook.controller.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,11 @@
752752
}
753753
};
754754

755+
$scope.toggleNotePersonalizedMode = function(personalizedMode) {
756+
$scope.note.config.personalizedMode = !personalizedMode;
757+
//clover
758+
};
759+
755760
var isSettingDirty = function() {
756761
if (angular.equals($scope.interpreterBindings, $scope.interpreterBindingsOrig)) {
757762
return false;
@@ -886,6 +891,7 @@
886891
if (note === undefined) {
887892
$location.path('/');
888893
}
894+
console.log('clover ', note);
889895

890896
$scope.paragraphUrl = $routeParams.paragraphId;
891897
$scope.asIframe = $routeParams.asIframe;

0 commit comments

Comments
 (0)