|
|
|
@ -582,7 +582,10 @@ function rcube_elastic_ui()
|
|
|
|
|
// 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');
|
|
|
|
|
$('table.propform > tbody > tr', context).each(function() {
|
|
|
|
|
$('table.propform', context).each(function() {
|
|
|
|
|
var text_only = true;
|
|
|
|
|
|
|
|
|
|
$(this).find('> tbody > tr').each(function() {
|
|
|
|
|
var first, last, row = $(this),
|
|
|
|
|
row_classes = ['form-group', 'row'],
|
|
|
|
|
cells = row.children('td');
|
|
|
|
@ -601,10 +604,15 @@ function rcube_elastic_ui()
|
|
|
|
|
if (last.find('a').length) {
|
|
|
|
|
row_classes.push('with-link');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
text_only = false;
|
|
|
|
|
}
|
|
|
|
|
else if (!last.find('input:not([type=hidden]),textarea,radio,select').length) {
|
|
|
|
|
last.addClass('form-control-plaintext');
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
text_only = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// style some multi-input fields
|
|
|
|
|
if (last.children('.datepicker') && last.children('input').length == 2) {
|
|
|
|
@ -618,6 +626,11 @@ function rcube_elastic_ui()
|
|
|
|
|
row.addClass(row_classes.join(' '));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (text_only) {
|
|
|
|
|
$(this).addClass('text-only');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Special input + anything entry
|
|
|
|
|
$('td.input-group', context).each(function() {
|
|
|
|
|
$(this).children(':not(:first)').addClass('input-group-addon');
|
|
|
|
|