-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1221 from djvoa12/deprecations-1
removed @each dependent key
- Loading branch information
Showing
25 changed files
with
50 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ var competencyGroup = Ember.Object.extend({ | |
|
||
var objectiveProxy = Ember.ObjectProxy.extend({ | ||
courseObjective: null, | ||
selected: computed('content', 'courseObjective.parents.@each', function(){ | ||
selected: computed('content', 'courseObjective.parents.[]', function(){ | ||
return this.get('courseObjective.parents').contains(this.get('content')); | ||
}), | ||
}); | ||
|
@@ -69,7 +69,7 @@ export default Component.extend({ | |
showObjectiveList: false, | ||
showCohortList: false, | ||
cohorts: computed( | ||
'courseObjective.courses.@each', | ||
'courseObjective.courses.[]', | ||
'[email protected]', | ||
function(){ | ||
var courseObjective = this.get('courseObjective'); | ||
|
@@ -120,7 +120,7 @@ export default Component.extend({ | |
}; | ||
}).sortBy('title'); | ||
}), | ||
currentCohort: computed('selectedCohortId', 'cohorts.@each', function(){ | ||
currentCohort: computed('selectedCohortId', 'cohorts.[]', function(){ | ||
var selectedCohortId = this.get('selectedCohortId'); | ||
if(selectedCohortId){ | ||
var matchingGroups = this.get('cohorts').filterBy('id', selectedCohortId); | ||
|
@@ -133,7 +133,7 @@ export default Component.extend({ | |
return null; | ||
}), | ||
watchCohorts: on('init', observer( | ||
'availableCohorts.@each', | ||
'availableCohorts.[]', | ||
'selectedCohortId', | ||
'availableCohorts.length', | ||
function(){ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ export default Component.extend({ | |
instructorGroups: alias('subject.instructorGroups'), | ||
sortedInstructorGroups: sort('instructorGroups', 'sortBy'), | ||
filteredAvailableInstructorGroups: computed( | ||
'instructorGroups.@each', | ||
'instructorGroups.[]', | ||
'filter', | ||
'[email protected]', | ||
function(){ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,17 @@ export default Component.extend({ | |
cohorts: [], | ||
learnerGroups: alias('subject.learnerGroups'), | ||
sortedLearnerGroups: sort('learnerGroups', 'sortBy'), | ||
filteredCohorts: computed('cohorts.@each', 'filter', 'learnerGroups.@each', function(){ | ||
filteredCohorts: computed('cohorts.[]', 'filter', 'learnerGroups.[]', function(){ | ||
var self = this; | ||
var cohortProxy = Ember.ObjectProxy.extend({ | ||
selectedLearnerGroups: [], | ||
hasAvailableLearnerGroups: notEmpty('filteredAvailableLearnerGroups'), | ||
filter: '', | ||
filteredAvailableLearnerGroups: computed( | ||
'content.learnerGroups.@each', | ||
'[email protected].@each', | ||
'content.learnerGroups.[]', | ||
'[email protected].[]', | ||
'filter', | ||
'selectedLearnerGroups.@each', | ||
'selectedLearnerGroups.[]', | ||
function(){ | ||
var defer = Ember.RSVP.defer(); | ||
var self = this; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ export default Component.extend({ | |
availableInstructorGroups: alias('offering.session.course.school.instructorGroups'), | ||
showRemoveConfirmation: false, | ||
buffer: null, | ||
allInstructors: computed('instructors.@each', '[email protected].@each', function(){ | ||
allInstructors: computed('instructors.[]', '[email protected].[]', function(){ | ||
var self = this; | ||
var defer = Ember.RSVP.defer(); | ||
var instructorGroups = this.get('instructorGroups'); | ||
|
@@ -176,7 +176,7 @@ export default Component.extend({ | |
if(isEmpty(offering)){ | ||
return false; | ||
} | ||
|
||
let defer = RSVP.defer(); | ||
this.get('currentUser.userIsDeveloper').then(isDeveloper => { | ||
if(isDeveloper){ | ||
|
@@ -199,12 +199,12 @@ export default Component.extend({ | |
}); | ||
} | ||
}); | ||
|
||
return PromiseObject.create({ | ||
promise: defer.promise | ||
}); | ||
}), | ||
|
||
actions: { | ||
save() { | ||
if (this.datesValidated() && this.timesValidated()) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,7 @@ export default DS.Model.extend({ | |
usersCount: computed('users.length', 'childUsersTotal', 'childrenUsersTotal', function(){ | ||
return this.get('users.length') + this.get('childUsersTotal') + this.get('childrenUsersTotal'); | ||
}), | ||
availableUsers: computed('users', 'parent.users.@each', 'parent.childUsers.@each', function(){ | ||
availableUsers: computed('users', 'parent.users.[]', 'parent.childUsers.[]', function(){ | ||
var group = this; | ||
return new Ember.RSVP.Promise(function(resolve) { | ||
group.get('parent').then(function(parent){ | ||
|
@@ -107,7 +107,7 @@ export default DS.Model.extend({ | |
}); | ||
}); | ||
}), | ||
allDescendantUsers: computed('users.@each', '[email protected].@each', function(){ | ||
allDescendantUsers: computed('users.[]', '[email protected].[]', function(){ | ||
var deferred = Ember.RSVP.defer(); | ||
this.get('users').then(users => { | ||
this.get('children').then(children => { | ||
|
@@ -123,7 +123,7 @@ export default DS.Model.extend({ | |
promise: deferred.promise | ||
}); | ||
}), | ||
usersOnlyAtThisLevel: computed('users.@each', 'allDescendants.@each', function(){ | ||
usersOnlyAtThisLevel: computed('users.[]', 'allDescendants.[]', function(){ | ||
var deferred = Ember.RSVP.defer(); | ||
this.get('users').then(users => { | ||
this.get('allDescendants').then(descendants => { | ||
|
@@ -186,7 +186,7 @@ export default DS.Model.extend({ | |
var title = this.get('allParentsTitle') + this.get('title'); | ||
return title.replace(/([\s->]+)/ig,""); | ||
}), | ||
allDescendants: computed('[email protected].@each', function(){ | ||
allDescendants: computed('[email protected].[]', function(){ | ||
var deferred = Ember.RSVP.defer(); | ||
this.get('children').then(function(learnerGroups){ | ||
var groups = []; | ||
|
@@ -211,7 +211,7 @@ export default DS.Model.extend({ | |
promise: deferred.promise | ||
}); | ||
}), | ||
allParents: computed('parent', 'parent.allParents.@each', function(){ | ||
allParents: computed('parent', 'parent.allParents.[]', function(){ | ||
var deferred = Ember.RSVP.defer(); | ||
this.get('parent').then(parent => { | ||
var parents = []; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.