-
Notifications
You must be signed in to change notification settings - Fork 0
/
xuiconf.js
118 lines (107 loc) · 2.64 KB
/
xuiconf.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/*Do not modify {// [[*... // ]]*} pattern manually*/
// [[Gobal Code
(function(){
// //xui.stringify(new Date) => "2017-10-21T12:53:43.522+0800"
// xui.setDateFormat('gmt');
}());
// ]]Gobal Code
// [[Page Appearance
xui.ini.$PageAppearance = {
// "theme": "moonify",
// "background":{
// "background-color": "#FFFFFF",
// "background-image": "",
// "background-repeat": "",
// "background-position": "",
// "background-attachment": ""
// }
};
// ]]Page Appearance
// To set Font Icons CDN
// [[Font Icons CDN
xui.ini.$FontIconsCDN ={
"fontawesome":{
"href":"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css",
"integrity":"sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN",
"crossorigin":"anonymous",
"disabled":true
}
};
// ]]Font Icons CDN
// To set default prop to all xui.UI instances
// [[Default Prop
xui.ini.$DefaultProp={
"dirtyMark": false,
"xui.UI.Dialog":{
"minBtn": false
}
};
// ]]Default Prop
// [[Global Functions
xui.$cache.functions = {
"$APICaller:beforeData":{
"desc":"exception handler",
"params":[
{
"id":"rspData",
"type":"Hash",
"desc":""
}
],
"actions":[
{
"desc":"if returns exception",
"type":"other",
"target":"msg",
"args":[
"API returns exception",
"{args[0].error.message}"
],
"method":"alert",
"conditions":[
{
"left":"{args[0].error}",
"symbol":"non-empty",
"right":""
}
],
"timeout":0,
"onOK":2
}
]
},
"$APICaller:onError":{
"desc":"error handler",
"params":[
{
"id":"rspData",
"type":"Hash",
"desc":""
}
],
"actions":[
{
"desc":"if API raises error",
"type":"other",
"target":"msg",
"args":[
"API raises error",
"{args[0]}"
],
"method":"alert",
"onOK":2,
"timeout":0
}
]
}
};
// ]]Global Functions
// [[Global Data
xui.$cache.data = {
"$DATE_FORMAT":"gmt"
};
// ]]Global Data
// [[Constant Data
xui.constant = {
};
// ]]Constant Data