Elastic: Fixes for Bootstrap 4.0.0

This commit is contained in:
Aleksander Machniak 2018-01-24 10:12:49 +01:00
parent 2efe6747ad
commit 59a79b1cee
5 changed files with 34 additions and 22 deletions

View file

@ -454,7 +454,7 @@ class calendar extends rcube_plugin
'title' => html::label($field_id, rcube::Q($this->gettext('workinghours'))),
'content' => html::div('input-group',
$select_hours->show($work_start, array('name' => '_work_start', 'id' => $field_id))
. html::span('input-group-addon', ' — ')
. html::span('input-group-append input-group-prepend', html::span('input-group-text',' — '))
. $select_hours->show($work_end, array('name' => '_work_end', 'id' => $field_id))
)
);
@ -505,7 +505,7 @@ class calendar extends rcube_plugin
if (!isset($no_override['calendar_default_alarm_offset'])) {
$field_id = 'rcmfd_alarm';
$input_value = new html_inputfield(array('name' => '_alarm_value', 'id' => $field_id . 'value', 'size' => 3));
$select_offset = new html_select(array('name' => '_alarm_offset', 'id' => $field_id . 'offset', 'class' => 'input-group-addon'));
$select_offset = new html_select(array('name' => '_alarm_offset', 'id' => $field_id . 'offset'));
foreach (array('-M','-H','-D','+M','+H','+D') as $trigger) {
$select_offset->add($this->rc->gettext('trigger' . $trigger, 'libcalendaring'), $trigger);
@ -594,13 +594,13 @@ class calendar extends rcube_plugin
foreach ($categories as $name => $color) {
$key = md5($name);
$field_class = 'rcmfd_category_' . str_replace(' ', '_', $name);
$category_remove = html::a(array(
'class' => 'button icon delete input-group-addon',
'onclick' => '$(this).parent().remove()',
$category_remove = html::span('input-group-append', html::a(array(
'class' => 'button icon delete input-group-text',
'onclick' => '$(this).parent().parent().remove()',
'title' => $this->gettext('remove_category'),
'href' => '#rcmfd_new_category',
), html::span('inner', $this->gettext('delete'))
);
));
$category_name = new html_inputfield(array('name' => "_categories[$key]", 'class' => $field_class, 'size' => 30, 'disabled' => $this->driver->categoriesimmutable));
$category_color = new html_inputfield(array('name' => "_colors[$key]", 'class' => "$field_class colors", 'size' => 6));
$hidden = $this->driver->categoriesimmutable ? html::tag('input', array('type' => 'hidden', 'name' => "_categories[$key]", 'value' => $name)) : '';
@ -613,14 +613,14 @@ class calendar extends rcube_plugin
$field_id = 'rcmfd_new_category';
$new_category = new html_inputfield(array('name' => '_new_category', 'id' => $field_id, 'size' => 30));
$add_category = html::a(array(
$add_category = html::span('input-group-append', html::a(array(
'type' => 'button',
'class' => 'button input-group-addon create',
'class' => 'button create input-group-text',
'title' => $this->gettext('add_category'),
'onclick' => 'rcube_calendar_add_category()',
'href' => '#rcmfd_new_category',
), html::span('inner', $this->gettext('add_category'))
);
));
$p['blocks']['categories']['options']['categories'] = array(
'content' => html::div('input-group', $new_category->show('') . $add_category),
);
@ -632,11 +632,12 @@ class calendar extends rcube_plugin
var button_label = rcmail.gettext("calendar.remove_category");
var input = $("<input>").attr({type: "text", name: "_categories[]", size: 30, "class": "form-control"}).val(name);
var color = $("<input>").attr({type: "text", name: "_colors[]", size: 6, "class": "colors form-control"}).val("000000");
var button = $("<a>").attr({"class": "button icon delete input-group-addon", title: button_label, href: "#rcmfd_new_category"})
.click(function() { $(this).parent().remove(); })
var button = $("<a>").attr({"class": "button icon delete input-group-text", title: button_label, href: "#rcmfd_new_category"})
.click(function() { $(this).parent().parent().remove(); })
.append($("<span>").addClass("inner").text(rcmail.gettext("delete")));
$("<div>").addClass("input-group").append(input).append(color).append(button).appendTo("#calendarcategories");
$("<div>").addClass("input-group").append(input).append(color).append($("<span class=\'input-group-append\'>").append(button))
.appendTo("#calendarcategories");
color.minicolors(rcmail.env.minicolors_config || {});
$("#rcmfd_new_category").val("");
}
@ -696,7 +697,6 @@ class calendar extends rcube_plugin
}
$input_value = new html_inputfield(array('name' => '_birthdays_alarm_value', 'id' => $field_id . 'value', 'size' => 3) + $input_attrib);
$input_attrib['class'] .= ' input-group-addon';
$select_offset = new html_select(array('name' => '_birthdays_alarm_offset', 'id' => $field_id . 'offset') + $input_attrib);
foreach (array('-M','-H','-D') as $trigger)
$select_offset->add($this->rc->gettext('trigger' . $trigger, 'libcalendaring'), $trigger);

View file

@ -766,11 +766,13 @@ class kolab_folders extends rcube_plugin
if (strpos($label, '$') === 0) {
$label = str_replace('$x', '', $label);
$html = $input->show($expire ?: '') . html::span('input-group-addon', rcube::Q($label));
$html = $input->show($expire ?: '')
. html::span('input-group-append', html::span('input-group-text', rcube::Q($label)));
}
else {
$label = str_replace('$x', '', $label);
$html = html::span('input-group-addon', rcube::Q($label)) . $input->show($expire ?: '');
$html = html::span('input-group-prepend', html::span('input-group-text', rcube::Q($label)))
. $input->show($expire ?: '');
}
$form['props']['fieldsets']['settings']['content']['kolabexpire'] = array(

View file

@ -962,7 +962,7 @@ function tag_selector_search_element(container)
{
var title = rcmail.gettext('kolab_tags.tagsearchnew'),
placeholder = rcmail.gettext('kolab_tags.newtag'),
form = $('<span class="input-group"><i class="input-group-addon icon search"></i></span>'),
form = $('<span class="input-group"><span class="input-group-prepend"><i class="input-group-text icon search"></i></span></span>'),
input = $('<input>').attr({'type': 'text', title: title, placeholder: placeholder, 'class': 'form-control'})
.keyup(function(e) {
if (this.value) {

View file

@ -33,10 +33,20 @@
}
}
fieldset.categories .input-group a.button.create {
&:before {
&:extend(.font-icon-class);
content: @fa-var-plus;
line-height: 1;
fieldset.categories .input-group {
.minicolors-input {
border-radius: 0;
}
.minicolors + .input-group-append {
margin-left: 0;
}
a.button.create {
&:before {
&:extend(.font-icon-class);
content: @fa-var-plus;
line-height: 1;
}
}
}

View file

@ -81,7 +81,7 @@ fieldset.categories input {
width: 14px;
}
a.button.input-group-addon {
a.button.input-group-text {
line-height: 19px;
vertical-align: middle;
}