Fix gallery button hidden in folders without create permission
In the "Files" app the actions that require the create permission (those marked as "creatable") are hidden in folders that do not have that permission. However, as there is only one ".actions" element inside "#controls" and that ".actions" element also has the "creatable" CSS class appending the gallery button to it meant that the gallery button was hidden in folders without create permissions. Now the gallery button is appended to the "#controls" element instead, and thus it is no longer affected by the permissions of the folder. As the button is now appended to the "#controls" element its top margin was increased to align it with the rest of the buttons (as the ".actions" element uses a padding of 5px), and as the button appears in the top right corner of the contents its right margin was set to the same value as the top margin to "frame" the button. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
2831d56600
commit
df92586da6
|
@ -4,6 +4,11 @@
|
|||
margin-left: auto;
|
||||
}
|
||||
|
||||
#controls .button.view-switcher:not(.gallery) {
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#controls .button.view-switcher.gallery {
|
||||
margin-right: 4px;
|
||||
padding: 9px 11px;
|
||||
|
|
|
@ -81,7 +81,7 @@ $(document).ready(function () {
|
|||
window.location.href = GalleryButton.url;
|
||||
});
|
||||
|
||||
$('#controls .actions').append(GalleryButton.button);
|
||||
$('#controls').append(GalleryButton.button);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue