fix closing search dropdown (#1142)

* using a different library for javascript selects, fixing the closing search dropdown
* fix closing dropdown for daterangepicker
* added missing search button for mobile on customer page
* fix meta fields with same names than existing columns
This commit is contained in:
Kevin Papst
2019-09-25 18:34:25 +02:00
committed by GitHub
parent e45e782e7d
commit d661c8b54e
47 changed files with 389 additions and 136 deletions

View File

@@ -26,13 +26,19 @@ export default class KimaiFormSelect extends KimaiPlugin {
activateSelectPicker(selector, container) {
let options = {};
if (container !== undefined) {
options = {container: container};
options = {
dropdownParent: $(container),
};
}
jQuery(selector + ' ' + this.selector).selectpicker(options);
options = {...options, ...{
language: this.getContainer().getConfiguration().get('locale'),
theme: "bootstrap"
}};
jQuery(selector + ' ' + this.selector).select2(options);
}
destroySelectPicker(selector) {
jQuery(selector + ' ' + this.selector).selectpicker('destroy');
jQuery(selector + ' ' + this.selector).select2('destroy');
}
updateOptions(selectIdentifier, data) {
@@ -71,7 +77,7 @@ export default class KimaiFormSelect extends KimaiPlugin {
// if the beta test kimai.theme.select_type is active, this will tell the selects to refresh
if (select.hasClass('selectpicker')) {
select.selectpicker('refresh');
select.trigger('change.select2');
}
}
}