wejsv2old-plugin-cdp-profile
Version:
We.js plugin wejsv2old-plugin-cdp-profile
22 lines (19 loc) • 763 B
JavaScript
$( document ).ready(function (){
App.User.reopen({
hasSocialNetworkLinks: function (){
return ( Ember.isPresent(this.get('fbprofile')) ||
Ember.isPresent(this.get('instprofile')) ||
Ember.isPresent(this.get('lkinprofile')) ||
Ember.isPresent(this.get('twitprofile')) ||
Ember.isPresent(this.get('youtbprofile')) ||
Ember.isPresent(this.get('otherprofile')));
}.property('fbprofile', 'instprofile', 'lkinprofile', 'twitprofile', 'youtbprofile', 'otherprofile')
});
App.UserSerializer = App.ApplicationSerializer.extend({
serialize: function(snapshot, options) {
var json = this._super(snapshot, options);
json.birthDate = new Date(json.birthDate).toDateString();
return json;
}
});
});