Skip to content

Commit bbca1ba

Browse files
committed
Refine version control action UI
1 parent 68619f8 commit bbca1ba

File tree

2 files changed

+40
-25
lines changed

2 files changed

+40
-25
lines changed

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

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,32 +61,34 @@ <h3>
6161
tooltip-placement="bottom" tooltip="Export the notebook">
6262
<i class="fa fa-download"></i>
6363
</button>
64-
<ul class="dropdown-menu" role="menu" style="width:250px">
65-
<li>
66-
<div class="cron-preset-container">
67-
<div>
68-
<input type="text"
69-
dropdown-input
70-
placeholder="commit message"
71-
id="note.checkpoint.message"
72-
ng-model="note.checkpoint.message"/>
73-
<button type="button"
74-
class="btn btn-default btn-xs"
75-
ng-hide="viewOnly"
76-
ng-click="checkpointNotebook(note.checkpoint.message)"
77-
tooltip-placement="bottom" tooltip="Commit the notebook">Commit
78-
</button>
79-
</div>
64+
<button type="button"
65+
class="btn btn-default btn-xs dropdown-toggle"
66+
ng-hide="viewOnly"
67+
data-toggle="dropdown"
68+
tooltip-placement="bottom" tooltip="Version control">
69+
<i class="fa fa-file-code-o"></i>
70+
</button>
71+
<ul class="dropdown-menu" role="menu" style="width:250px">
72+
<li>
73+
<div class="commit-container">
74+
<div>
75+
<input type="text"
76+
dropdown-input
77+
placeholder="commit message"
78+
id="note.checkpoint.message"
79+
style="width: 145px;"
80+
ng-model="note.checkpoint.message"/>
81+
<button type="button"
82+
class="btn btn-default btn-xs"
83+
ng-hide="viewOnly"
84+
ng-click="checkpointNotebook(note.checkpoint.message)"
85+
style="margin-left: 4px;"
86+
tooltip-placement="bottom" tooltip="Commit the notebook">Commit
87+
</button>
8088
</div>
81-
</li>
82-
</ul>
83-
<button type="button"
84-
class="btn btn-default btn-xs dropdown-toggle"
85-
ng-hide="viewOnly"
86-
data-toggle="dropdown"
87-
tooltip-placement="bottom" tooltip="Version control">
88-
<i class="fa fa-file-code-o"></i>
89-
</button>
89+
</div>
90+
</li>
91+
</ul>
9092
</span>
9193

9294
<!-- put the delete action by itself for your protection -->

zeppelin-web/src/app/notebook/notebook.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,19 @@
210210
border: 0;
211211
}
212212

213+
.commit-container {
214+
padding: 10px 20px 6px 20px;
215+
font-weight: normal;
216+
word-wrap: break-word;
217+
white-space: initial;
218+
}
219+
220+
/* overwrite bootstrap css for version control button */
221+
.btn-group > .btn + .dropdown-toggle {
222+
padding-right: 5px;
223+
padding-left: 5px;
224+
}
225+
213226
.cron-preset-container {
214227
padding: 10px 20px 0 20px;
215228
font-weight: normal;

0 commit comments

Comments
 (0)