Skip to content

Commit

Permalink
Issue #426 - better implementation of select all published surveys
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Tiele Westra committed Nov 5, 2013
1 parent fed886e commit 3552558
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Dashboard/app/js/lib/views/devices/assignment-edit-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,9 @@ FLOW.AssignmentEditView = FLOW.View.extend({
},

selectAllSurveys: function () {
var selected = Ember.A([]);
FLOW.surveyControl.get('content').forEach(function (item) {
if (item.get('status') == "PUBLISHED") {
selected.pushObject(item);
}
});
var selected = FLOW.surveyControl.get('content').filter(function (item) {
return item.get('status') === "PUBLISHED";
});
FLOW.selectedControl.set('selectedSurveys', selected);
},

Expand Down

0 comments on commit 3552558

Please sign in to comment.