isite 2022.9.20 → 2022.9.22

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.
@@ -1,199 +1,199 @@
1
1
  .modal {
2
- display: none;
3
- position: fixed;
4
- z-index: 999999;
5
- padding-top: 20px;
6
- padding-bottom: 20px;
7
- left: 0;
8
- top: 0;
9
- right: 0;
10
- width: 100% !important;
11
- height: 100% !important;
12
- max-width: 100% !important;
13
- background-color: var(--modal-background) !important;
14
- overflow: auto;
2
+ display: none;
3
+ position: fixed;
4
+ z-index: 999999;
5
+ padding-top: 20px;
6
+ padding-bottom: 20px;
7
+ left: 0;
8
+ top: 0;
9
+ right: 0;
10
+ width: 100% !important;
11
+ height: 100% !important;
12
+ max-width: 100% !important;
13
+ background-color: var(--modal-background) !important;
14
+ overflow: auto;
15
15
  }
16
16
 
17
17
  .modal-content {
18
- border: var(---modal-content-border);
19
- position: relative;
20
- color: var(--modal-color);
21
- background-color: var(--modal-content-background);
22
- margin: auto;
23
- padding: 0;
24
- width: 90vw;
25
- height: auto !important;
26
- box-shadow: 0 4px 8px 0 var(--modal-box-shadow-color), 0 6px 20px 0 var(--modal-box-shadow-color);
27
- -webkit-animation-name: var(--modal-animation-name);
28
- -webkit-animation-duration: var(--modal-animation-duration);
29
- animation-name: var(--modal-animation-name);
30
- animation-duration: var(--modal-animation-duration);
18
+ border: var(---modal-content-border);
19
+ position: relative;
20
+ color: var(--modal-color);
21
+ background-color: var(--modal-content-background);
22
+ margin: auto;
23
+ padding: 0;
24
+ width: 90vw;
25
+ height: auto !important;
26
+ box-shadow: 0 4px 8px 0 var(--modal-box-shadow-color), 0 6px 20px 0 var(--modal-box-shadow-color);
27
+ -webkit-animation-name: var(--modal-animation-name);
28
+ -webkit-animation-duration: var(--modal-animation-duration);
29
+ animation-name: var(--modal-animation-name);
30
+ animation-duration: var(--modal-animation-duration);
31
31
  }
32
32
 
33
33
  .modal.small .modal-content,
34
34
  .modal-content.small {
35
- width: 50%;
35
+ width: 50%;
36
36
  }
37
37
 
38
38
  .modal-header {
39
- padding: 8px 16px;
40
- background-color: var(--modal-header-background-color);
41
- color: var(--modal-header-color);
39
+ padding: 8px 16px;
40
+ background-color: var(--modal-header-background-color);
41
+ color: var(--modal-header-color);
42
42
  }
43
43
 
44
44
  .modal-body {
45
- display: contents;
46
- color: var(--modal-color);
47
- overflow: visible;
45
+ display: contents;
46
+ color: var(--modal-color);
47
+ overflow: visible;
48
48
  }
49
49
 
50
50
  .modal-footer {
51
- padding: 2px 16px;
52
- color: var(--modal-footer-color);
51
+ padding: 2px 16px;
52
+ color: var(--modal-footer-color);
53
53
  }
54
54
 
55
55
  @-webkit-keyframes animatetop {
56
- from {
57
- top: -300px;
58
- opacity: 0;
59
- }
60
- to {
61
- top: 0;
62
- opacity: 1;
63
- }
56
+ from {
57
+ top: -300px;
58
+ opacity: 0;
59
+ }
60
+ to {
61
+ top: 0;
62
+ opacity: 1;
63
+ }
64
64
  }
65
65
 
66
66
  @keyframes animatetop {
67
- from {
68
- top: -300px;
69
- opacity: 0;
70
- }
71
- to {
72
- top: 0;
73
- opacity: 1;
74
- }
67
+ from {
68
+ top: -300px;
69
+ opacity: 0;
70
+ }
71
+ to {
72
+ top: 0;
73
+ opacity: 1;
74
+ }
75
75
  }
