-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathxuiconf.js
115 lines (109 loc) · 2.56 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
// // // [[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":"default"
};
// ]]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"
}
};
// ]]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",
"treeviewCallback":null,
"repoName":null,
"dftFileContent":"",
"DontSetBackNow":null
};
// ]]Global Data
// [[Constant Data
xui.constant = {
};
// ]]Constant Data
// [[Develop Env Setting
xui.ini.$DevEnv = {
"designViewConf":{
"width":800,
"height":600
}
};
// ]]Develop Env Setting