Fix the path in the drive overriding the content area
This commit is contained in:
parent
d7d7165dc4
commit
55fb0f03ae
@ -392,6 +392,10 @@ span.fa-folder-open {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
width: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
direction: rtl;
|
||||||
}
|
}
|
||||||
#driveToolbar .path .element {
|
#driveToolbar .path .element {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
|
|||||||
@ -451,6 +451,10 @@ span {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
width: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
direction: rtl;
|
||||||
.element {
|
.element {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 1px solid @toolbar-bg;
|
border: 1px solid @toolbar-bg;
|
||||||
|
|||||||
@ -358,6 +358,15 @@ define([
|
|||||||
return hide;
|
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 updateContextButton = function () {
|
||||||
var $li = $content.find('.selected');
|
var $li = $content.find('.selected');
|
||||||
if ($li.length !== 1) {
|
if ($li.length !== 1) {
|
||||||
@ -412,6 +421,7 @@ define([
|
|||||||
$container.append($a);
|
$container.append($a);
|
||||||
$a.click(function() { $(el).click(); });
|
$a.click(function() { $(el).click(); });
|
||||||
});
|
});
|
||||||
|
updatePathSize();
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add the "selected" class to the "li" corresponding to the clicked element
|
// 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 $modeButton = createViewModeButton().appendTo($toolbar.find('.rightside'));
|
||||||
var $title = createTitle(path).appendTo($toolbar.find('.rightside'));
|
var $title = createTitle(path).appendTo($toolbar.find('.rightside'));
|
||||||
|
updatePathSize();
|
||||||
|
|
||||||
if (APP.mobile()) {
|
if (APP.mobile()) {
|
||||||
var $context = $('<button>', {'class': 'element right dropdown-bar', id: 'contextButton'});
|
var $context = $('<button>', {'class': 'element right dropdown-bar', id: 'contextButton'});
|
||||||
@ -1639,6 +1650,14 @@ define([
|
|||||||
return base + viewHash;
|
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) {
|
$contextMenu.on("click", "a", function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
var path = $(this).data('path');
|
var path = $(this).data('path');
|
||||||
@ -1870,6 +1889,7 @@ define([
|
|||||||
if (APP.resizeTree) { return; }
|
if (APP.resizeTree) { return; }
|
||||||
APP.resizeTree = window.setInterval(function () {
|
APP.resizeTree = window.setInterval(function () {
|
||||||
$driveToolbar.find('.leftside').width($tree.width());
|
$driveToolbar.find('.leftside').width($tree.width());
|
||||||
|
updatePathSize();
|
||||||
}, 100);
|
}, 100);
|
||||||
});
|
});
|
||||||
$(ifrw).mouseup(function (e) {
|
$(ifrw).mouseup(function (e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user