Sha256: 22cd64933fd2d55aadf951dc4496e11022bff9bbfd3897fb8c684c5f75279245

Contents?: true

Size: 1.85 KB

Versions: 8

Compression:

Stored size: 1.85 KB

Contents

{I"
class:ETI"BundledAsset;FI"logical_path;TI"8social_networking/controllers/profile-controller.js;FI"
pathname;TI"y/Users/ems408/workspace/social_networking/app/assets/javascripts/social_networking/controllers/profile-controller.js;FI"content_type;TI"application/javascript;TI"
mtime;Tl+æ#\TI"length;TiQI"digest;TI"%d075a08179647b8ae9906bbc58153195;FI"source;TI"Q;(function() {
  "use strict";

  // Provide interaction with a participant's profile.
  function ProfileCtrl(profileId, Profiles, Nudges) {
      var self = this;
      self._profiles = Profiles;
      self._nudges = Nudges;
      self.profile = {};
      self._profiles.getOne(profileId).then(function(profile) {
          self.id = profile.id;
          self.profile = profile;
          self.iconSrc = '';
      }).catch(function(error) {
          window.console.log(error);
      });
  }

  // Send a nudge from one participant to another.
  ProfileCtrl.prototype.nudge = function(recipient_id) {
    var self = this;

    this._nudges.create(recipient_id)
      .then(function() {
        self.nudgeAlert = "Nudge sent!";
      });
  };

  // Update the profile icon
  ProfileCtrl.prototype.update_profile_icon = function(icon_name, controller) {
    controller.iconSrc = icon_name;
    controller._profiles.update(controller).then(function(profile) {
        controller.profile.iconSrc = profile.iconSrc;
    });
    $('#icon-selection-button').click();
  };

  ProfileCtrl.prototype.getIconSrc = function(controller) {
    return controller.profile.iconSrc;
  };

  // Create a module and register the controllers.
  angular.module('socialNetworking.controllers')
    .controller('ProfileCtrl', ['profileId', 'Profiles', 'Nudges', ProfileCtrl]);
})();
;TI"required_assets_digest;TI"%2be70f2a47af20a5ded82e7cc22f7339;FI"
_version;TI"%b910479f035fc02c55a3e167aaa8a0b8;F

Version data entries

8 entries across 4 versions & 1 rubygems

Version Path
social_networking-0.11.7 spec/dummy/tmp/cache/assets/development/sprockets/289815daa77fc1929a1d96e19e17ee69
social_networking-0.11.7 spec/dummy/tmp/cache/assets/development/sprockets/eaf782d4160e6735535bee938cdcb4bd
social_networking-0.11.6 spec/dummy/tmp/cache/assets/development/sprockets/289815daa77fc1929a1d96e19e17ee69
social_networking-0.11.6 spec/dummy/tmp/cache/assets/development/sprockets/eaf782d4160e6735535bee938cdcb4bd
social_networking-0.11.2 spec/dummy/tmp/cache/assets/development/sprockets/289815daa77fc1929a1d96e19e17ee69
social_networking-0.11.2 spec/dummy/tmp/cache/assets/development/sprockets/eaf782d4160e6735535bee938cdcb4bd
social_networking-0.11.1 spec/dummy/tmp/cache/assets/development/sprockets/289815daa77fc1929a1d96e19e17ee69
social_networking-0.11.1 spec/dummy/tmp/cache/assets/development/sprockets/eaf782d4160e6735535bee938cdcb4bd