{I" class:ETI"ProcessedAsset;FI"logical_path;TI"4social_networking/services/goal-tool-service.js;FI" pathname;TI"/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/social_networking/services/goal-tool-service.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+ążUI" length;Ti§I" digest;TI"%0cac0b1897b884b49795b3a0b387a01c;FI" source;TI"§;(function() { 'use strict'; function GoalToolService(focus) { var goalDefaults = { id: null, description: '', isCompleted: false, dueOn: '' }; function GoalTool() {} GoalTool.prototype.MODES = { BROWSE: 0, ENTRY: 1 }; GoalTool.prototype.edit = function(goal) { this.setModel(goal); this.setMode(this.MODES.ENTRY); focus('new-goal'); }; GoalTool.prototype.getMode = function() { return this._mode; }; GoalTool.prototype.setMode = function(mode) { this._mode = mode; }; GoalTool.prototype.copy = function(srcGoal, dstGoal) { dstGoal.description = srcGoal.description; dstGoal.isCompleted = srcGoal.isCompleted; dstGoal.dueOn = srcGoal.dueOn; }; GoalTool.prototype.setModel = function(goal) { var g = typeof goal === 'undefined' ? goalDefaults : goal; this._goalModel.id = g.id; this.copy(g, this._goalModel); }; GoalTool.prototype.getModel = function() { return this._goalModel; }; GoalTool.prototype.setFilter = function(type) { switch(type) { case 'all': this._currentFilter = { isDeleted: false }; break; case 'completed': this._currentFilter = { isDeleted: false, isCompleted: true }; break; case 'deleted': this._currentFilter = { isDeleted: true }; } }; GoalTool.prototype.getFilter = function() { return this._currentFilter; }; GoalTool.prototype.setTab = function(name) { this._tab = name; }; GoalTool.prototype.getTab = function() { return this._tab; }; GoalTool.prototype._mode = GoalTool.prototype.MODES.BROWSE; GoalTool.prototype._currentFilter = {}; GoalTool.prototype._goalModel = {}; GoalTool.prototype._tab = 'all'; return new GoalTool(); } angular.module('socialNetworking.services') .service('goalTool', ['focus', GoalToolService]); })(); ;TI"dependency_digest;TI"%73f8b23ab9c1f90d917efacf436bdfd1;FI"required_paths;T[I"/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/social_networking/services/goal-tool-service.js;FI"dependency_paths;T[{I" path;TI"/Users/usabilitymonitor/Desktop/Github/social_networking/app/assets/javascripts/social_networking/services/goal-tool-service.js;F@I"2015-08-03T12:17:18-05:00;T@I"%0cac0b1897b884b49795b3a0b387a01c;FI" _version;TI"%883b724e06f474a3db2deee10c127ab9;F