{I" class:ETI"ProcessedAsset;FI"logical_path;TI"notices.js;FI" pathname;TI"_/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/notices.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+¢¿UI" length;Tiê I" digest;TI"%f1fb1c904b11c031c68dfae4313dd9f5;FI" source;TI"ê (function() { "use strict"; function Notice() { var toastTimeout = 7000; this.actionNotice = function(actionType, description, participantId) { var self = this; this.behaviorPostNotice(actionType, description, participantId); setTimeout( function () { self.incentivePostNotice(actionType, description, participantId); }, 3000); }; this.incentivePostNotice = function(actionType, description, participantId) { var self = this; $.ajax({ type: "POST", url: "/participant_incentives/complete", data: { "participant_id": participantId, "action_type": actionType }, success: function (data, status) { if ('success' === status) { self.incentivRealTimeToast(description); } } }); }; this.behaviorPostNotice = function(actionType, description, participantId) { var self = this; $.ajax({ type: "POST", url: "/participant_behaviors/complete", data: { "participant_id": participantId, "action_type": actionType }, success: function (data, status) { if ('success' === status) { self.behaviorRealTimeToast(description); } } }); }; this.incentiveToastView = function(incentiveId, description) { this.realTimeToast("incentive", description); setTimeout( function () { $.ajax({ type: "PATCH", url: "/participant_incentives/" + incentiveId + "/complete" }); }, toastTimeout); }; this.behaviorToastView = function(behaviorId, description) { this.realTimeToast("behavior", description); setTimeout( function () { $.ajax({ type: "PATCH", url: "/participant_behaviors/" + behaviorId + "/complete" }); }, toastTimeout); }; this.incentivRealTimeToast = function(description) { this.realTimeToast('incentive', description); }; this.behaviorRealTimeToast = function(description) { this.realTimeToast('behavior', description); }; this.realTimeToast = function(type, description) { $.toaster( { title: 'Congratulations', priority: 'success', message: 'you completed the ' + type + ': ' + description, settings: {timeout: toastTimeout} }); }; } window.Notice = new Notice(); }()); ;TI"dependency_digest;TI"%4ec8402e90e0329bdd38c0f4a01063b7;FI"required_paths;T[I"_/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/notices.js;FI"dependency_paths;T[{I" path;TI"_/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/notices.js;F@I"2015-08-03T12:17:18-05:00;T@I"%f1fb1c904b11c031c68dfae4313dd9f5;FI" _version;TI"%883b724e06f474a3db2deee10c127ab9;F