Sha256: 613a3619b235778113e87e6da16dc5c0309fc1115c5d8c03a1268ba8f792af92

Contents?: true

Size: 1.12 KB

Versions: 20

Compression:

Stored size: 1.12 KB

Contents

;(function() {
    "use strict";

    // Provide interaction with a participant's profile.
    function ParticipantCtrl(participantId, Participants, Nudges) {
        var self = this;

        this._nudges = Nudges;
        Participants.getOne(participantId)
            .then(function(participant) {
                self.id = participant.id;
                self.username = participant.username;
                self.latestAction = participant.latestAction;
            })
            .catch(function(error) {
                window.console.log(error);
            });
        this.responses = [{ question: 'foo?', text: 'bar' }];
    }

    // Send a nudge from one participant to another.
    ParticipantCtrl.prototype.nudge = function() {
        this._nudges.create({ recipient: this });
    };

    // Initiate profile editor interface.
    ParticipantCtrl.prototype.edit = function() {
        window.console.log("edit");
    };

    // Create a module and register the controllers.
    angular.module('socialNetworking.controllers')
        .controller('ParticipantCtrl', ['participantId', 'Participants', 'Nudges', ParticipantCtrl]);
})();

Version data entries

20 entries across 16 versions & 1 rubygems

Version Path
social_networking-0.13.3 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.13.2 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.13.1 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.13.0 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.12.0 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.8 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.7 spec/dummy/tmp/jasmine/assets/social_networking/controllers/participant-controller.js
social_networking-0.11.7 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.6 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.6 spec/dummy/tmp/jasmine/assets/social_networking/controllers/participant-controller.js
social_networking-0.11.5 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.4 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.3 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.2 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.2 spec/dummy/tmp/jasmine/assets/social_networking/controllers/participant-controller.js
social_networking-0.11.1 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.11.1 spec/dummy/tmp/jasmine/assets/social_networking/controllers/participant-controller.js
social_networking-0.11.0 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.10.0 app/assets/javascripts/social_networking/controllers/participant-controller.js
social_networking-0.9.3 app/assets/javascripts/social_networking/controllers/participant-controller.js