diff --git a/www/drive/file.css b/www/drive/file.css index 51739a13c..7c907d3ed 100644 --- a/www/drive/file.css +++ b/www/drive/file.css @@ -392,6 +392,10 @@ span.fa-folder-open { height: 100%; line-height: 40px; cursor: default; + width: auto; + overflow: hidden; + white-space: nowrap; + direction: rtl; } #driveToolbar .path .element { padding: 5px; diff --git a/www/drive/file.less b/www/drive/file.less index 29dbca40c..95a410666 100644 --- a/www/drive/file.less +++ b/www/drive/file.less @@ -451,6 +451,10 @@ span { height: 100%; line-height: 40px; cursor: default; + width: auto; + overflow: hidden; + white-space: nowrap; + direction: rtl; .element { padding: 5px; border: 1px solid @toolbar-bg; diff --git a/www/drive/main.js b/www/drive/main.js index 605eb82c8..17ead7531 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -358,6 +358,15 @@ define([ return hide; }; + var updatePathSize = function () { + var $context = $iframe.find('#contextButtonsContainer'); + var l = 50; + if ($context.length) { + l += $context.width() || 0; + } + $driveToolbar.find('.path').css('max-width', 'calc(100vw - '+$tree.width()+'px - '+l+'px)'); + }; + var updateContextButton = function () { var $li = $content.find('.selected'); if ($li.length !== 1) { @@ -412,6 +421,7 @@ define([ $container.append($a); $a.click(function() { $(el).click(); }); }); + updatePathSize(); }; // Add the "selected" class to the "li" corresponding to the clicked element @@ -1375,6 +1385,7 @@ define([ var $modeButton = createViewModeButton().appendTo($toolbar.find('.rightside')); var $title = createTitle(path).appendTo($toolbar.find('.rightside')); + updatePathSize(); if (APP.mobile()) { var $context = $('