Elastic: Fix visual issue with date selector in events export dialog
This commit is contained in:
parent
6daad30742
commit
e0edf7b802
2 changed files with 9 additions and 8 deletions
|
@ -3096,9 +3096,10 @@ function rcube_calendar_ui(settings)
|
||||||
$('#event-export-calendar').val(calendar.id);
|
$('#event-export-calendar').val(calendar.id);
|
||||||
|
|
||||||
$('#event-export-range').change(function(e){
|
$('#event-export-range').change(function(e){
|
||||||
var custom = $('option:selected', this).val() == 'custom',
|
var custom = $(this).val() == 'custom', input = $('#event-export-startdate');
|
||||||
input = $('#event-export-startdate')
|
|
||||||
input.parent()[(custom?'show':'hide')]();
|
$(this)[custom ? 'removeClass' : 'addClass']('rounded-right'); // Elastic/Bootstrap
|
||||||
|
input[custom ? 'show' : 'hide']();
|
||||||
if (custom)
|
if (custom)
|
||||||
input.select();
|
input.select();
|
||||||
})
|
})
|
||||||
|
@ -3109,8 +3110,8 @@ function rcube_calendar_ui(settings)
|
||||||
'class': 'mainaction export',
|
'class': 'mainaction export',
|
||||||
click: function() {
|
click: function() {
|
||||||
if (form) {
|
if (form) {
|
||||||
var start = 0, range = $('#event-export-range option:selected', this).val(),
|
var start = 0, range = $('#event-export-range', this).val(),
|
||||||
source = $('#event-export-calendar option:selected').val(),
|
source = $('#event-export-calendar').val(),
|
||||||
attachmt = $('#event-export-attachments').get(0).checked;
|
attachmt = $('#event-export-attachments').get(0).checked;
|
||||||
|
|
||||||
if (range == 'custom')
|
if (range == 'custom')
|
||||||
|
|
|
@ -571,7 +571,7 @@ class calendar_ui
|
||||||
html::label(array('for' => 'event-export-calendar', 'class' => 'col-sm-4 col-form-label'), $this->cal->gettext('calendar'))
|
html::label(array('for' => 'event-export-calendar', 'class' => 'col-sm-4 col-form-label'), $this->cal->gettext('calendar'))
|
||||||
. html::div('col-sm-8', $this->calendar_select(array('name' => 'calendar', 'id' => 'event-export-calendar', 'class' => 'form-control custom-select'))));
|
. html::div('col-sm-8', $this->calendar_select(array('name' => 'calendar', 'id' => 'event-export-calendar', 'class' => 'form-control custom-select'))));
|
||||||
|
|
||||||
$select = new html_select(array('name' => 'range', 'id' => 'event-export-range', 'class' => 'form-control custom-select'));
|
$select = new html_select(array('name' => 'range', 'id' => 'event-export-range', 'class' => 'form-control custom-select rounded-right'));
|
||||||
$select->add(array(
|
$select->add(array(
|
||||||
$this->cal->gettext('all'),
|
$this->cal->gettext('all'),
|
||||||
$this->cal->gettext('onemonthback'),
|
$this->cal->gettext('onemonthback'),
|
||||||
|
@ -583,11 +583,11 @@ class calendar_ui
|
||||||
),
|
),
|
||||||
array(0,'1','2','3','6','12','custom'));
|
array(0,'1','2','3','6','12','custom'));
|
||||||
|
|
||||||
$startdate = new html_inputfield(array('name' => 'start', 'size' => 11, 'id' => 'event-export-startdate'));
|
$startdate = new html_inputfield(array('name' => 'start', 'size' => 11, 'id' => 'event-export-startdate', 'style' => 'display:none'));
|
||||||
|
|
||||||
$html .= html::div('form-section form-group row',
|
$html .= html::div('form-section form-group row',
|
||||||
html::label(array('for' => 'event-export-range', 'class' => 'col-sm-4 col-form-label'), $this->cal->gettext('exportrange'))
|
html::label(array('for' => 'event-export-range', 'class' => 'col-sm-4 col-form-label'), $this->cal->gettext('exportrange'))
|
||||||
. html::div('col-sm-8', $select->show(0) . html::span(array('style'=>'display:none'), $startdate->show())));
|
. html::div('col-sm-8 input-group', $select->show(0) . $startdate->show()));
|
||||||
|
|
||||||
$checkbox = new html_checkbox(array('name' => 'attachments', 'id' => 'event-export-attachments', 'value' => 1, 'class' => 'form-check-input pretty-checkbox'));
|
$checkbox = new html_checkbox(array('name' => 'attachments', 'id' => 'event-export-attachments', 'value' => 1, 'class' => 'form-check-input pretty-checkbox'));
|
||||||
$html .= html::div('form-section form-check row',
|
$html .= html::div('form-section form-check row',
|
||||||
|
|
Loading…
Add table
Reference in a new issue