diff --git a/skins/elastic/styles/widgets/dialogs.less b/skins/elastic/styles/widgets/dialogs.less index 49add678b..0d215e04d 100644 --- a/skins/elastic/styles/widgets/dialogs.less +++ b/skins/elastic/styles/widgets/dialogs.less @@ -31,6 +31,11 @@ } } +.popup.justified { + display: flex; + justify-content: space-around; +} + .popover-body { padding: 0; overflow-x: hidden; diff --git a/skins/elastic/styles/widgets/jqueryui.less b/skins/elastic/styles/widgets/jqueryui.less index f111bd7e3..906f3a1ba 100644 --- a/skins/elastic/styles/widgets/jqueryui.less +++ b/skins/elastic/styles/widgets/jqueryui.less @@ -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 */ } diff --git a/skins/elastic/styles/widgets/lists.less b/skins/elastic/styles/widgets/lists.less index 65e5df7ef..aef37f8e8 100644 --- a/skins/elastic/styles/widgets/lists.less +++ b/skins/elastic/styles/widgets/lists.less @@ -646,10 +646,7 @@ html.touch { display: none; } td.subject { - padding-right: 1em; - span.date { - right: 1em; - } + padding-right: .5em; } td.threads { padding: 0; diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index cfe9a27d6..ca2c6f296 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -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 + 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( + $('
') + .append(label.attr('for', id).addClass('col-sm-2 col-form-label')) + .append($('
').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');