76
76
 
77
77
  @-webkit-keyframes animatebottom {
78
- from {
79
- top: 1000px;
80
- opacity: 0;
81
- }
82
- to {
83
- top: 0;
84
- opacity: 1;
85
- }
78
+ from {
79
+ top: 1000px;
80
+ opacity: 0;
81
+ }
82
+ to {
83
+ top: 0;
84
+ opacity: 1;
85
+ }
86
86
  }
87
87
 
88
88
  @keyframes animatebottom {
89
- from {
90
- top: 1000px;
91
- opacity: 0;
92
- }
93
- to {
94
- top: 0;
95
- opacity: 1;
96
- }
89
+ from {
90
+ top: 1000px;
91
+ opacity: 0;
92
+ }
93
+ to {
94
+ top: 0;
95
+ opacity: 1;
96
+ }
97
97
  }
98
98
 
99
99
  @-webkit-keyframes animateleft {
100
- from {
101
- left: -300px;
102
- opacity: 0;
103
- }
104
- to {
105
- left: 0;
106
- opacity: 1;
107
- }
100
+ from {
101
+ left: -300px;
102
+ opacity: 0;
103
+ }
104
+ to {
105
+ left: 0;
106
+ opacity: 1;
107
+ }
108
108
  }
109
109
 
110
110
  @keyframes animateleft {
111
- from {
112
- left: -300px;
113
- opacity: 0;
114
- }
115
- to {
116
- left: 0;
117
- opacity: 1;
118
- }
111
+ from {
112
+ left: -300px;
113
+ opacity: 0;
114
+ }
115
+ to {
116
+ left: 0;
117
+ opacity: 1;
118
+ }
119
119
  }
120
120
 
121
121
  @-webkit-keyframes animateopacity {
122
- from {
123
- opacity: 0;
124
- }
125
- to {
126
- opacity: 1;
127
- }
122
+ from {
123
+ opacity: 0;
124
+ }
125
+ to {
126
+ opacity: 1;
127
+ }
128
128
  }
129
129
 
130
130
  @keyframes animateopacity {
131
- from {
132
- opacity: 0;
133
- }
134
- to {
135
- opacity: 1;
136
- }
131
+ from {
132
+ opacity: 0;
133
+ }
134
+ to {
135
+ opacity: 1;
136
+ }
137
137
  }
138
138
 
139
139
  .modal-header .close {
140
- color: var(--modal-color);
141
- float: right;
142
- font-size: 26px;
143
- margin-top: -10px;
144
- font-weight: bold;
140
+ color: var(--modal-color);
141
+ float: right;
142
+ font-size: 26px;
143
+ margin-top: -10px;
144
+ font-weight: bold;
145
145
  }
146
146
 
147
147
  .modal-header .close:hover,
148
148
  .modal-header .close:focus {
149
- color: rgb(221, 17, 17);
150
- text-decoration: none;
151
- cursor: pointer;
149
+ color: rgb(221, 17, 17);
150
+ text-decoration: none;
151
+ cursor: pointer;
152
152
  }
153
153
  .modal-header h2 {
154
- font-size: 16px;
155
- text-align: center;
156
- padding: 0px;
157
- margin: 0px;
158
- color: #ffffff;
159
- font-weight: bold;
154
+ font-size: 16px;
155
+ text-align: center;
156
+ padding: 0px;
157
+ margin: 0 auto;
158
+ color: #ffffff;
159
+ font-weight: bold;
160
160
  }
161
161
 
