Created
September 29, 2008 14:38
-
-
Save mauritslamers/13611 to your computer and use it in GitHub Desktop.
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
_assignedCommissionMembersBinding: 'AdmissionExam.currentExamCommissionController.arrangedObjects', | |
_assignedCommissionMembersObserver: function(){ | |
var assignedMembers = this.get('_assignedCommissionMembers'); | |
if((assignedMembers) && (assignedMembers.length>0) && (this.get('content')) && (this.get('arrangedObjects').length>0)){ | |
var leaveOut = assignedMembers.get('guid'); | |
var allGuids = this.get('content').get('records').get('guid'); | |
var conditionArray = []; | |
allGuids.each(function(s){ | |
var pos = leaveOut.indexOf(s); | |
if(pos<0){ | |
// only returns > 0 if found | |
conditionArray.push(s); | |
} | |
}); | |
this.get('content').set('conditions',{ 'guid': conditionArray }); | |
} | |
}.observes('_assignedCommissionMembers') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment