initial commit

This commit is contained in:
Mo Bitar
2016-12-05 17:33:27 -06:00
commit c6ab2f4122
146 changed files with 6185 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
var Note = function (json_obj) {
_.merge(this, json_obj);
};
/* Returns true if note is shared individually or via group */
Note.prototype.isPublic = function() {
return this.hasEnabledPresentation() || this.shared_via_group;
};
Note.prototype.isEncrypted = function() {
return this.local_eek ? true : false;
}
Note.prototype.hasEnabledPresentation = function() {
return this.presentation && this.presentation.enabled;
}
Note.prototype.presentationURL = function() {
return this.presentation.url;
}

View File

@@ -0,0 +1,10 @@
var User = function (json_obj) {
_.merge(this, json_obj);
};
User.prototype.getUsername = function() {
if(!this.presentation) {
return null;
}
return this.presentation.root_path;
};