From: Coleman Watts Date: Tue, 6 Dec 2016 17:44:15 +0000 (-0500) Subject: CRM-18248 - Set quietMillis to 300 for EntityRef ajax X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3d06f63cbd6b4f48e9671605091062768f45a715;p=civicrm-core.git CRM-18248 - Set quietMillis to 300 for EntityRef ajax --- diff --git a/js/Common.js b/js/Common.js index 5969aa270e..434360e97f 100644 --- a/js/Common.js +++ b/js/Common.js @@ -443,6 +443,7 @@ if (!CRM.vars) CRM.vars = {}; // Use select2 ajax helper instead of CRM.api3 because it provides more value ajax: { url: CRM.url('civicrm/ajax/rest'), + quietMillis: 300, data: function (input, page_num) { var params = getEntityRefApiParams($el); params.input = input; diff --git a/templates/CRM/Custom/Form/ContactReference.tpl b/templates/CRM/Custom/Form/ContactReference.tpl index 82f6cfa794..3a09cdbfc6 100644 --- a/templates/CRM/Custom/Form/ContactReference.tpl +++ b/templates/CRM/Custom/Form/ContactReference.tpl @@ -35,6 +35,7 @@ minimumInputLength: 1, ajax: { url: {/literal}"{$customUrls.$element_name}"{literal}, + quietMillis: 300, data: function(term) { return {term: term}; },