162
162
  .popup {
163
- overflow: auto;
164
- display: block;
165
- padding: 5px;
166
- box-shadow: 1px 1px 10px 1px #000;
167
- z-index: 4000;
168
- max-height: 250px;
169
- position: fixed;
170
- background: var(--modal-content-background);
171
- min-width: 250px;
172
- -webkit-animation-name: animatepopup;
173
- -webkit-animation-duration: 0.5s;
174
- animation-name: animatepopup;
175
- animation-duration: 0.5s;
163
+ overflow: auto;
164
+ display: block;
165
+ padding: 5px;
166
+ box-shadow: 1px 1px 10px 1px #000;
167
+ z-index: 4000;
168
+ max-height: 250px;
169
+ position: fixed;
170
+ background: var(--modal-content-background);
171
+ min-width: 250px;
172
+ -webkit-animation-name: animatepopup;
173
+ -webkit-animation-duration: 0.5s;
174
+ animation-name: animatepopup;
175
+ animation-duration: 0.5s;
176
176
  }
177
177
 
178
178
  .popup item {
179
- display: block;
180
- padding: 5px;
181
- color: var(--input-color);
182
- font-weight: bold;
183
- cursor: pointer;
179
+ display: block;
180
+ padding: 5px;
181
+ color: var(--input-color);
182
+ font-weight: bold;
183
+ cursor: pointer;
184
184
  }
185
185
 
186
186
  .popup item:hover {
187
- background: var(--theme-color);
188
- color: #ffffff;
187
+ background: var(--theme-color);
188
+ color: #ffffff;
189
189
  }
190
190
 
191
191
  .popup .search-box {
192
- background-color: var(--modal-header-background-color);
193
- border: var(--border);
194
- overflow: hidden;
195
- position: relative;
196
- width: 100%;
192
+ background-color: var(--modal-header-background-color);
193
+ border: var(--border);
194
+ overflow: hidden;
195
+ position: relative;
196
+ width: 100%;
197
197
  }
198
198
  .popup .search-box .icon-close {
199
199
  height: 100%;
@@ -202,7 +202,7 @@
202
202
  background: red;
203
203
  }
204
204
 
205
- .popup .search-box .icon-close i{
205
+ .popup .search-box .icon-close i {
206
206
  height: 100%;
207
207
  position: absolute;
208
208
  left: 35%;
@@ -216,7 +216,7 @@
216
216
  position: absolute;
217
217
  background: red;
218
218
  }
219
- .popup .search-box .icon-search i{
219
+ .popup .search-box .icon-search i {
220
220
  height: 100%;
221
221
  position: absolute;
222
222
  left: 35%;
@@ -225,31 +225,29 @@
225
225
  background: green;
226
226
  }
227
227
 
228
-
229
228
  @-webkit-keyframes animatepopup {
230
- from {
231
- opacity: 0;
232
- }
233
- to {
234
- opacity: 1;
235
- }
229
+ from {
230
+ opacity: 0;
231
+ }
232
+ to {
233
+ opacity: 1;
234
+ }
236
235
  }
237
236
 
238
237
  @keyframes animatepopup {
239
- from {
240
- opacity: 0;
241
- }
242
- to {
243
- opacity: 1;
244
- }
238
+ from {
239
+ opacity: 0;
240
+ }
241
+ to {
242
+ opacity: 1;
243
+ }
245
244
  }
246
245
 
247
246
  /* Mobile */
248
247
  @media screen and (max-width: 480px) {
249
- .modal.small .modal-content,
250
- .modal-content.small {
251
- width: 95vw;
252
- margin: 2vw !important;
253
- }
254
-
248
+ .modal.small .modal-content,
249
+ .modal-content.small {
250
+ width: 95vw;
251
+ margin: 2vw !important;
255
252
  }
253
+ }
@@ -1,12 +1,13 @@
1
1
  ::-webkit-scrollbar {
2
- width: 10px;
2
+ width: var(--scrollbar-width);
3
3
  }
4
4
 
5
5
  ::-webkit-scrollbar-track {
6
- -webkit-box-shadow: inset 0 0 6px var(--scrollbar-box-shadow-color);
6
+ -webkit-box-shadow: var(--scrollbar-box-shadow);
7
+ box-shadow: var(--scrollbar-box-shadow);
7
8
  }
8
9
 
9
10
  ::-webkit-scrollbar-thumb {
10
11
  background-color: var(--scrollbar-background-color);
11
- outline: 1px solid var(--scrollbar-color);
12
+ outline: var(--scrollbar-outline);
12
13
  }
@@ -143,7 +143,9 @@
143
143
  --main-menu-h2-color: #ffffff;
144
144
  --main-menu-p-color: #ffffff;
145
145
 
146
- --scrollbar-background-color: #272727;
146
+ --scrollbar-width : 10px;
147
147
  --scrollbar-color: #ffeb3b;
148
- --scrollbar-box-shadow-color: #4caf50;
148
+ --scrollbar-outline:1px solid var(--scrollbar-color);
149
+ --scrollbar-background-color: #272727;
150
+ --scrollbar-box-shadow: inset 0 0 6px #4caf50;
149
151
  }
@@ -173,7 +173,9 @@
173
173
  --main-menu-h2-color: #000;
174
174
  --main-menu-p-color: #000;
175
175
 
176
- --scrollbar-background-color: #272727;
176
+ --scrollbar-width : 10px;
177
177
  --scrollbar-color: #ffeb3b;
178
- --scrollbar-box-shadow-color: #4caf50;
178
+ --scrollbar-outline:1px solid var(--scrollbar-color);
179
+ --scrollbar-background-color: #272727;
180
+ --scrollbar-box-shadow: inset 0 0 6px #4caf50;
179
181
  }
