Fix the path in the drive overriding the content area
parent
d7d7165dc4
commit
55fb0f03ae
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = $('<button>', {'class': 'element right dropdown-bar', id: 'contextButton'});
|
||||
|
@ -1639,6 +1650,14 @@ define([
|
|||
return base + viewHash;
|
||||
};
|
||||
|
||||
// Disable middle click in the context menu to avoid opening /drive/inner.html# in new tabs
|
||||
$(ifrw).click(function (e) {
|
||||
if (e.which !== 3) {
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$contextMenu.on("click", "a", function(e) {
|
||||
e.stopPropagation();
|
||||
var path = $(this).data('path');
|
||||
|
@ -1870,6 +1889,7 @@ define([
|
|||
if (APP.resizeTree) { return; }
|
||||
APP.resizeTree = window.setInterval(function () {
|
||||
$driveToolbar.find('.leftside').width($tree.width());
|
||||
updatePathSize();
|
||||
}, 100);
|
||||
});
|
||||
$(ifrw).mouseup(function (e) {
|
||||
|
|
Loading…
Reference in New Issue