diff --git a/src/main/resources/com/hcl/appscan/jenkins/plugin/builders/AppScanEnterpriseBuildStep/config.jelly b/src/main/resources/com/hcl/appscan/jenkins/plugin/builders/AppScanEnterpriseBuildStep/config.jelly index 53aa25f2..efbfcf75 100644 --- a/src/main/resources/com/hcl/appscan/jenkins/plugin/builders/AppScanEnterpriseBuildStep/config.jelly +++ b/src/main/resources/com/hcl/appscan/jenkins/plugin/builders/AppScanEnterpriseBuildStep/config.jelly @@ -21,6 +21,7 @@ @@ -30,15 +31,17 @@ - - + diff --git a/src/main/webapp/js/util.js b/src/main/webapp/js/util.js index fe117bee..62fed24b 100644 --- a/src/main/webapp/js/util.js +++ b/src/main/webapp/js/util.js @@ -88,20 +88,22 @@ function aseWaitClicked(e) { } } -/* - * Overridable method called before autocomplete container is loaded with result data. - * This method is overridden to dynamically change the autocomplete result list size - * @param sQuery {String} Original request. - * @param oResponse {Object} Response object. - * @param oPayload {MIXED} (optional) Additional argument(s) - * @return {Boolean} Return true to continue loading data, false to cancel. - -*/ -YAHOO.widget.AutoComplete.prototype.doBeforeLoadData = function (sQuery, oResponse, oPayload) { - if (oResponse.results.length != 0) { - YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed = oResponse.results.length; - } - return true; +if (window.YAHOO) { + /* + * Fix for the YUI-based autocomplete field, not needed since Jenkins 2.473. + * Overridable method called before autocomplete container is loaded with result data. + * This method is overridden to dynamically change the autocomplete result list size + * @param sQuery {String} Original request. + * @param oResponse {Object} Response object. + * @param oPayload {MIXED} (optional) Additional argument(s) + * @return {Boolean} Return true to continue loading data, false to cancel. + */ + YAHOO.widget.AutoComplete.prototype.doBeforeLoadData = function (sQuery, oResponse, oPayload) { + if (oResponse.results.length != 0) { + YAHOO.widget.AutoComplete.prototype.maxResultsDisplayed = oResponse.results.length; + } + return true; + } } function resetFields(credentialElement) {