OSDN Git Service

ns_search: hide unwanted console output when update all index
[newslash/newslash.git] / src / newslash_web / public / js / base.js
1 /* base.js - some base classes for newslash frontend */
2
3 var Content = function(contentType) {
4   // Common
5   this.uid = 0;
6   this.create_time = "";
7   this.title = "";
8   this.intro_text = "";
9
10   this.author = "anonymous coward";
11   this.content_type = contentType;
12
13   // Journal
14   if (contentType == "journal") {
15     this.id = 0;
16     this.journal_id = 0;
17   }
18   
19   // Story
20   if (contentType == "story") {
21     this.stoid = 0;
22     this.sid = 0;
23     this.dept = "";
24     this.body_text = "";
25     this.add_related = "";
26     this.url = "";
27     this.mediaurl = "";
28     this.mediatype = "";
29     this.email = "";
30     this.commentstatus = "enabled";
31     this.display = 1;
32     this.submissioncopy = 0;
33     this.submission_id = 0;
34   }
35
36   // for internal use
37   this.tagsString = "";
38   this.related = "";
39   this.editing = true;
40 };
41
42
43 // Comments
44 var Comment = function () {
45   this.sid = 0;
46   this.cid = 0;
47   this.pid = 0;
48   this.date = '';
49   this.last_update = '';
50   this.subject = '';
51   this.uid = 0;
52   this.points = 0;
53   this.points_orig = 0;
54   this.points_max = 0;
55   this.lastmod = 0;
56   this.reason = 0;
57   this.signature = '';
58   this.len = 0;
59   this.karma_bonus = 'no';
60   this.karma = 0;
61   this.karma_abs = 0;
62   this.tweak_orig = 0;
63   this.tweak = 0;
64   this.badge_id = 0;
65   this.comment = '';
66   this.create_time = '';
67   this.author = '';
68   this.children = [];
69 };
70