Skip to content

Commit 9ee4a39

Browse files
committed
Enable menu in statusbar
1 parent f07a64f commit 9ee4a39

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

addons/cb.files.editor/views/file.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ define([
8787
'type': "label"
8888
});
8989
this.tab.statusbar.add(this.editorStatusCommand);
90+
this.tab.statusbar.add(this.collaboratorsMenu);
91+
this.tab.statusbar.add(syntaxMenu);
9092

9193
// Tab menu
9294
this.tab.menu.menuSection([

client/resources/stylesheets/ui/statusbar.less

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
list-style: none;
1414
font-size: 13px;
1515

16-
.menu-item {
16+
& > .menu-item {
1717
color: inherit;
1818
margin: 0px 4px;
1919
cursor: default;
@@ -23,11 +23,35 @@
2323
float: right;
2424
display: inline-block;
2525

26+
.menu-label {
27+
margin-left: 4px;
28+
}
29+
30+
/* Simple label */
2631
&.menu-item-label {
2732
float: left;
2833
padding: 3px 3px;
2934
}
3035

36+
/* Menu */
37+
&.menu-item-menu {
38+
.ui-menu {
39+
bottom: 100%;
40+
top: auto;
41+
left: auto;
42+
right: 0px;
43+
max-height: 500px;
44+
overflow: auto;
45+
}
46+
47+
&:not(.disabled):hover {
48+
.ui-menu {
49+
display: block;
50+
}
51+
}
52+
}
53+
54+
/* Action/Menu */
3155
& > a {
3256
border-radius: 0px;
3357
background: transparent;
@@ -39,6 +63,10 @@
3963
border-top: 0px;
4064
border-bottom: 0px;
4165
display: inline-block;
66+
67+
&:hover, &:focus {
68+
text-decoration: none;
69+
}
4270
}
4371

4472
&:hover {

client/views/tabs/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ define([
6161
});
6262
this.on("tab:close", function() {
6363
this.menu.destroy();
64+
this.statusbar.stopListening();
6465
this.statusbar.each(function (command){
6566
command.destroy();
6667
});
67-
this.statusbar.stopListening();
6868
}, this);
6969

7070
// Keyboard shortcuts

0 commit comments

Comments
 (0)