forked from shimondoodkin/nodejs-mongodb-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
basicapp_shared_templates.js
executable file
·66 lines (63 loc) · 2 KB
/
basicapp_shared_templates.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
this.main=function main(app)
{
app.editfields=
{
pagefilename:__filename,
prepeare_templates:{},
load_templates: // texts treated as templates filenames to load and prepeare
{
checkbox:"editfields/checkbox.html",
date:"editfields/date.html",
file:"editfields/file.html",
hidden:"editfields/hidden.html",
image:"editfields/image.html",
number:"editfields/number.html",
password:"editfields/password.html",
radio:"editfields/radio.html",
select:"editfields/select.html",
text:"editfields/text.html",
textarea:"editfields/textarea.html",
html:"editfields/html.html",
},
};
app.viewfields=
{
pagefilename:__filename,
prepeare_templates: {},
load_templates: // texts treated as templates filenames to load and prepeare
{
div:"viewfields/div.html",
link:"viewfields/link.html",
image:"viewfields/image.html",
//additional might be good idea
checkbox:"viewfields/checkbox.html",
date:"viewfields/date.html",
file:"viewfields/file.html",
hidden:"viewfields/hidden.html",
//image:"viewfields/image.html",
number:"viewfields/number.html",
password:"viewfields/password.html",
radio:"viewfields/radio.html",
select:"viewfields/select.html",
text:"viewfields/text.html",
textarea:"viewfields/textarea.html",
html:"viewfields/html.html",
},
};
app.templates=
{
pagefilename:__filename,
prepeare_templates: {},
load_templates: // texts treated as templates filenames to load and prepeare
{
admin:"admin.html",
},
};
app.load_app_templates=function(callback)
{
app.doubletemplate.load_templates1(app.templates);
app.doubletemplate.load_templates1(app.editfields);
app.doubletemplate.load_templates1(app.viewfields);
if(callback)callback(callback);
};
}