{:uriI"øfile:///Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/social_networking/controllers/profile-controller.js?type=application/javascript&pipeline=self&id=262aef85cf69353a33c8f3d16982978292a9354f1dc6c33e2a7becff2dbb050e:ET:load_pathI"T/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts;T: filenameI"ƒ/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/social_networking/controllers/profile-controller.js;T: nameI"5social_networking/controllers/profile-controller;T:logical_pathI"=social_networking/controllers/profile-controller.self.js;T:content_typeI"application/javascript;T: sourceI"z;(function() { "use strict"; // Provide interaction with a participant's profile. function ProfileCtrl(alertService, profileId, Profiles, Nudges) { var self = this; this._profiles = Profiles; this._nudges = Nudges; this.alertService = alertService; this.getAlerts = function() { return alertService.getAlerts(); }; this.profile = {}; this.removeAlert = function(alert) { alertService.removeAlert(alert); }; this._profiles.getOne(profileId).then(function(profile) { self.id = profile.id; self.profile = profile; self.iconSrc = ''; }).catch(function(error) { alertService.addError(error); }); } // Send a nudge from one participant to another. ProfileCtrl.prototype.nudge = function(recipientId) { var self = this; this._nudges.create(recipientId) .then(function(response) { self.nudgeAlert = response.message; }) .catch(function(response) { self.alertService.addError(response.data.error); }); }; ProfileCtrl.prototype.updateProfileIcon = function(iconName) { var self = this; this.iconSrc = iconName; this._profiles.update(this) .then(function(profile) { self.profile.iconSrc = profile.iconSrc; }) .catch(function(response) { self.alertService.addError(response.data.error); }); $('#icon-selection-button').click(); }; // Create a module and register the controllers. angular.module('socialNetworking.controllers') .controller('ProfileCtrl', ['alertService', 'profileId', 'Profiles', 'Nudges', ProfileCtrl]); })(); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"‘file-digest:///Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/social_networking/controllers/profile-controller.js;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%ªÀ×æ }äJEµU„zæ„R®•å’Þ3„p¸ña: lengthiz:dependencies_digest"%)%åÎA‰˜´qÓ®FC¢±@kÓûlzÁ4ù\:idI"E262aef85cf69353a33c8f3d16982978292a9354f1dc6c33e2a7becff2dbb050e;F: mtimel+ÍU