-
Notifications
You must be signed in to change notification settings - Fork 11
/
basicmodel.js
executable file
·79 lines (79 loc) · 1.42 KB
/
basicmodel.js
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
this.main=function(app)
{
app.basicmodel=
{
fields:
{
},
modelname:"set in serving.js",
collection:null, //handle to main mongodb collection
links:[], //handle to main mongodb collection
empty_object:{},
general:
{
urlprefix:'model',
use:true,
name:'list',
load_collections:[], //names of mongodb collection to also load
title:'List',
filter: null,
sort: null,
main: false,
menu_item: true,
},
list:
{
use:false,
inline_add:false,
inline_copy:false,
inline_edit:false,
grid_edit:false,
must_search:false,
},
view:
{
use:false,
},
add:
{
add:true,
copy:false,
captcha:false,
confirm:false,
},
del:
{
use:false,
confirm:true,
},
edit:
{
edit:true,
confirm:false,
},
multiupdate:
{
use:false,
confirm:true,
},
search:
{
quick:true,
advanced:false,
hightlight:false,
},
audit:
{
use:false,
},
email:
{
onadd:false,
onedit:false,
ondelete:false,
}
};
require('./basicmodel_preprocess').main(app);
require('./basicmodel_crud').main(app);
require('./basicmodel_setup').main(app);
}