Fix unwanted autocomplete showing up for country-select widget

This commit is contained in:
Hadi Nategh 2018-09-18 15:16:51 +02:00
parent af9cadc6cf
commit 82065b51c3
3 changed files with 9 additions and 3 deletions

View File

@ -118,4 +118,5 @@ select#addressbook-index_col_filter\[tid\] {
#addressbook-index_addressbook-index-row select{ #addressbook-index_addressbook-index-row select{
float: right; float: right;
width: 134px; width: 134px;
} }
#addressbook-edit .chzn-container .chzn-results {max-height: 110px}

View File

@ -140,6 +140,9 @@ select#addressbook-index_col_filter\[tid\] {
float: right; float: right;
width: 134px; width: 134px;
} }
#addressbook-edit .chzn-container .chzn-results {
max-height: 110px;
}
@media all { @media all {
/* ############################################################################# /* #############################################################################

View File

@ -749,9 +749,11 @@ var et2_selectbox = (function(){ "use strict"; return et2_inputWidget.extend(
allow_single_deselect: this.options.allow_single_deselect, allow_single_deselect: this.options.allow_single_deselect,
no_results_text: this.egw().lang('No results match') no_results_text: this.egw().lang('No results match')
}); });
if (this._type == 'select-country' && this.getValue()) { // set autocomplete for search input field to an arbitary value in order to stop it.
this.input.siblings().find('.chzn-search input').attr('autocomplete', 'new-password');
if (this._type == 'select-country') {
var selected = this.input.siblings().find('a.chzn-single'); var selected = this.input.siblings().find('a.chzn-single');
if (selected && selected.length == 1) if (selected && selected.length == 1 && this.getValue())
{ {
selected.removeClass (function (index, className) { selected.removeClass (function (index, className) {
return (className.match (/(^|\s)flag-\S+/g) || []).join(' '); return (className.match (/(^|\s)flag-\S+/g) || []).join(' ');