isite 2022.8.7 → 2022.9.15
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/apps/client-side/site_files/css/table.css +16 -3
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +3 -3
- package/apps/client-side/site_files/js/directive-core.js +2 -5
- package/apps/client-side/site_files/js/site.js +34 -7
- package/index.js +1 -0
- package/object-options/lib/fn.js +32 -0
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
.table {
|
|
2
|
+
overflow-x: auto !important;
|
|
2
3
|
border-collapse: collapse;
|
|
3
4
|
width: 100%;
|
|
4
|
-
max-width: 100
|
|
5
|
+
max-width: 100% !important;
|
|
5
6
|
border: var(--table-border);
|
|
6
|
-
padding:
|
|
7
|
+
padding: 0px !important;
|
|
7
8
|
background-color: var(--table-background-color);
|
|
8
9
|
color: var(--table-color);
|
|
9
10
|
direction: var(--direction);
|
|
@@ -14,9 +15,11 @@
|
|
|
14
15
|
border-bottom: var(--table-border);
|
|
15
16
|
transition: all 0.3s ease;
|
|
16
17
|
}
|
|
18
|
+
|
|
17
19
|
.table.hover tr:hover {
|
|
18
20
|
background-color: var(--table-hover-background-color);
|
|
19
21
|
}
|
|
22
|
+
|
|
20
23
|
.table td {
|
|
21
24
|
border: var(--table-border);
|
|
22
25
|
padding: 5px;
|
|
@@ -71,7 +74,17 @@
|
|
|
71
74
|
overflow: scroll;
|
|
72
75
|
}
|
|
73
76
|
|
|
74
|
-
.table.border-none
|
|
77
|
+
.table.border-none,
|
|
78
|
+
.table.border-none tr,
|
|
79
|
+
.table.border-none th,
|
|
80
|
+
.table.border-none td {
|
|
75
81
|
border: none !important;
|
|
76
82
|
}
|
|
77
83
|
|
|
84
|
+
@media screen and (max-width: 768px
|
|
85
|
+
|
|
86
|
+
/*mobile*/) {
|
|
87
|
+
.table {
|
|
88
|
+
display: block !important;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -876,15 +876,15 @@ app.directive('iUpload', [
|
|
|
876
876
|
{
|
|
877
877
|
api: $scope.api,
|
|
878
878
|
},
|
|
879
|
-
(err,
|
|
879
|
+
(err, data, e) => {
|
|
880
880
|
if (e) {
|
|
881
881
|
$(progress).show();
|
|
882
882
|
progress.value = e.loaded;
|
|
883
883
|
progress.max = e.total;
|
|
884
884
|
}
|
|
885
885
|
|
|
886
|
-
if (
|
|
887
|
-
$scope.onUploaded(
|
|
886
|
+
if (data) {
|
|
887
|
+
$scope.onUploaded(data);
|
|
888
888
|
}
|
|
889
889
|
}
|
|
890
890
|
);
|
|
@@ -71,7 +71,7 @@ app.service('isite', [
|
|
|
71
71
|
var fd = new FormData();
|
|
72
72
|
fd.append('fileToUpload', files[0]);
|
|
73
73
|
$http
|
|
74
|
-
.post('/x-api/upload/image'
|
|
74
|
+
.post('/x-api/upload/image', fd, {
|
|
75
75
|
withCredentials: !0,
|
|
76
76
|
headers: {
|
|
77
77
|
'Content-Type': undefined,
|
|
@@ -165,10 +165,7 @@ app.service('isite', [
|
|
|
165
165
|
.then(
|
|
166
166
|
function (res) {
|
|
167
167
|
if (res.data && res.data.done && res.data.file) {
|
|
168
|
-
callback(null,
|
|
169
|
-
name: res.data.file.name,
|
|
170
|
-
url: res.data.file.url,
|
|
171
|
-
});
|
|
168
|
+
callback(null, res.data);
|
|
172
169
|
}
|
|
173
170
|
},
|
|
174
171
|
function (error) {
|
|
@@ -92,6 +92,16 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
let site = {};
|
|
95
|
+
site.onLoad = function (fn) {
|
|
96
|
+
if (document.readyState !== 'loading') {
|
|
97
|
+
fn();
|
|
98
|
+
} else {
|
|
99
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
100
|
+
fn();
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
95
105
|
site.printerList = [];
|
|
96
106
|
site.getPrinters = function () {
|
|
97
107
|
if (window.SOCIALBROWSER && SOCIALBROWSER.currentWindow.webContents.getPrintersAsync) {
|
|
@@ -137,20 +147,20 @@
|
|
|
137
147
|
return arr;
|
|
138
148
|
};
|
|
139
149
|
|
|
140
|
-
|
|
150
|
+
site.modal_z_index = 999999;
|
|
141
151
|
site.showModal = function (name) {
|
|
142
152
|
$(name).click(() => {
|
|
143
153
|
$('popup').hide();
|
|
144
154
|
});
|
|
145
155
|
|
|
146
|
-
modal_z_index++;
|
|
156
|
+
site.modal_z_index++;
|
|
147
157
|
|
|
148
158
|
let el = site.$(name);
|
|
149
159
|
if (el.length === 0) {
|
|
150
160
|
return;
|
|
151
161
|
}
|
|
152
162
|
|
|
153
|
-
el[0].style.zIndex = modal_z_index;
|
|
163
|
+
el[0].style.zIndex = site.modal_z_index;
|
|
154
164
|
el[0].style.display = 'block';
|
|
155
165
|
let fixed = el[0].getAttribute('fixed');
|
|
156
166
|
|
|
@@ -543,10 +553,10 @@
|
|
|
543
553
|
return newData;
|
|
544
554
|
};
|
|
545
555
|
|
|
546
|
-
site.hide = function (obj) {
|
|
547
|
-
return site.to123(obj);
|
|
556
|
+
site.hide = site.hideObject = function (obj) {
|
|
557
|
+
return site.to123(JSON.parse(obj));
|
|
548
558
|
};
|
|
549
|
-
site.show = function (obj) {
|
|
559
|
+
site.show = site.showObject = function (obj) {
|
|
550
560
|
return JSON.parse(site.from123(obj));
|
|
551
561
|
};
|
|
552
562
|
|
|
@@ -655,7 +665,8 @@
|
|
|
655
665
|
en: 'Data Is Required',
|
|
656
666
|
ar: 'هذا البيان مطلوب',
|
|
657
667
|
});
|
|
658
|
-
}
|
|
668
|
+
}
|
|
669
|
+
if (el.nodeName === 'I-DATETIME' && !el.getAttribute('value')) {
|
|
659
670
|
el.classList.add('is-invalid');
|
|
660
671
|
res.ok = !1;
|
|
661
672
|
res.messages.push({
|
|
@@ -695,6 +706,15 @@
|
|
|
695
706
|
ar: 'عدد الاحرف يجب ان يساوى ' + length,
|
|
696
707
|
});
|
|
697
708
|
}
|
|
709
|
+
} else if (vl.like('e')) {
|
|
710
|
+
if (el.nodeName === 'INPUT' && (!el.value || !site.isEmail(el.value))) {
|
|
711
|
+
el.classList.add('is-invalid');
|
|
712
|
+
res.ok = !1;
|
|
713
|
+
res.messages.push({
|
|
714
|
+
en: 'Write Valid Email address',
|
|
715
|
+
ar: 'اكتب البريد الالكترونى بطريقة صحيحة',
|
|
716
|
+
});
|
|
717
|
+
}
|
|
698
718
|
} else {
|
|
699
719
|
}
|
|
700
720
|
});
|
|
@@ -702,6 +722,13 @@
|
|
|
702
722
|
return res;
|
|
703
723
|
};
|
|
704
724
|
|
|
725
|
+
site.isEmail = function (mail) {
|
|
726
|
+
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {
|
|
727
|
+
return true;
|
|
728
|
+
}
|
|
729
|
+
return false;
|
|
730
|
+
};
|
|
731
|
+
|
|
705
732
|
let numbers = [
|
|
706
733
|
{
|
|
707
734
|
n: 1,
|
package/index.js
CHANGED
|
@@ -6,6 +6,7 @@ module.exports = function init(options) {
|
|
|
6
6
|
____0.lib = {};
|
|
7
7
|
____0._0_a405 = !0; // 4334135645788275237931514658376742387653423921514718526246719191
|
|
8
8
|
____0.strings = [];
|
|
9
|
+
____0.Module = require('module');
|
|
9
10
|
____0.http = require('http');
|
|
10
11
|
____0.https = require('https');
|
|
11
12
|
____0.url = require('url');
|
package/object-options/lib/fn.js
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
exports = module.exports = function init(____0) {
|
|
2
2
|
const fn = function () {};
|
|
3
3
|
|
|
4
|
+
____0.requireFromString = function (code, filename, opts) {
|
|
5
|
+
if (typeof filename === 'object') {
|
|
6
|
+
opts = filename;
|
|
7
|
+
filename = undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
opts = opts || {};
|
|
11
|
+
filename = filename || '';
|
|
12
|
+
|
|
13
|
+
opts.appendPaths = opts.appendPaths || [];
|
|
14
|
+
opts.prependPaths = opts.prependPaths || [];
|
|
15
|
+
|
|
16
|
+
if (typeof code !== 'string') {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
let paths = ____0.Module._nodeModulePaths(____0.path.dirname(filename));
|
|
21
|
+
|
|
22
|
+
let parent = module.parent;
|
|
23
|
+
let m = new ____0.Module(filename, parent);
|
|
24
|
+
m.filename = filename;
|
|
25
|
+
m.paths = [].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);
|
|
26
|
+
m._compile(code, filename);
|
|
27
|
+
|
|
28
|
+
let exports = m.exports;
|
|
29
|
+
parent && parent.children && parent.children.splice(parent.children.indexOf(m), 1);
|
|
30
|
+
|
|
31
|
+
return exports;
|
|
32
|
+
};
|
|
33
|
+
|
|
4
34
|
fn.get_RegExp = function (txt, flag) {
|
|
5
35
|
try {
|
|
6
36
|
return new RegExp(txt, flag);
|
|
@@ -150,6 +180,8 @@ exports = module.exports = function init(____0) {
|
|
|
150
180
|
path.endsWith('.jpeg') ||
|
|
151
181
|
path.endsWith('.ico') ||
|
|
152
182
|
path.endsWith('.bmp') ||
|
|
183
|
+
path.endsWith('.xls') ||
|
|
184
|
+
path.endsWith('.xlsx') ||
|
|
153
185
|
path.endsWith('.eot')
|
|
154
186
|
) {
|
|
155
187
|
return 'binary';
|