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;
}