Use last menu entry as tab label

issue10505
review344331002
This commit is contained in:
Cédric Krier committed 2021-07-12 23:01:27 +02:00
1 parent 11077936bd
commit c2c4ba5fc4
1 file changed
+3 -3
+3 -3
View File
@@ -317,7 +317,7 @@
},
set_name: function(name) {
this.name = name;
this.name_el.text(Sao.common.ellipsize(name, 20));
this.name_el.text(Sao.common.ellipsize(name.split(' / ').pop(), 20));
this.name_el.attr('title', name);
},
get_url: function() {
@@ -396,7 +396,7 @@
'data-toggle': 'tab',
'href': '#' + tab.id
}).on('show.bs.tab', function() {
Sao.set_url(tab.get_url(), tab.name);
Sao.set_url(tab.get_url(), tab.name.split(' / ').pop());
})
.append(jQuery('<button/>', {
'class': 'close'
@@ -475,7 +475,7 @@
screen.message_callback = this.record_message.bind(this);
screen.switch_callback = function() {
if (this === Sao.Tab.tabs.get_current()) {
Sao.set_url(this.get_url(), this.name);
Sao.set_url(this.get_url(), this.name.split(' / ').pop());
}
}.bind(this);