Elastic: Better alignment of video/audio preview

This commit is contained in:
Aleksander Machniak 2018-04-23 14:41:46 +00:00
parent 361837cfee
commit 0fc9ca3031
3 changed files with 19 additions and 3 deletions

View file

@ -47,7 +47,7 @@
</div> </div>
</div> </div>
<h2 id="aria-label-filecontent" class="voice"><roundcube:label name="kolab_files.arialabelfilecontent" /></h2> <h2 id="aria-label-filecontent" class="voice"><roundcube:label name="kolab_files.arialabelfilecontent" /></h2>
<div class="iframe-wrapper"> <div class="iframe-wrapper file-preview">
<roundcube:object name="filepreviewframe" id="fileframe" role="main" aria-labelledby="aria-label-filecontent" /> <roundcube:object name="filepreviewframe" id="fileframe" role="main" aria-labelledby="aria-label-filecontent" />
</div> </div>
<roundcube:if condition="stripos(env:mimetype, 'image/') === 0" /> <roundcube:if condition="stripos(env:mimetype, 'image/') === 0" />

View file

@ -72,8 +72,6 @@ function kolab_files_members_list(link)
if (rcmail.env.action == 'open') { if (rcmail.env.action == 'open') {
rcmail.addEventListener('enable-command', kolab_files_enable_command); rcmail.addEventListener('enable-command', kolab_files_enable_command);
$('#toolbar-menu a.button.save').parent().hide();
// center and scale the image in preview frame // center and scale the image in preview frame
if (rcmail.env.mimetype.startsWith('image/')) { if (rcmail.env.mimetype.startsWith('image/')) {
$('#fileframe').on('load', function() { $('#fileframe').on('load', function() {
@ -99,6 +97,10 @@ else {
} }
$(document).ready(function() { $(document).ready(function() {
if (rcmail.env.action == 'open') {
$('#toolbar-menu a.button.save').parent().hide();
}
if ($('#dragfilemenu').length) { if ($('#dragfilemenu').length) {
rcmail.gui_object('file_dragmenu', 'dragfilemenu'); rcmail.gui_object('file_dragmenu', 'dragfilemenu');
} }

View file

@ -461,3 +461,17 @@ a.button.saveas:before {
button.participant.add:before { button.participant.add:before {
content: @fa-var-user-plus; content: @fa-var-user-plus;
} }
.iframe-wrapper.file-preview {
display: flex;
align-items: center;
justify-content: center;
@media screen and (min-width: (@screen-width-small + 1px)) {
padding: 1em;
}
& + .footer.toolbar {
display: none !important;
}
}