mirror of
https://github.com/processwire/processwire.git
synced 2025-08-14 18:55:56 +02:00
Update InputfieldPageAutocomplete.js to initialize the autocomplete on focus event, rather than on document ready. This resolves a render time issue in AdminThemeUikit when there are a lot of autocomplete inputs present, per @Toutouwai
This commit is contained in:
@@ -98,6 +98,7 @@ var InputfieldPageAutocomplete = {
|
||||
return allowed;
|
||||
}
|
||||
|
||||
$input.one('focus', function() {
|
||||
$input.autocomplete({
|
||||
minLength: 2,
|
||||
source: function(request, response) {
|
||||
@@ -240,6 +241,7 @@ var InputfieldPageAutocomplete = {
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var makeSortable = function($ol) {
|
||||
$ol.sortable({
|
||||
|
File diff suppressed because one or more lines are too long
@@ -177,7 +177,7 @@ class InputfieldPageAutocomplete extends Inputfield implements InputfieldHasArra
|
||||
$operator = $this->operator;
|
||||
$id = $this->id;
|
||||
$max = (int) $this->maxSelectedItems;
|
||||
$class = $this->useList ? 'has_list' : 'no_list';
|
||||
$class = 'ui-autocomplete-input ' . ($this->useList ? 'has_list' : 'no_list');
|
||||
if($this->useAndWords) $class .= " and_words";
|
||||
if($this->allowAnyValue) $class .= " allow_any";
|
||||
|
||||
|
@@ -331,5 +331,7 @@ $(document).ready(function() {
|
||||
id: 'PageEditLinkTabs'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
$('#link_page_url_input').focus();
|
||||
}, 250);
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user