changeset 628ae4d92da0 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset&node=628ae4d92da0
description:
        Use last menu entry as tab label

        issue10505
        review344331002
diffstat:

 src/tab.js |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a3328e0f4c13 -r 628ae4d92da0 src/tab.js
--- a/src/tab.js        Mon Jul 12 22:59:06 2021 +0200
+++ b/src/tab.js        Mon Jul 12 23:01:27 2021 +0200
@@ -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);
 

Reply via email to