Sha256: eace5b7b34ba0cbe5ce1100bcb75a819a8256becdb72df3814b200c3685ae755

Contents?: true

Size: 914 Bytes

Versions: 18

Compression:

Stored size: 914 Bytes

Contents

define(["model/base","backbone-mediator"],function(e){var t=e.extend({url:"/user.json",defaults:{id:null,email:"",firstName:"",lastName:"",lastLogin:null,createdAt:null,modifiedAt:null,preferences:{}},parse:function(e){return e.createdAt&&(e.createdAt=this.formatServerDateTime(e.createdAt)),e.modifiedAt&&(e.modifiedAt=this.formatServerDateTime(e.modifiedAt)),e.preferences||(e.preferences={},e.preferences.dashboards||(e.preferences.dashboards=[])),e},convertApplicationPrefs:function(){var e=this.get("preferences");e.applications&&(e.dashboards=e.applications,this.set("preferences",e),delete e.applications,this.save())},updatePrefs:function(e){var t=this.get("preferences");this.set("preferences",_.extend(t,e)),this.save()},initialize:function(){_.bindAll(this),this.fetch({async:!1,success:function(){this.convertApplicationPrefs(),Backbone.Mediator.pub("model:user:init",this)}.bind(this)})}});return t});

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rearview-1.1.2-jruby public/rearview/js/model/user.js
rearview-1.1.1-jruby public/rearview/js/model/user.js
rearview-1.1.0-jruby public/rearview/js/model/user.js
rearview-1.0.3.rc.4-jruby public/rearview/js/model/user.js
rearview-1.0.3.rc.3-jruby public/rearview/js/model/user.js
rearview-1.0.3.rc.2-jruby public/rearview/js/model/user.js
rearview-1.0.3.rc.1-jruby public/rearview/js/model/user.js
rearview-1.0.2-jruby public/rearview/js/model/user.js
rearview-1.0.2.rc.4-jruby public/rearview/js/model/user.js
rearview-1.0.2.rc.3-jruby public/rearview/js/model/user.js
rearview-1.0.2.rc.2-jruby public/rearview/js/model/user.js
rearview-1.0.2.rc.1-jruby public/rearview/js/model/user.js
rearview-1.0.1-jruby public/rearview/js/model/user.js
rearview-1.0.0-jruby public/rearview/js/model/user.js
rearview-1.0.0.rc5-jruby public/rearview/js/model/user.js
rearview-1.0.0.rc4-jruby public/rearview/js/model/user.js
rearview-1.0.0.rc3-jruby public/rearview/js/model/user.js
rearview-1.0.0.rc2-jruby public/rearview/js/model/user.js