forked from OnceDoc/onceoa-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathask.main.js
More file actions
50 lines (40 loc) · 998 Bytes
/
Copy pathask.main.js
File metadata and controls
50 lines (40 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*!@preserve
* OnceDoc
*/
var config = global.CONFIG
var ONCEIO_CONFIG = config.ONCEIO_CONFIG
var MAIN_CONFIG = config.MAIN_CONFIG
global.ONCEOS_DESKTOP_MENU.push({
text : LOCAL.ASK
, icon : '/ask/img/ask.png'
, href : '/ask'
, target : '_blank'
})
global.ONCEOS_SUB_MENU_APP.nodes.push({
text : LOCAL.ASK
, icon : '/ask/img/ask.png'
, href : '/ask'
})
app.mod('ask', '../web')
app.pre('ask', '.tmpl')
OnceDoc.on('ready', function() {
oncedb.extend('article', {
replies : 'array'
, replyNum : 'int'
, private : "int;index('article_private');default(1)"
})
OnceDB.addExtension({
schema : 'article',
columns : [{
type : 'select',
field : 'private',
title : LOCAL.PRIVATE,
options : [
{ title : LOCAL.NO, value : 0 },
{ title : LOCAL.YES, value : 1 }
]
}]
})
app.map('/blog/view/:id', '/ask/view/:id')
})
require('./ask.article')