Improve simple dialogs like group creation/rename or qr-code

pull/5742/merge
Aleksander Machniak 7 years ago
parent 60876bd38c
commit c65b4de161

@ -31,6 +31,11 @@
}
}
.popup.justified {
display: flex;
justify-content: space-around;
}
.popover-body {
padding: 0;
overflow-x: hidden;

@ -113,7 +113,7 @@
.ui-dialog-content {
flex: 1;
&:not(.iframe) {
padding: .5em !important;
padding: 1rem;
}
}
@ -251,10 +251,15 @@ html.touch {
@media screen and (max-width: @screen-width-mini) {
.ui-widget-content {
border-radius: 0;
width: 100% !important;
left: 0 !important;
}
.ui-dialog {
.ui-dialog-content:not(.iframe) {
padding: .65rem;
}
}
.ui-autocomplete {
/* TODO: e.g. time input autocompletion on mobile */
}

@ -646,10 +646,7 @@ html.touch {
display: none;
}
td.subject {
padding-right: 1em;
span.date {
right: 1em;
}
padding-right: .5em;
}
td.threads {
padding: 0;

@ -464,6 +464,32 @@ function rcube_elastic_ui()
});
});
// Convert structure of single dialogs (one input or just an image),
// e.g. group create, attachment rename where we use <label>Label<input></label>
if (context != document && $('.popup', context).children().length == 1) {
var content = $('.popup', context).children().first();
if (content.is('img')) {
$('.popup', context).addClass('justified');
}
else if (content.is('label')) {
var input = content.find('input').detach(),
label = content.detach(),
id = input.attr('id');
if (!id) {
input.attr('id', id = 'dialog-input-elastic');
}
$('.popup', context).addClass('formcontent').append(
$('<div class="form-group row">')
.append(label.attr('for', id).addClass('col-sm-2 col-form-label'))
.append($('<div class="col-sm-10">').append(input))
);
input.focus();
}
}
// Forms
$('input:not(.button,[type=file],[type=radio],[type=checkbox]),select,textarea', $('.propform', context)).addClass('form-control');
$('[type=checkbox]', $('.propform', context)).addClass('form-check-input');

Loading…
Cancel
Save