From: Coleman Watts Date: Thu, 9 Oct 2014 05:53:54 +0000 (-0400) Subject: API explorer - fix getfields action select X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=75f8dac25af8ef7cf76df7500d11b958256fa45c;p=civicrm-core.git API explorer - fix getfields action select --- diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index e530b27a49..2df88070ab 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -86,12 +86,7 @@ id: 'api_action', text: 'Action' }); - options.api_action = []; - $('option', '#api-action').each(function() { - if (this.value) { - options.api_action.push({key: this.value, value: $(this).text()}); - } - }); + options.api_action = _.transform(actions, function(ret, item) {ret.push({value: item, key: item})}); showFields(['api_action']); return; }