isite 2021.12.13 → 2022.1.11
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 +6 -5
- 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 +3 -4
- package/apps/client-side/site_files/css/print.css +4 -4
- package/apps/client-side/site_files/css/table.css +1 -7
- 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/apps/client-side/site_files/js/custom.js +3 -3
- package/apps/security/site_files/js/navbar.js +1 -1
- package/index.js +277 -293
- package/isite_files/js/custom.js +3 -3
- 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/mongodb.js +87 -82
- package/lib/parser.js +17 -11
- package/lib/routing.js +41 -15
- package/lib/security.js +1081 -1045
- package/lib/session.js +13 -78
- package/lib/sessions.js +22 -37
- package/lib/strings.js +1 -1
- package/object-options/index.js +3 -1
- package/package.json +5 -4
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
|
|
|
@@ -1116,7 +1117,7 @@ site.onGET('/files/file1.zip', (req, res) => {
|
|
|
1116
1117
|
$scope.changeLang = function (lang) {
|
|
1117
1118
|
$http({
|
|
1118
1119
|
method: 'POST',
|
|
1119
|
-
url: '
|
|
1120
|
+
url: '/x-language/change',
|
|
1120
1121
|
data: { name: lang },
|
|
1121
1122
|
}).then(function (response) {
|
|
1122
1123
|
if (response.data.done) {
|
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
|
+
}
|
|
@@ -21,7 +21,7 @@ form p {
|
|
|
21
21
|
color: var(--form-color);
|
|
22
22
|
}
|
|
23
23
|
p {
|
|
24
|
-
word-break: break-
|
|
24
|
+
word-break: break-word;
|
|
25
25
|
}
|
|
26
26
|
label {
|
|
27
27
|
font-weight: var(--label-font-weight);
|
|
@@ -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
|
}
|
|
@@ -17,25 +17,25 @@
|
|
|
17
17
|
.width-15-mm {
|
|
18
18
|
min-width: 15mm !important;
|
|
19
19
|
width: 15mm !important;
|
|
20
|
-
white-space:
|
|
20
|
+
white-space: normal;
|
|
21
21
|
max-width: 15mm !important;
|
|
22
22
|
}
|
|
23
23
|
.width-30-mm {
|
|
24
24
|
min-width: 30mm !important;
|
|
25
25
|
width: 30mm !important;
|
|
26
|
-
white-space:
|
|
26
|
+
white-space: normal;
|
|
27
27
|
max-width: 30mm !important;
|
|
28
28
|
}
|
|
29
29
|
.width-60-mm {
|
|
30
30
|
min-width: 60mm !important;
|
|
31
31
|
width: 60mm !important;
|
|
32
|
-
white-space:
|
|
32
|
+
white-space: normal;
|
|
33
33
|
max-width: 60mm !important;
|
|
34
34
|
}
|
|
35
35
|
.width-90-mm {
|
|
36
36
|
min-width: 90mm !important;
|
|
37
37
|
width: 90mm !important;
|
|
38
|
-
white-space:
|
|
38
|
+
white-space: normal;
|
|
39
39
|
max-width: 90mm !important;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
padding: 5px;
|
|
43
43
|
text-align: center;
|
|
44
44
|
font-weight: bold;
|
|
45
|
+
white-space: nowrap;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
.table.center {
|
|
@@ -74,10 +75,3 @@
|
|
|
74
75
|
border: none !important;
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
@media print {
|
|
78
|
-
|
|
79
|
-
table.details {
|
|
80
|
-
font-size: 85%;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
}
|
|
@@ -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
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
$http({
|
|
18
18
|
method: 'POST',
|
|
19
|
-
url: '
|
|
19
|
+
url: '/x-security/api/user/register',
|
|
20
20
|
transformRequest: function (obj) {
|
|
21
21
|
var str = [];
|
|
22
22
|
for (var p in obj)
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
$http({
|
|
53
53
|
method: 'POST',
|
|
54
|
-
url: '
|
|
54
|
+
url: '/x-security/api/user/login',
|
|
55
55
|
transformRequest: function (obj) {
|
|
56
56
|
var str = [];
|
|
57
57
|
for (var p in obj)
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
|
|
84
84
|
$http({
|
|
85
85
|
method: 'POST',
|
|
86
|
-
url: '
|
|
86
|
+
url: '/x-security/api/user/logout',
|
|
87
87
|
transformRequest: function (obj) {
|
|
88
88
|
var str = [];
|
|
89
89
|
for (var p in obj)
|