isite 2021.12.16 → 2022.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -4
- package/apps/client-side/app.js +9 -6
- package/apps/client-side/site_files/css/dropdown.css +6 -4
- package/apps/client-side/site_files/css/form.css +2 -3
- package/apps/client-side/site_files/css/print.css +5 -48
- package/apps/client-side/site_files/css/theme.css +147 -146
- package/apps/client-side/site_files/css/theme_dark.css +2 -0
- package/apps/client-side/site_files/css/theme_paper.css +5 -3
- package/index.js +277 -294
- package/lib/collection.js +14 -18
- package/lib/collectionFile.js +16 -0
- package/lib/dashboard.js +28 -28
- package/lib/fsm.js +15 -1
- package/lib/parser.js +22 -11
- package/lib/routing.js +5 -1
- package/lib/security.js +1081 -1045
- package/lib/session.js +13 -78
- package/lib/sessions.js +22 -37
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -522,14 +522,15 @@ site.onGET('/testGetCookie', function (req, res) {
|
|
|
522
522
|
|
|
523
523
|
```js
|
|
524
524
|
site.onGET('/testSetSession', function (req, res) {
|
|
525
|
-
req.session
|
|
526
|
-
res.session
|
|
527
|
-
res.session
|
|
525
|
+
req.session.user_name = req.query.user_name;
|
|
526
|
+
res.session.ip = req.ip;
|
|
527
|
+
res.session.more = 'any data';
|
|
528
|
+
site.saveSession(res.session);
|
|
528
529
|
res.end('Session Set ok !! ');
|
|
529
530
|
}); //example : /testSetSession?user_name=absunstar
|
|
530
531
|
|
|
531
532
|
site.onGET('/testGetSession', function (req, res) {
|
|
532
|
-
res.end('User Name from session : ' + req.session
|
|
533
|
+
res.end('User Name from session : ' + req.session.user_name);
|
|
533
534
|
}); //example : /testGetSession
|
|
534
535
|
```
|
|
535
536
|
|
package/apps/client-side/app.js
CHANGED
|
@@ -19,12 +19,12 @@ module.exports = function (site) {
|
|
|
19
19
|
name: '/x-js',
|
|
20
20
|
path: __dirname + '/site_files/js',
|
|
21
21
|
public: true,
|
|
22
|
-
parser
|
|
22
|
+
parser: 'js',
|
|
23
23
|
});
|
|
24
24
|
site.get({
|
|
25
25
|
name: ['/x-js/all.js'],
|
|
26
26
|
public: true,
|
|
27
|
-
parser
|
|
27
|
+
parser: 'js',
|
|
28
28
|
path: [
|
|
29
29
|
__dirname + '/site_files/js/first.js',
|
|
30
30
|
__dirname + '/site_files/js/jquery.js',
|
|
@@ -42,7 +42,7 @@ module.exports = function (site) {
|
|
|
42
42
|
site.get({
|
|
43
43
|
name: ['/x-js/all.min.js'],
|
|
44
44
|
public: true,
|
|
45
|
-
parser
|
|
45
|
+
parser: 'js',
|
|
46
46
|
path: [
|
|
47
47
|
__dirname + '/site_files/js/first.js',
|
|
48
48
|
__dirname + '/site_files/js/jquery.js',
|
|
@@ -130,9 +130,10 @@ module.exports = function (site) {
|
|
|
130
130
|
};
|
|
131
131
|
let file = req.files.fileToUpload;
|
|
132
132
|
if (file) {
|
|
133
|
+
console.log(file);
|
|
133
134
|
let newName = 'image_' + new Date().getTime().toString().replace('.', '_') + '.png';
|
|
134
135
|
let newpath = site.dir + '/../../uploads/' + req.params.category + '/images/' + newName;
|
|
135
|
-
site.mv(file.
|
|
136
|
+
site.mv(file.filepath, newpath, function (err) {
|
|
136
137
|
if (err) {
|
|
137
138
|
response.error = err;
|
|
138
139
|
response.done = !1;
|
|
@@ -169,14 +170,16 @@ module.exports = function (site) {
|
|
|
169
170
|
}
|
|
170
171
|
let newName = 'file_' + new Date().getTime() + '.' + site.path.extname(file.name);
|
|
171
172
|
let newpath = site.dir + '/../../uploads/' + req.params.category + '/files/' + newName;
|
|
172
|
-
site.mv(file.
|
|
173
|
+
site.mv(file.filepath, newpath, function (err) {
|
|
173
174
|
if (err) {
|
|
174
175
|
response.error = err;
|
|
175
176
|
response.done = !1;
|
|
176
177
|
}
|
|
177
178
|
response.file = {};
|
|
178
179
|
response.file.url = '/api/file/' + req.params.category + '/' + newName;
|
|
179
|
-
response.file.name = file.
|
|
180
|
+
response.file.name = file.originalFilename;
|
|
181
|
+
response.file.mimetype = file.mimetype;
|
|
182
|
+
response.file.size = file.size;
|
|
180
183
|
res.json(response);
|
|
181
184
|
});
|
|
182
185
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
.dropdown {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: inline-block;
|
|
5
|
+
width: 100%;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
/* Dropdown Content (Hidden by Default) */
|
|
@@ -34,7 +35,8 @@
|
|
|
34
35
|
background-color: var(--theme-color);
|
|
35
36
|
color: #fff;
|
|
36
37
|
}
|
|
37
|
-
.dropdown-content .dropdown-item:hover p
|
|
38
|
+
.dropdown-content .dropdown-item:hover p,
|
|
39
|
+
.dropdown-content .dropdown-item:hover small {
|
|
38
40
|
color: #fff;
|
|
39
41
|
}
|
|
40
42
|
/* Show the dropdown menu on hover */
|
|
@@ -50,12 +52,12 @@
|
|
|
50
52
|
cursor: pointer;
|
|
51
53
|
background: var(--dropdown-background);
|
|
52
54
|
}
|
|
53
|
-
.dropdown-item p{
|
|
55
|
+
.dropdown-item p {
|
|
54
56
|
color: var(--dropdown-color);
|
|
55
57
|
font-size: var(--dropdown-font-size);
|
|
56
58
|
background: transparent;
|
|
57
59
|
}
|
|
58
|
-
.dropdown-item small{
|
|
60
|
+
.dropdown-item small {
|
|
59
61
|
color: var(--dropdown-color2);
|
|
60
62
|
font-size: var(--dropdown-font-size2);
|
|
61
|
-
}
|
|
63
|
+
}
|
|
@@ -136,9 +136,8 @@ textarea:focus {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
fieldset {
|
|
139
|
-
padding:
|
|
140
|
-
margin:
|
|
141
|
-
margin-bottom: 10px;
|
|
139
|
+
padding: var(--fieldset-padding);
|
|
140
|
+
margin: var(--fieldset-margin);
|
|
142
141
|
background: var(--fieldset-background);
|
|
143
142
|
border: var(--fieldset-border);
|
|
144
143
|
}
|
|
@@ -104,9 +104,12 @@ body.print-mode .small {
|
|
|
104
104
|
--legend-color: #000;
|
|
105
105
|
--legend-text-shadow: none;
|
|
106
106
|
}
|
|
107
|
-
|
|
107
|
+
html,
|
|
108
|
+
body,
|
|
109
|
+
.page {
|
|
110
|
+
margin: 0;
|
|
111
|
+
}
|
|
108
112
|
.page {
|
|
109
|
-
/* this section always occupies it's own page or pages. */
|
|
110
113
|
page-break-before: always;
|
|
111
114
|
page-break-after: always;
|
|
112
115
|
page-break-inside: avoid !important;
|
|
@@ -117,7 +120,6 @@ body.print-mode .small {
|
|
|
117
120
|
}
|
|
118
121
|
|
|
119
122
|
.print-start {
|
|
120
|
-
/* elements always start on the top of a new page. */
|
|
121
123
|
page-break-before: always;
|
|
122
124
|
}
|
|
123
125
|
|
|
@@ -125,51 +127,6 @@ body.print-mode .small {
|
|
|
125
127
|
page-break-inside: avoid;
|
|
126
128
|
}
|
|
127
129
|
|
|
128
|
-
h1,
|
|
129
|
-
h2,
|
|
130
|
-
h3,
|
|
131
|
-
h4,
|
|
132
|
-
h5 {
|
|
133
|
-
page-break-after: avoid;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/* @page: first {
|
|
137
|
-
margin: 0;
|
|
138
|
-
}
|
|
139
|
-
@page: blank {
|
|
140
|
-
@top-center {
|
|
141
|
-
content: "This page is intentionally left blank.";
|
|
142
|
-
}
|
|
143
|
-
} */
|
|
144
|
-
|
|
145
|
-
@page {
|
|
146
|
-
size: A4;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
@page: right {
|
|
150
|
-
@top-right {
|
|
151
|
-
content: '';
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@page: right {
|
|
156
|
-
@bottom-right {
|
|
157
|
-
content: '';
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
@page: left {
|
|
162
|
-
@top-left {
|
|
163
|
-
content: '';
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@page: left {
|
|
168
|
-
@bottom-left {
|
|
169
|
-
content: 'Page ' counter(page) ' of ' counter(pages);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
130
|
a {
|
|
174
131
|
font-weight: bolder;
|
|
175
132
|
text-decoration: none;
|
|
@@ -1,148 +1,149 @@
|
|
|
1
1
|
:root {
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
2
|
+
--theme-color: #283e4a;
|
|
3
|
+
--theme-color2: #2f8033;
|
|
4
|
+
--font-family: Droid, Cairo, sans-serif, Tahoma, serif;
|
|
5
|
+
--font-weight: normal;
|
|
6
|
+
--font-size: 14px;
|
|
7
|
+
--line-height: 1.4;
|
|
8
|
+
--float: left;
|
|
9
|
+
--direction: ltr;
|
|
10
|
+
--text-align: left;
|
|
11
|
+
--color: #ffffff;
|
|
12
|
+
--background-color: #607d8b;
|
|
13
|
+
--box-shadow-color: #272727;
|
|
14
|
+
--border: 1px solid #353535;
|
|
15
|
+
--zoom: 90%;
|
|
16
|
+
--user-select: text;
|
|
17
|
+
|
|
18
|
+
--body-background: #607d8b;
|
|
19
|
+
--body-margin-top: 70px;
|
|
20
|
+
--body-margin-bottom: 200px;
|
|
21
|
+
|
|
22
|
+
--h-font-weight: normal;
|
|
23
|
+
|
|
24
|
+
--navbar-color: #fff;
|
|
25
|
+
--navbar-span-color: #ffffff;
|
|
26
|
+
--navbar-background-color: #283e4a;
|
|
27
|
+
--navbar-box-shadow-color: #272727;
|
|
28
|
+
--navbar-li-border-radius: 8px;
|
|
29
|
+
--navbar-li-border: none;
|
|
30
|
+
|
|
31
|
+
--tabs-color: #fff;
|
|
32
|
+
--tabs-background-color: #283e4a;
|
|
33
|
+
--tabs-background-color2: rgb(60, 85, 97);
|
|
34
|
+
--tabs-header-width: 20%;
|
|
35
|
+
--tabs-content-width: 80%;
|
|
36
|
+
--tabs-header-link-color: #ffffff;
|
|
37
|
+
--tabs-header-link-color2: #ffffff;
|
|
38
|
+
--tabs-header-link-background: none;
|
|
39
|
+
--tabs-header-link-border: none;
|
|
40
|
+
--tabs-header-link-border-bottom: none;
|
|
41
|
+
--tabs-header-link-radius: 4px;
|
|
42
|
+
--tab-animation-name: animatetabs;
|
|
43
|
+
--tab-animation-duration: 0.5s;
|
|
44
|
+
|
|
45
|
+
--treeview-color: #ffffff;
|
|
46
|
+
--treeview-color2: #ffffff;
|
|
47
|
+
--treeview-background-color: none;
|
|
48
|
+
--treeview-border-color: #000000;
|
|
49
|
+
--treeview-background-color2: rgb(60, 85, 97);
|
|
50
|
+
--treeview-display-color: #0000ff;
|
|
51
|
+
|
|
52
|
+
--form-color: #ffffff;
|
|
53
|
+
--form-background-color: none;
|
|
54
|
+
--label-font-size: 12px;
|
|
55
|
+
--label-font-weight: bold;
|
|
56
|
+
--label-text-align: center;
|
|
57
|
+
|
|
58
|
+
--input-color: #ffeb3b;
|
|
59
|
+
--input-background-color: #3c5d6f;
|
|
60
|
+
--input-height: 33px;
|
|
61
|
+
--input-padding: 6px 12px;
|
|
62
|
+
--input-font-size: 14px;
|
|
63
|
+
--input-font-wight: bold;
|
|
64
|
+
--input-border-radius: 4px;
|
|
65
|
+
--input-border-width: 1px;
|
|
66
|
+
--input-border-color: #272727;
|
|
67
|
+
--input-focus-border-width: 2px;
|
|
68
|
+
--input-focus-border-color: var(--input-color);
|
|
69
|
+
|
|
70
|
+
--textarea-border-width: 1px;
|
|
71
|
+
--select-appearance: menulist;
|
|
72
|
+
--select-font-size: 14px;
|
|
73
|
+
--select-color: #000000;
|
|
74
|
+
--select-height: 33px;
|
|
75
|
+
|
|
76
|
+
--btn-color: #ffffff;
|
|
77
|
+
--btn-background: #283e4a;
|
|
78
|
+
--btn-add-color: #ffffff;
|
|
79
|
+
--btn-add-background-color: #118011;
|
|
80
|
+
--btn-update-color: #ffffff;
|
|
81
|
+
--btn-update-background-color: #117380;
|
|
82
|
+
--btn-save-color: #ffffff;
|
|
83
|
+
--btn-save-background-color: #117380;
|
|
84
|
+
--btn-delete-color: #ffffff;
|
|
85
|
+
--btn-delete-background-color: #801117;
|
|
86
|
+
--btn-view-color: #ffffff;
|
|
87
|
+
--btn-view-background-color: #451180;
|
|
88
|
+
--btn-exit-color: #ffffff;
|
|
89
|
+
--btn-exit-background-color: #811e1e;
|
|
90
|
+
--btn-search-color: #ffffff;
|
|
91
|
+
--btn-search-background-color: #243688;
|
|
92
|
+
--btn-print-color: #ffffff;
|
|
93
|
+
--btn-print-background-color: #000000;
|
|
94
|
+
--btn-export-color: #000000;
|
|
95
|
+
--btn-export-background-color: #ffffff;
|
|
96
|
+
--btn-sgin-color: #283e4a;
|
|
97
|
+
--btn-sgin-background-color: #ffffff;
|
|
98
|
+
--btn-box-shadow-color: #272727;
|
|
99
|
+
--btn-border-radius: 5px;
|
|
100
|
+
|
|
101
|
+
--i-image-border: 2px dashed var(--modal-header-background-color);
|
|
102
|
+
--i-image-view-border: 2px solid var(--modal-header-background-color);
|
|
103
|
+
|
|
104
|
+
--fieldset-border: 2px solid #283e4a;
|
|
105
|
+
--fieldset-background: none;
|
|
106
|
+
--fieldset-margin : 10px;
|
|
107
|
+
--fieldset-padding : 5px;
|
|
108
|
+
--legend-color: #fff;
|
|
109
|
+
--legend-text-shadow: none;
|
|
110
|
+
--legend-font-size: 16px;
|
|
111
|
+
--legend-font-weight: bold;
|
|
112
|
+
--legend-border: none;
|
|
113
|
+
|
|
114
|
+
--modal-background: rgba(0, 0, 0, 0.6);
|
|
115
|
+
--modal-content-background: #607d8b;
|
|
116
|
+
--modal-content-border: none;
|
|
117
|
+
--modal-color: #000;
|
|
118
|
+
--modal-animation-name: animatetop;
|
|
119
|
+
--modal-animation-duration: 0.4s;
|
|
120
|
+
--modal-header-color: #000000;
|
|
121
|
+
--modal-footer-color: #000000;
|
|
122
|
+
--modal-header-background-color: #283e4a;
|
|
123
|
+
--modal-footer-background-color: #bbb;
|
|
124
|
+
--modal-box-shadow-color: #000000;
|
|
125
|
+
|
|
126
|
+
--table-color: #030303;
|
|
127
|
+
--table-background-color: #ffffff;
|
|
128
|
+
--table-border: 1px solid #bbb;
|
|
129
|
+
--table-hover-background-color: yellow;
|
|
130
|
+
--table-th-color: #fff;
|
|
131
|
+
|
|
132
|
+
--help-height: 110px;
|
|
133
|
+
--help-border: none;
|
|
134
|
+
--help-border-radius: 10px;
|
|
135
|
+
--help-background-color: #283e4a;
|
|
136
|
+
--help-opacity: 1;
|
|
137
|
+
--help-content-color: #ffffff;
|
|
138
|
+
|
|
139
|
+
--main-menu-item-padding: 2px;
|
|
140
|
+
--main-menu-item-border: 1px solid #ddd;
|
|
141
|
+
--main-menu-item-border-radius: 0px;
|
|
142
|
+
--main-menu-item-background-color: #283e4a;
|
|
143
|
+
--main-menu-h2-color: #ffffff;
|
|
144
|
+
--main-menu-p-color: #ffffff;
|
|
145
|
+
|
|
146
|
+
--scrollbar-background-color: #272727;
|
|
147
|
+
--scrollbar-color: #ffeb3b;
|
|
148
|
+
--scrollbar-box-shadow-color: #4caf50;
|
|
148
149
|
}
|
|
@@ -133,6 +133,8 @@
|
|
|
133
133
|
|
|
134
134
|
--fieldset-border: 1px solid var(--theme-color);
|
|
135
135
|
--fieldset-background: none;
|
|
136
|
+
--fieldset-margin : 10px;
|
|
137
|
+
--fieldset-padding : 5px;
|
|
136
138
|
--legend-color: var(--theme-color);
|
|
137
139
|
--legend-text-shadow: none;
|
|
138
140
|
--legend-font-size: 18px;
|
|
@@ -171,7 +173,7 @@
|
|
|
171
173
|
--main-menu-h2-color: #000;
|
|
172
174
|
--main-menu-p-color: #000;
|
|
173
175
|
|
|
174
|
-
--scrollbar-background-color:
|
|
175
|
-
--scrollbar-color: #
|
|
176
|
-
--scrollbar-box-shadow-color: #
|
|
176
|
+
--scrollbar-background-color: #272727;
|
|
177
|
+
--scrollbar-color: #ffeb3b;
|
|
178
|
+
--scrollbar-box-shadow-color: #4caf50;
|
|
177
179
|
}
|