Update to Bootstrap 4.0.0

pull/5742/merge
Aleksander Machniak 7 years ago
parent a1a933cb5c
commit befea99ab7

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -129,8 +129,10 @@
// Forms
@color-input: @color-font;
@color-input-border: rgba(22, 27, 29, 0.15);
@color-input-border-focus: #80bdff; // from Bootstrap's .form-control:focus
@color-input-border-focus-shadow: rgba(0,123,255,.25); // from Bootstrap's .form-control:focus
@color-input-border-invalid: @color-error;
@color-input-addon-background: @color-black-shade-bg;
@color-recipient-input-border: @color-input-border;

@ -68,7 +68,7 @@ font.bold {
tr:last-child td,
li:last-child {
border: 0;
border-bottom: 0;
}
}
}
@ -408,7 +408,6 @@ fieldset.image-attachment {
}
table.compact-table {
font-size: 90%;
margin: 0;
* {
@ -427,11 +426,6 @@ table.compact-table {
td:last-child {
padding-right: 0;
}
.form-control {
padding-left: .25rem;
padding-right: .25rem;
}
}
table.table {

@ -101,9 +101,13 @@ input.smart-upload {
.input-group {
margin-bottom: .25rem;
*:first-child.input-group-addon {
*:first-child.input-group-prepend {
text-align: left;
min-width: 7.5em;
& > * {
width: 100%;
}
}
}
@ -137,7 +141,7 @@ input.smart-upload {
label {
min-width: 7rem;
// Overwrite Bootstrap .input-group-addon style to make the label transparent
// Overwrite Bootstrap .input-group-* style to make the label transparent
background-color: transparent;
border: 0;
border-radius: 0;
@ -152,14 +156,20 @@ input.smart-upload {
.overflow-ellipsis;
min-width: 8rem;
height: auto;
padding-right: .375rem;
padding-left: .375rem;
&:not(select) {
padding: 0;
}
@media screen and (max-width: @screen-width-xs) {
min-width: 6rem;
width: 6rem;
flex-grow: unset;
}
label {
width: 100%;
}
}
& > *:nth-child(2) {
@ -179,6 +189,7 @@ input.smart-upload {
padding: 0;
display: flex;
flex-wrap: wrap;
border-radius: 0;
input {
border-radius: 0;
@ -205,6 +216,7 @@ input.smart-upload {
.form-control-plaintext {
flex-grow: 1;
border: 0;
}
}
@ -414,6 +426,7 @@ html.ms .propform {
.form-control-plaintext {
padding-bottom: 0;
border: 0;
}
@media screen and (max-width: @screen-width-bs-phone) {
@ -426,7 +439,7 @@ html.ms .propform {
}
.row.form-check {
padding-right: 0; // without these e.g. inputs in compose screen are not aligned properly
padding: 0; // without these e.g. inputs in compose screen are not aligned properly
display: flex; // https://github.com/twbs/bootstrap/issues/22348
flex-wrap: nowrap;
@ -462,6 +475,10 @@ html.ms .propform {
display: inline;
}
}
td > label {
padding-bottom: 0;
}
}
.nav-tabs {
@ -493,13 +510,15 @@ html.ms .propform {
/* Some common icons for "iconized inputs" */
.input-group-addon.icon {
.input-group .icon {
text-decoration: none;
padding: .375rem .5rem;
&:before {
&:extend(.font-icon-class);
margin: 0 !important;
line-height: 1;
font-size: 1.1em;
}
&.user:before {
content: @fa-var-user;
@ -587,6 +606,10 @@ ul.proplist {
margin-right: .25rem;
line-height: 1;
}
& > label {
display: inline-block !important;
}
}
@ -656,45 +679,40 @@ html.touch .popupmenu.form {
&.focused {
border: 1px solid @color-input-border-focus;
box-shadow: 0 0 0 .2rem @color-input-border-focus-shadow;
}
// TODO: style button focus
}
.input-group {
margin: 0 !important;
}
a.input-group-addon {
padding: .375rem .5rem;
a.icon {
&.reset:before {
&:extend(.font-icon-class);
content: @fa-var-trash-alt;
margin: 0;
}
}
.input-group-addon,
.form-control {
height: 2.25rem; // to be the same height as select.form-control element
}
input.form-control {
padding-left: .5rem;
padding-left: .75rem;
}
input,
input:focus,
.input-group-addon {
.input-group-text {
border-radius: 0;
border: 0;
border-bottom: 1px solid @color-input-border;
box-shadow: none;
}
.input-group:last-child * {
.input-group {
margin: 0 !important;
flex-wrap: nowrap; // Bootstrap makes them wrappable (imho)
&:last-child * {
border: 0;
}
}
& + .btn {
margin-top: .5rem;
@ -1026,6 +1044,15 @@ input.icon-checkbox {
padding-left: .5rem;
white-space: nowrap;
}
.input-group & {
padding: 0 .25rem 0 0;
&:before {
line-height: 1;
height: auto;
}
}
}
&:disabled + label {
@ -1056,17 +1083,6 @@ html.touch input.icon-checkbox + label {
font-size: 1.5rem;
}
.input-group-addon {
input.icon-checkbox + label {
padding: 0 .25rem 0 0;
&:before {
line-height: 1;
height: auto;
}
}
}
/*** HTML editor widget (and TinyMCE editor) ***/
@ -1194,6 +1210,14 @@ html.touch input.icon-checkbox + label {
/*** Bootstrap style overrides ***/
// Fixes height of some text inputs
// FIXME: Really? See managesieve's vacation form for all of these
td.input-group .input-group-append,
td.datetime input,
td.input-group input {
height: ~"calc(2.25rem + 2px)";
}
.form-control, .form-control:focus {
color: @color-font;
}
@ -1209,3 +1233,8 @@ html.touch input.icon-checkbox + label {
.form-group {
margin-bottom: .5rem;
}
.input-group-text {
color: @color-input;
background-color: @color-input-addon-background;
}

@ -192,7 +192,7 @@
/* Datepicker widget */
.ui-datepicker {
z-index: 2 !important; // above Bootstrap form controls that use z-index: 1
z-index: 3 !important; // above Bootstrap form controls that use z-index: 3
// Always display datepicker centered, overwriting widgets position
position: fixed !important;
top: 50% !important;

@ -32,11 +32,16 @@
margin-top: calc(@layout-header-height/2 - 2.25rem/2);
display: none;
padding: 0 .5rem;
.icon:before {
font-size: 1em;
line-height: 1.1;
}
.input-group-addon {
padding: .5rem;
font-size: 80%;
.icon.filter,
.icon.search {
color: #888;
}
}
form {

@ -12,7 +12,8 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="from" id="_from" form="form" tabindex="1" class="form-control" />
<a href="#identities" onclick="return rcmail.command('identities')" class="input-group-addon icon edit" title="<roundcube:label name="editidents" />" tabindex="1"><span class="inner"><roundcube:label name="editidents" /></span></a>
<span class="input-group-append">
<a href="#identities" onclick="return rcmail.command('identities')" class="input-group-text icon edit" title="<roundcube:label name="editidents" />" tabindex="1"><span class="inner"><roundcube:label name="editidents" /></span></a>
</div>
</div>
</div>
@ -21,7 +22,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="to" id="_to" form="form" tabindex="1" aria-required="true" data-recipient-input="true" />
<a href="#add-header" data-popup="headers-menu" class="input-group-addon icon add" title="<roundcube:label name="addheader" />" tabindex="1"><span class="inner"><roundcube:label name="addheader" /></span></a>
<span class="input-group-append">
<a href="#add-header" data-popup="headers-menu" class="input-group-text icon add" title="<roundcube:label name="addheader" />" tabindex="1"><span class="inner"><roundcube:label name="addheader" /></span></a>
</span>
</div>
</div>
</div>
@ -30,7 +33,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="cc" id="_cc" form="form" tabindex="1" data-recipient-input="true" />
<a href="#delete" onclick="$('#_cc').val('').change()" class="input-group-addon icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
<span class="input-group-append">
<a href="#delete" onclick="$('#_cc').val('').change()" class="input-group-text icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
</span>
</div>
</div>
</div>
@ -39,7 +44,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="bcc" id="_bcc" form="form" tabindex="1" data-recipient-input="true" />
<a href="#delete" onclick="$('#_bcc').val('').change()" class="input-group-addon icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
<span class="input-group-append">
<a href="#delete" onclick="$('#_bcc').val('').change()" class="input-group-text icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
</span>
</div>
</div>
</div>

@ -151,7 +151,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="from" id="_from" form="form" tabindex="1" class="form-control" />
<a href="#identities" onclick="return rcmail.command('identities')" class="input-group-addon icon edit" title="<roundcube:label name="editidents" />" tabindex="1"><span class="inner"><roundcube:label name="editidents" /></span></a>
<span class="input-group-append">
<a href="#identities" onclick="return rcmail.command('identities')" class="input-group-text icon edit" title="<roundcube:label name="editidents" />" tabindex="1"><span class="inner"><roundcube:label name="editidents" /></span></a>
</span>
</div>
</div>
</div>
@ -160,7 +162,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="to" id="_to" form="form" tabindex="1" aria-required="true" data-recipient-input="true" />
<a href="#add-header" data-popup="headers-menu" class="input-group-addon icon add" title="<roundcube:label name="addheader" />" tabindex="1"><span class="inner"><roundcube:label name="addheader" /></span></a>
<span class="input-group-append">
<a href="#add-header" data-popup="headers-menu" class="input-group-text icon add" title="<roundcube:label name="addheader" />" tabindex="1"><span class="inner"><roundcube:label name="addheader" /></span></a>
</span>
</div>
</div>
</div>
@ -169,7 +173,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="cc" id="_cc" form="form" tabindex="1" data-recipient-input="true" />
<a href="#delete" onclick="$('#_cc').val('').change()" class="input-group-addon icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
<span class="input-group-append">
<a href="#delete" onclick="$('#_cc').val('').change()" class="input-group-text icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
</span>
</div>
</div>
</div>
@ -178,7 +184,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="bcc" id="_bcc" form="form" tabindex="1" data-recipient-input="true" />
<a href="#delete" onclick="$('#_bcc').val('').change()" class="input-group-addon icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
<span class="input-group-append">
<a href="#delete" onclick="$('#_bcc').val('').change()" class="input-group-text icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
</span>
</div>
</div>
</div>
@ -187,7 +195,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="replyto" id="_replyto" form="form" tabindex="1" data-recipient-input="true" />
<a href="#delete" onclick="$('#_replyto').val('').change()" class="input-group-addon icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
<span class="input-group-append">
<a href="#delete" onclick="$('#_replyto').val('').change()" class="input-group-text icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
</span>
</div>
</div>
</div>
@ -196,7 +206,9 @@
<div class="col-10">
<div class="input-group">
<roundcube:object name="composeHeaders" part="followupto" id="_followupto" form="form" tabindex="1" data-recipient-input="true" />
<a href="#delete" onclick="$('#_followupto').val('').change()" class="input-group-addon icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
<span class="input-group-append">
<a href="#delete" onclick="$('#_followupto').val('').change()" class="input-group-text icon cancel" title="<roundcube:label name='delete' />" tabindex="1"><span class="inner"><roundcube:label name="delete" /></span></a>
</span>
</div>
</div>
</div>

@ -717,7 +717,7 @@ function rcube_elastic_ui()
// Special input + anything entry
$('td.input-group', context).each(function() {
$(this).children(':not(:first)').addClass('input-group-addon');
$(this).children(':not(:first)').addClass('input-group-append');
});
// Other forms, e.g. Contact advanced search
@ -732,21 +732,28 @@ function rcube_elastic_ui()
// Contact info/edit form
$('fieldset.propform.groupped fieldset', context).each(function() {
$('.row', this).each(function() {
var label, has_input = $('input,select,textarea', this).addClass('form-control').length > 0,
var label, first,
has_input = $('input,select,textarea', this).addClass('form-control').length > 0,
items = $(this).children();
if (items.length < 2) {
return;
}
items.first().addClass('input-group-addon').not('select').addClass('col-form-label');
first = items.first();
if (first.is('select')) {
first.addClass('input-group-prepend');
}
else {
first.wrap('<span class="input-group-prepend">').addClass('input-group-text');
}
if (!has_input) {
items.last().addClass('form-control-plaintext');
}
$('.content', this).addClass('input-group-addon');
$('a.deletebutton', this).addClass('input-group-addon icon delete');
$('.content', this).addClass('input-group-prepend input-group-append input-group-text');
$('a.deletebutton', this).addClass('input-group-text icon delete').wrap('<span class="input-group-append">');
$(this).addClass('input-group');
});
});
@ -844,7 +851,7 @@ function rcube_elastic_ui()
var input = $('input,select', this),
label = $('label', this),
icon_name = input.data('icon'),
icon = $('<i>').attr('class', 'input-group-addon icon ' + input.attr('name').replace('_', ''));
icon = $('<i>').attr('class', 'input-group-text icon ' + input.attr('name').replace('_', ''));
if (icon_name) {
icon.addClass(icon_name);
@ -854,7 +861,7 @@ function rcube_elastic_ui()
label.parent().css('display', 'none');
input.addClass('form-control')
.attr('placeholder', label.text())
.before(icon)
.before($('<span class="input-group-prepend">').append(icon))
.parent().addClass('input-group');
});
}
@ -1601,10 +1608,11 @@ function rcube_elastic_ui()
// make the input pretty
form.addClass('input-group')
.prepend($('<i class="input-group-addon icon search">'))
.append($('a.options', bar).detach().removeClass('button').addClass('icon input-group-addon'))
.append($('a.reset', bar).detach().removeClass('button').addClass('icon input-group-addon'))
.append($('<a class="icon cancel input-group-addon" href="#">'));
.prepend($('<span class="input-group-prepend">').append('<i class="input-group-text icon search">'))
.append($('<span class="input-group-append">')
.append($('a.options', bar).detach().removeClass('button').addClass('icon input-group-text'))
.append($('a.reset', bar).detach().removeClass('button').addClass('icon input-group-text'))
.append($('<a class="icon cancel input-group-text" href="#">')));
// Display search form
button.on('click', function() {
@ -1651,9 +1659,9 @@ function rcube_elastic_ui()
.append($('<a class="button icon filter">').attr({title: rcmail.gettext('filter'), tabindex: 0}));
$('select', bar).wrap($('<div class="input-group">'))
.parent().prepend($('<i class="input-group-addon icon filter">'))
.append($('<a class="icon cancel input-group-addon">')
.attr({title: rcmail.gettext('close'), href: '#'}));
.parent().prepend($('<span class="input-group-prepend">').append('<i class="input-group-text icon filter">'))
.append($('<span class="input-group-append">').append($('<a class="icon cancel input-group-text">')
.attr({title: rcmail.gettext('close'), href: '#'})));
var select = $('select', bar),
button = $('a.button.filter', bar),
@ -2913,7 +2921,7 @@ function rcube_elastic_ui()
// build row element content
var input, elem = $('<div class="input-group">'
+ '<input type="text" class="form-control">'
+ '<a class="icon reset input-group-addon" href="#"></a>'
+ '<span class="input-group-append"><a class="icon reset input-group-text" href="#"></a></span>'
+ '</div>'),
attrs = {value: value, name: name + '[]'};
@ -2954,9 +2962,10 @@ function rcube_elastic_ui()
// element deletion event
$('a.reset', elem).click(function() {
var record = $(this.parentNode);
var record = $(this.parentNode.parentNode);
if (area.children().length > 1) {
$('input', record.next().length ? record.next() : record.prev()).focus();
record.remove();
}
else {
@ -2964,7 +2973,7 @@ function rcube_elastic_ui()
}
});
$(elem).children()
$(elem).find('input,a')
.on('focus', function() { area.addClass('focused'); })
.on('blur', function() { area.removeClass('focused'); });

Loading…
Cancel
Save