diff options
author | Phie <phie@phie.ovh> | 2018-08-21 18:39:12 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2018-08-21 18:39:12 +0300 |
commit | 7d24cc0120859fc4e46b301c08effc97ddfbb1bb (patch) | |
tree | 94b5b52074022ceccd4c91073f217feaec38ca40 /js/browsers/note.js |
first commit for Carnet NC server
Diffstat (limited to 'js/browsers/note.js')
-rwxr-xr-x | js/browsers/note.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/browsers/note.js b/js/browsers/note.js new file mode 100755 index 0000000..a227c83 --- /dev/null +++ b/js/browsers/note.js @@ -0,0 +1,24 @@ + + +var Note = function(title, text, path, metadata, previews){ + this.title = title; + this.text = text; + this.path = path; + this.previews = previews; + if(metadata == undefined){ + this.metadata = new NoteMetadata(); + this.metadata.creation_date = Date.now(); + this.metadata.last_modification_date = this.metadata.creation_date; + } + else + this.metadata = metadata; + +} + +var NoteMetadata = function(){ + this.creation_date = "" + this.last_modification_date = "" + this.keywords = [] + this.rating = -1; +} +exports.Note = Note
\ No newline at end of file |