@@ -6,6 +6,18 @@
6
6
  -moz-user-select: none;
7
7
  -ms-user-select: none;
8
8
  }
9
+ .treeview .main-node{
10
+ display: block;
11
+ }
12
+ .treeview .main-node > i{
13
+ display: inline-block;
14
+ }
15
+ .treeview .main-node > h2{
16
+ display: inline-block;
17
+ }
18
+ .treeview .main-node > i-button{
19
+ display: inline-block;
20
+ }
9
21
 
10
22
  .treeview i-treenode ul{
11
23
  transition: all linear .3s;
@@ -18,6 +30,7 @@
18
30
 
19
31
  .treeview .actions {
20
32
  display: inline-block;
33
+ width: auto;
21
34
  }
22
35
 
23
36
  .treeview ul {
@@ -49,10 +62,12 @@
49
62
  font-size: 14px;
50
63
  font-weight: bold;
51
64
  cursor: pointer;
52
- padding: 5px;
65
+ padding: 10px 10px;
53
66
  border-radius: 5px;
54
67
  transition: all ease-out .2s;
55
- -webkit-transition:all ease-out .2s;
68
+ -webkit-transition: all ease-out .2s;
69
+ display: inline-block;
70
+ width: auto;
56
71
  }
57
72
 
58
73
  .treenode li span.text:hover {
@@ -63,6 +78,4 @@
63
78
  .treenode li .selected {
64
79
  background: var(--treeview-background-color2);
65
80
  color: var(--treeview-color2);
66
- border-radius: 5px;
67
- padding: 5px;
68
81
  }
@@ -1,4 +1,4 @@
1
- <button class="btn {{class}}" type="button" ng-click="click()" ng-disabled="busy">
1
+ <button class="btn {{class}} {{class2}}" type="button" ng-click="click()" ng-disabled="busy">
2
2
  <span ng-show="busy" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
3
3
  {{label}}
4
4
  <i class="{{fa}}"></i>
@@ -1,10 +1,10 @@
1
1
  <div class="treenode">
2
2
  <ul>
3
3
  <li ng-repeat="node in nodes">
4
- <div class="row" ng-dblclick="$event.preventDefault();$event.stopPropagation();node.$actions = !0;source.$actions = !1" ng-mouseleave="node.$actions = !1">
4
+ <div class="row" ng-dblclick="$event.preventDefault();$event.stopPropagation();node.$actions = !0;source.$actions = !1" >
5
5
  <span ng-show="node.nodes.length > 0" ng-click="node.$expand = !node.$expand;"> <i ng-hide="node.$expand" class="fa fa-caret-left"></i> <i ng-show="node.$expand" class="fa fa-caret-down"></i> </span>
6
- <span ng-hide="node.nodes.length > 0">
7
- <i class="fa fa-file"></i>
6
+ <span ng-show="node.nodes.length == 0">
7
+ <i class="fas fa-file"></i>
8
8
  </span>
9
9
 
10
10
  <span class="text" ng-class="{'selected' : node.$selected == !0}" ng-click="ngClick($event , node);node.$expand = !node.$expand;selected(node);updateModal(node)"> {{node[display]}} </span>
@@ -1,13 +1,8 @@
1
1
  <div class="treeview">
2
- <ul>
3
- <li ng-dblclick="$event.preventDefault();$event.stopPropagation();source.$actions = !0" ng-mouseleave="source.$actions = !1">
4
- <i ng-hide="openTree" class="fa fa-folder"></i> <i ng-show="openTree" class="fa fa-folder"></i>
5
-
6
- <span ng-click="openTree = !openTree" class="title"> {{label}} <small class="display"> [ {{ngModel.v_display}} ] </small> </span>
7
- <div class="actions" ng-show="source.$actions === !0">
8
- <i-button type="add default" ng-click="ngClick($event , ngModel);ngNode($event , ngModel)"></i-button>
9
- </div>
10
- <i-treenode display="{{display}}" ng-click="ngClick($event)" ng-add="ngAdd()" ng-edit="ngEdit()" ng-delete="ngDelete()" ng-show="openTree" ng-model="ngModel" nodes="v_nodes"></i-treenode>
11
- </li>
12
- </ul>
2
+ <div class="main-node">
3
+ <i class="fas fa-sitemap"></i>
4
+ <h2 class="title">{{label}} <small class="display"> [ {{ngModel.v_display}} ] </small></h2>
5
+ <i-button type="add default" ng-click="ngClick($event , ngModel);ngNode($event , ngModel)"></i-button>
6
+ </div>
7
+ <i-treenode display="{{display}}" ng-click="ngClick($event)" ng-add="ngAdd()" ng-edit="ngEdit()" ng-delete="ngDelete()" ng-model="ngModel" nodes="v_nodes"></i-treenode>
13
8
  </div>
@@ -52,7 +52,7 @@ app.directive('iTextarea', function () {
52
52
  } else {
53
53
  attrs.disabled = '';
54
54
  }
55
- $scope.rows = $scope.rows || 4;
55
+ $scope.rows = $scope.rows || 10;
56
56
  $scope.id2 = $scope.id2 || 'input_' + Math.random().toString().replace('0.', '');
57
57
  $(element)
58
58
  .find('textarea')
@@ -121,6 +121,7 @@ app.directive('iButton', function () {
121
121
  scope: {
122
122
  label: '@',
123
123
  type: '@',
124
+ class2: '@',
124
125
  loading: '@',
125
126
  click: '&',
126
127
  fa: '@',
@@ -167,6 +168,9 @@ app.directive('iButton', function () {
167
168
  if ($scope.type.like('*default*')) {
168
169
  $scope.class = '';
169
170
  }
171
+ if ($scope.class2) {
172
+ $scope.class = $scope.class2;
173
+ }
170
174
  $scope.$watch('loading', (loading) => {
171
175
  if (loading === 'true') {
172
176
  $scope.busy = true;
@@ -367,7 +371,7 @@ app.directive('iChecklist', [
367
371
  link: function ($scope, element, attrs, ctrl) {
368
372
  $scope.primary = $scope.primary || 'id';
369
373
  $scope.display = $scope.display || 'name';
370
- $scope.class2 = $scope.class2 || 'col';
374
+ $scope.class2 = $scope.class2 || 'col3';
371
375
  $scope.selectedItems = [];
372
376
 
373
377
  $scope.$watch('ngModel', (ngModel) => {
@@ -132,6 +132,9 @@
132
132
  .then((res) => res.json())
133
133
  .then((data) => {
134
134
  site.printerList = data.list;
135
+ })
136
+ .catch((err) => {
137
+ site.printerList = [];
135
138
  });
136
139
  }
137
140
 
@@ -682,15 +685,14 @@
682
685
  en: 'Data Is Required',
683
686
  ar: 'هذا البيان مطلوب',
684
687
  });
685
- }
686
- if (el.nodeName === 'I-DATETIME' && !el.getAttribute('value')) {
688
+ } else if (el.nodeName === 'I-DATETIME' && !el.getAttribute('value')) {
687
689
  el.classList.add('is-invalid');
688
690
  res.ok = !1;
689
691
  res.messages.push({
690
692
  en: 'Data Is Required',
691
693
  ar: 'هذا البيان مطلوب',
692
694
  });
693
- } else {
695
+ } else if (el.nodeName === 'INPUT' || el.nodeName === 'SELECT' || el.nodeName === 'TEXTAREA' || el.nodeName === 'I-DATETIME') {
694
696
  el.classList.add('is-valid');
695
697
  }
696
698
  } else if (vl.like('ml*')) {
package/index.js CHANGED
@@ -196,6 +196,7 @@ module.exports = function init(options) {
196
196
  require('./lib/email.js')(____0);
197
197
  require('./lib/integrated.js')(____0);
198
198
  require('./lib/browser.js')(____0);
199
+ require('./lib/helper.js')(____0);
199
200
 
200
201
  //Master Pages
201
202
  ____0.masterPages = [];
@@ -294,6 +295,7 @@ module.exports = function init(options) {
294
295
 
295
296
  ____0.createDir(____0.options.upload_dir);
296
297
  ____0.createDir(____0.options.download_dir);
298
+ ____0.createDir(____0.options.backup_dir);
297
299
  ____0.addfeatures(____0.dir + '/json/features.json');
298
300
 
299
301
  ____0.log('');
package/lib/helper.js ADDED
@@ -0,0 +1,43 @@
1
+ module.exports = function init(____0) {
2
+ ____0.backupDB = function (options, callback) {
3
+ options = options || {};
4
+ callback = callback || function () {};
5
+
6
+ options.db = options.db || ____0.options.mongodb.db;
7
+ options.path = options.path || ____0.options.backup_dir;
8
+ if (!options.path.like('*.gz')) {
9
+ options.path += '/' + options.db + '.gz';
10
+ }
11
+ options.path = ____0.path.resolve(options.path);
12
+ options.cmd = 'mongodump --db=' + options.db + ' --archive=' + options.path + ' --gzip';
13
+ let subProcess = ____0.child_process.spawn('mongodump', ['--db=' + options.db, '--archive=' + options.path, '--gzip']);
14
+
15
+ subProcess.on('exit', (code, signal) => {
16
+ if (code || signal) {
17
+ callback({ message: `Exit With Code [ ${code} ] and signal [ ${signal} ] ` }, options);
18
+ } else {
19
+ callback(null, options);
20
+ }
21
+ });
22
+ };
23
+ ____0.restoreDB = function (options, callback) {
24
+ options = options || {};
25
+ callback = callback || function () {};
26
+
27
+ options.db = options.db || ____0.options.mongodb.db;
28
+ options.path = options.path || ____0.options.backup_dir;
29
+ if (!options.path.like('*.gz')) {
30
+ options.path += '/' + options.db + '.gz';
31
+ }
32
+ options.path = ____0.path.resolve(options.path);
33
+ options.cmd = 'mongorestore --db=' + options.db + ' --archive=' + options.path + ' --gzip --drop';
34
+ let subProcess = ____0.child_process.spawn('mongorestore', ['--db=' + options.db, '--archive=' + options.path, '--gzip' , '--drop']);
35
+ subProcess.on('exit', (code, signal) => {
36
+ if (code || signal) {
37
+ callback({ message: `Exit With Code [ ${code} ] and signal [ ${signal} ] ` }, options);
38
+ } else {
39
+ callback(null, options);
40
+ }
41
+ });
42
+ };
43
+ };