EnVisageOnline/Main-RMO/Source/EnVisage/Scripts/forecastDashboardScripts.js

15 lines
516 B
JavaScript

function getSelectedTeamsOrViews(entityCode) {
var teamsOrViews = $('#filterTeam').val() || [];
if (teamsOrViews.length <= 0)
return [];
var options = [];
for (var i in teamsOrViews)
options.push('option[value="' + teamsOrViews[i] + '"]');
var entityOptions = $('#filterTeam').find('optgroup[label="' + entityCode + '"]').find(options.join(','));
var entities = $.map(entityOptions, function (element, index) {
return element.value;
});
return entities;
}