isite 2022.8.1 → 2022.8.2
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/app.js +2 -0
- package/apps/client-side/site_files/css/bootstrap5-addon.css +3 -1
- package/apps/client-side/site_files/css/images.css +2 -6
- package/apps/client-side/site_files/css/layout.css +135 -92
- package/apps/client-side/site_files/html/sub/i-list2.content.html +2 -2
- package/apps/client-side/site_files/js/bootstrap-5-directive.js +155 -150
- package/package.json +1 -1
package/apps/client-side/app.js
CHANGED
|
@@ -155,6 +155,8 @@ module.exports = function (site) {
|
|
|
155
155
|
__dirname + '/site_files/css/layout.css',
|
|
156
156
|
__dirname + '/site_files/css/modal.css',
|
|
157
157
|
__dirname + '/site_files/css/color.css',
|
|
158
|
+
__dirname + '/site_files/css/images.css',
|
|
159
|
+
__dirname + '/site_files/css/dropdown.css',
|
|
158
160
|
__dirname + '/site_files/css/fonts.css',
|
|
159
161
|
__dirname + '/site_files/css/font-droid.css',
|
|
160
162
|
__dirname + '/site_files/css/effect.css',
|
|
@@ -10,10 +10,6 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
13
|
i-image img{
|
|
18
14
|
width : 200px;
|
|
19
15
|
height: 200px;
|
|
@@ -38,8 +34,8 @@ i-image.logo img{
|
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
i-image.photo img{
|
|
41
|
-
width :
|
|
42
|
-
height:
|
|
37
|
+
width : 128px;
|
|
38
|
+
height: 128px;
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
i-image.hover img:hover{
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
@charset "utf-8";
|
|
2
2
|
|
|
3
3
|
* {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
margin: 0px;
|
|
6
|
+
line-height: var(--line-height);
|
|
7
|
+
min-height: 1px;
|
|
8
|
+
text-align: var(--text-align);
|
|
9
|
+
direction: var(--direction);
|
|
10
|
+
max-width: 100%;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
html {
|
|
14
|
-
|
|
14
|
+
background-color: var(--body-background);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
body {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
font-family: var(--font-family);
|
|
19
|
+
font-weight: var(--font-weight);
|
|
20
|
+
font-size: var(--font-size);
|
|
21
|
+
line-height: var(--line-height);
|
|
22
|
+
margin-top: var(--body-margin-top);
|
|
23
|
+
margin-bottom: var(--body-margin-bottom);
|
|
24
|
+
color: var(--color);
|
|
25
|
+
background: var(--body-background);
|
|
26
|
+
zoom: var(--zoom);
|
|
27
|
+
user-select: var(--user-select);
|
|
28
|
+
-webkit-user-select: var(--user-select);
|
|
29
|
+
-moz-user-select: var(--user-select);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
h1,
|
|
@@ -34,43 +34,43 @@ h2,
|
|
|
34
34
|
h3,
|
|
35
35
|
h4,
|
|
36
36
|
h5 {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
font-family: var(--font-family);
|
|
38
|
+
font-weight: var(--h-font-weight);
|
|
39
|
+
line-height: var(--line-height);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.loaded {
|
|
43
|
-
|
|
43
|
+
visibility: collapse;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.hidden {
|
|
47
|
-
|
|
47
|
+
display: none !important;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.hide {
|
|
51
|
-
|
|
51
|
+
visibility: collapse;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.container {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
display: block !important;
|
|
56
|
+
width: 100% !important;
|
|
57
|
+
margin: 0 auto !important;
|
|
58
|
+
padding: 10px !important;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.row,
|
|
62
62
|
.row10 {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
display: inline-block;
|
|
64
|
+
width: 100% !important;
|
|
65
|
+
padding: 0px !important;
|
|
66
|
+
margin: 0px !important;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.row::after,
|
|
70
70
|
.row10::after {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
content: '' !important;
|
|
72
|
+
clear: both !important;
|
|
73
|
+
display: table !important;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.col1,
|
|
@@ -84,7 +84,12 @@ h5 {
|
|
|
84
84
|
.col9,
|
|
85
85
|
.col10,
|
|
86
86
|
.col11,
|
|
87
|
-
.col12
|
|
87
|
+
.col12 {
|
|
88
|
+
vertical-align: top;
|
|
89
|
+
padding: 0px;
|
|
90
|
+
float: var(--float);
|
|
91
|
+
display: inline;
|
|
92
|
+
}
|
|
88
93
|
.col-1,
|
|
89
94
|
.col-2,
|
|
90
95
|
.col-3,
|
|
@@ -97,142 +102,180 @@ h5 {
|
|
|
97
102
|
.col-10,
|
|
98
103
|
.col-11,
|
|
99
104
|
.col-12 {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
+
vertical-align: top;
|
|
106
|
+
padding: 0px;
|
|
107
|
+
margin: 0px;
|
|
108
|
+
float: var(--float);
|
|
109
|
+
display: inline;
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
.row .col1 {
|
|
108
|
-
|
|
113
|
+
width: calc(1 / 13 * 100%);
|
|
109
114
|
}
|
|
110
115
|
|
|
111
116
|
.row .col2 {
|
|
112
|
-
|
|
117
|
+
width: calc(2 / 13 * 100%);
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
.row .col3 {
|
|
116
|
-
|
|
121
|
+
width: calc(3 / 13 * 100%);
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
.row .col4 {
|
|
120
|
-
|
|
125
|
+
width: calc(4 / 13 * 100%);
|
|
121
126
|
}
|
|
122
127
|
|
|
123
128
|
.row .col5 {
|
|
124
|
-
|
|
129
|
+
width: calc(5 / 13 * 100%);
|
|
125
130
|
}
|
|
126
131
|
|
|
127
132
|
.row .col6 {
|
|
128
|
-
|
|
133
|
+
width: calc(6 / 13 * 100%);
|
|
129
134
|
}
|
|
130
135
|
|
|
131
136
|
.row .col7 {
|
|
132
|
-
|
|
137
|
+
width: calc(7 / 13 * 100%);
|
|
133
138
|
}
|
|
134
139
|
|
|
135
140
|
.row .col8 {
|
|
136
|
-
|
|
141
|
+
width: calc(8 / 13 * 100%);
|
|
137
142
|
}
|
|
138
143
|
|
|
139
144
|
.row .col9 {
|
|
140
|
-
|
|
145
|
+
width: calc(9 / 13 * 100%);
|
|
141
146
|
}
|
|
142
147
|
|
|
143
148
|
.row .col10 {
|
|
144
|
-
|
|
149
|
+
width: calc(10 / 13 * 100%);
|
|
145
150
|
}
|
|
146
151
|
|
|
147
152
|
.row .col11 {
|
|
148
|
-
|
|
153
|
+
width: calc(11 / 13 * 100%);
|
|
149
154
|
}
|
|
150
155
|
|
|
151
156
|
.row .col12 {
|
|
152
|
-
|
|
157
|
+
width: calc(12 / 13 * 100%);
|
|
153
158
|
}
|
|
154
159
|
|
|
155
160
|
.col-1 {
|
|
156
|
-
|
|
161
|
+
width: calc(0.9 / 13 * 100%);
|
|
157
162
|
}
|
|
158
163
|
|
|
159
164
|
.col-2 {
|
|
160
|
-
|
|
165
|
+
width: calc(1.9 / 13 * 100%);
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
.col-3 {
|
|
164
|
-
|
|
169
|
+
width: calc(2.9 / 13 * 100%);
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
.col-4 {
|
|
168
|
-
|
|
173
|
+
width: calc(3.9 / 13 * 100%);
|
|
169
174
|
}
|
|
170
175
|
|
|
171
176
|
.col-5 {
|
|
172
|
-
|
|
177
|
+
width: calc(4.9 / 13 * 100%);
|
|
173
178
|
}
|
|
174
179
|
|
|
175
180
|
.col-6 {
|
|
176
|
-
|
|
181
|
+
width: calc(5.9 / 13 * 100%);
|
|
177
182
|
}
|
|
178
183
|
|
|
179
184
|
.col-7 {
|
|
180
|
-
|
|
185
|
+
width: calc(6.9 / 13 * 100%);
|
|
181
186
|
}
|
|
182
187
|
|
|
183
188
|
.col-8 {
|
|
184
|
-
|
|
189
|
+
width: calc(7.9 / 13 * 100%);
|
|
185
190
|
}
|
|
186
191
|
|
|
187
192
|
.col-9 {
|
|
188
|
-
|
|
193
|
+
width: calc(8.9 / 13 * 100%);
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
.col-10 {
|
|
192
|
-
|
|
197
|
+
width: calc(9.9 / 13 * 100%);
|
|
193
198
|
}
|
|
194
199
|
|
|
195
200
|
.col-11 {
|
|
196
|
-
|
|
201
|
+
width: calc(10.9 / 13 * 100%);
|
|
197
202
|
}
|
|
198
203
|
|
|
199
204
|
.col-12 {
|
|
200
|
-
|
|
205
|
+
width: calc(11.9 / 13 * 100%);
|
|
201
206
|
}
|
|
202
207
|
|
|
203
208
|
.rtl {
|
|
204
|
-
|
|
209
|
+
direction: rtl;
|
|
205
210
|
}
|
|
206
211
|
|
|
207
212
|
.ltr {
|
|
208
|
-
|
|
209
|
-
}
|
|
213
|
+
direction: ltr;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Small devices (landscape phones, 576px and down) */
|
|
217
|
+
@media (max-width: 575px) {
|
|
218
|
+
.col1,
|
|
219
|
+
.col2,
|
|
220
|
+
.col3,
|
|
221
|
+
.col4,
|
|
222
|
+
.col5,
|
|
223
|
+
.col6,
|
|
224
|
+
.col7,
|
|
225
|
+
.col8,
|
|
226
|
+
.col9 {
|
|
227
|
+
vertical-align: top;
|
|
228
|
+
width: calc(12 / 13 * 100%) !important;
|
|
229
|
+
}
|
|
210
230
|
|
|
211
|
-
|
|
231
|
+
.desktop {
|
|
232
|
+
display: none !important;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
212
235
|
|
|
213
|
-
/*
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
236
|
+
/* Medium devices (tablets, 768px and down) */
|
|
237
|
+
@media (max-width: 768px) {
|
|
238
|
+
.col1,
|
|
239
|
+
.col2,
|
|
240
|
+
.col3,
|
|
241
|
+
.col4,
|
|
242
|
+
.col5 {
|
|
243
|
+
vertical-align: top;
|
|
244
|
+
width: calc(12 / 13 * 100%) !important;
|
|
245
|
+
}
|
|
217
246
|
}
|
|
218
247
|
|
|
219
|
-
|
|
248
|
+
/* Large devices (desktops, 992px and down) */
|
|
249
|
+
@media (max-width: 992px) {
|
|
250
|
+
.col1,
|
|
251
|
+
.col2,
|
|
252
|
+
.col3,
|
|
253
|
+
.col4,
|
|
254
|
+
.col5 {
|
|
255
|
+
vertical-align: top;
|
|
256
|
+
width: calc(12 / 13 * 100%) !important;
|
|
257
|
+
}
|
|
258
|
+
.mobile {
|
|
259
|
+
display: none !important;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
220
262
|
|
|
221
|
-
/*
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
263
|
+
/* X-Large devices (large desktops, 1200px and down) */
|
|
264
|
+
@media (max-width: 1200px) {
|
|
265
|
+
.col1,
|
|
266
|
+
.col2,
|
|
267
|
+
.col3 {
|
|
268
|
+
vertical-align: top;
|
|
269
|
+
width: calc(12 / 13 * 100%) !important;
|
|
270
|
+
}
|
|
271
|
+
.mobile {
|
|
272
|
+
display: none !important;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
234
275
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
276
|
+
/* XX-Large devices (larger desktops, 1400px and down) */
|
|
277
|
+
@media (max-width: 1400px) {
|
|
278
|
+
.mobile {
|
|
279
|
+
display: none !important;
|
|
280
|
+
}
|
|
238
281
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<div class="dropdown i-list" >
|
|
2
2
|
<div class="control">
|
|
3
3
|
<label> {{label}} </label>
|
|
4
|
-
<input ng-focus="focus()" class="full-width text dropdown-text {{css}}" ng-disabled="disabled" v="{{v}}" readonly ng-model="ngModel.$display" />
|
|
4
|
+
<input ng-focus="focus()" class="full-width text dropdown-text form-control {{css}}" ng-disabled="disabled" v="{{v}}" readonly ng-model="ngModel.$display" />
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<div class="dropdown-content">
|
|
8
8
|
<div class="row padding" ng-show="showSearch">
|
|
9
|
-
<input class="full-width search" ng-model="ngSearch" />
|
|
9
|
+
<input class="full-width search form-control" ng-model="ngSearch" />
|
|
10
10
|
<br />
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -108,7 +108,8 @@ app.directive('iButton', function () {
|
|
|
108
108
|
scope: {
|
|
109
109
|
label: '@',
|
|
110
110
|
type: '@',
|
|
111
|
-
|
|
111
|
+
busy: '@',
|
|
112
|
+
click: '&',
|
|
112
113
|
fa: '@',
|
|
113
114
|
},
|
|
114
115
|
link: function ($scope, element, attrs, ctrl) {
|
|
@@ -134,13 +135,165 @@ app.directive('iButton', function () {
|
|
|
134
135
|
} else {
|
|
135
136
|
$scope.class = 'btn-primary';
|
|
136
137
|
}
|
|
138
|
+
|
|
137
139
|
},
|
|
138
140
|
template: `
|
|
139
|
-
<
|
|
141
|
+
<button class="btn {{class}}" type="button" ng-click="click()" ng-disabled="busy">
|
|
142
|
+
<span ng-show="busy" class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
|
|
143
|
+
{{label}}
|
|
144
|
+
</button>
|
|
140
145
|
`,
|
|
141
146
|
};
|
|
142
147
|
});
|
|
148
|
+
app.directive('iList', [
|
|
149
|
+
'$interval',
|
|
150
|
+
'$timeout',
|
|
151
|
+
'isite',
|
|
152
|
+
function ($interval, $timeout, isite) {
|
|
153
|
+
return {
|
|
154
|
+
restrict: 'E',
|
|
155
|
+
require: 'ngModel',
|
|
156
|
+
scope: {
|
|
157
|
+
v: '@',
|
|
158
|
+
label: '@',
|
|
159
|
+
display: '@',
|
|
160
|
+
display2: '@',
|
|
161
|
+
disabled: '@',
|
|
162
|
+
css: '@',
|
|
163
|
+
space: '@',
|
|
164
|
+
primary: '@',
|
|
165
|
+
ngValue: '@',
|
|
166
|
+
ngModel: '=',
|
|
167
|
+
ngSearch: '=',
|
|
168
|
+
ngChange: '&',
|
|
169
|
+
ngAdd: '&',
|
|
170
|
+
items: '=',
|
|
171
|
+
},
|
|
172
|
+
link: function ($scope, element, attrs, ctrl) {
|
|
173
|
+
$scope.display = attrs.display = attrs.display || 'name';
|
|
174
|
+
$scope.primary = attrs.primary = attrs.primary || 'id';
|
|
175
|
+
attrs.space = attrs.space || ' ';
|
|
176
|
+
attrs.ngValue = attrs.ngValue || '';
|
|
143
177
|
|
|
178
|
+
$scope.searchElement = $(element).find('.dropdown .search');
|
|
179
|
+
$scope.popupElement = $(element).find('.dropdown .dropdown-content');
|
|
180
|
+
|
|
181
|
+
if (typeof attrs.disabled !== 'undefined') {
|
|
182
|
+
attrs.disabled = 'disabled';
|
|
183
|
+
} else {
|
|
184
|
+
attrs.disabled = '';
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
if (typeof attrs.ngAdd == 'undefined') {
|
|
188
|
+
$scope.fa_add = 'fa-search';
|
|
189
|
+
} else {
|
|
190
|
+
$scope.fa_add = 'fa-plus';
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (typeof attrs.ngSearch == 'undefined') {
|
|
194
|
+
$scope.showSearch = !1;
|
|
195
|
+
} else {
|
|
196
|
+
$scope.showSearch = !0;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
let input = $(element).find('input');
|
|
200
|
+
$(element).hover(
|
|
201
|
+
() => {
|
|
202
|
+
$scope.popupElement.css('display', 'block');
|
|
203
|
+
},
|
|
204
|
+
() => {
|
|
205
|
+
$scope.popupElement.css('display', 'none');
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
$scope.focus = function () {
|
|
209
|
+
$('.i-list .dropdown-content').css('display', 'none');
|
|
210
|
+
$scope.popupElement.css('display', 'block');
|
|
211
|
+
$scope.searchElement.focus();
|
|
212
|
+
};
|
|
213
|
+
$scope.hide = function () {
|
|
214
|
+
$scope.popupElement.css('display', 'none');
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
$scope.getValue = function (item) {
|
|
218
|
+
let v = isite.getValue(item, $scope.display);
|
|
219
|
+
return v || '';
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
$scope.getValue2 = function (item) {
|
|
223
|
+
if ($scope.display2) {
|
|
224
|
+
return isite.getValue(item, $scope.display2) || '';
|
|
225
|
+
}
|
|
226
|
+
return '';
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
$scope.getNgModelValue = function (ngModel) {
|
|
230
|
+
if (ngModel && $scope.display && $scope.ngValue) {
|
|
231
|
+
return isite.getValue(ngModel, $scope.display.replace($scope.ngValue + '.', '')) || '';
|
|
232
|
+
} else if (ngModel && $scope.display) {
|
|
233
|
+
return isite.getValue(ngModel, $scope.display) || '';
|
|
234
|
+
}
|
|
235
|
+
return '';
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
$scope.getNgModelValue2 = function (ngModel) {
|
|
239
|
+
if (ngModel && $scope.display2 && $scope.ngValue) {
|
|
240
|
+
return isite.getValue(ngModel, $scope.display2.replace($scope.ngValue + '.', '')) || '';
|
|
241
|
+
} else if (ngModel && $scope.display2) {
|
|
242
|
+
return isite.getValue(ngModel, $scope.display2) || '';
|
|
243
|
+
}
|
|
244
|
+
return '';
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
$scope.getNgValue = function (item) {
|
|
248
|
+
if (item && $scope.ngValue) {
|
|
249
|
+
return isite.getValue(item, $scope.ngValue);
|
|
250
|
+
}
|
|
251
|
+
return item;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
$scope.$watch('items', (items) => {
|
|
255
|
+
input.val('');
|
|
256
|
+
|
|
257
|
+
if (items) {
|
|
258
|
+
items.forEach((item) => {
|
|
259
|
+
item.$display = $scope.getValue(item) + attrs.space + $scope.getValue2(item);
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (items && $scope.ngModel) {
|
|
264
|
+
items.forEach((item) => {
|
|
265
|
+
if (isite.getValue(item, $scope.primary) == isite.getValue($scope.ngModel, $scope.primary)) {
|
|
266
|
+
$scope.ngModel = item;
|
|
267
|
+
item.$display = $scope.getValue(item) + attrs.space + $scope.getValue2(item);
|
|
268
|
+
input.val(item.$display);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
$scope.$watch('ngModel', (ngModel) => {
|
|
275
|
+
input.val('');
|
|
276
|
+
|
|
277
|
+
$scope.ngModel = ngModel;
|
|
278
|
+
|
|
279
|
+
if (ngModel) {
|
|
280
|
+
input.val(' ' + $scope.getNgModelValue(ngModel) + attrs.space + $scope.getNgModelValue2(ngModel));
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
$scope.updateModel = function (item) {
|
|
285
|
+
$scope.ngModel = $scope.getNgValue(item, $scope.ngValue);
|
|
286
|
+
input.val($scope.getNgModelValue($scope.ngModel) + attrs.space + $scope.getNgModelValue2($scope.ngModel));
|
|
287
|
+
$timeout(() => {
|
|
288
|
+
$scope.ngChange();
|
|
289
|
+
});
|
|
290
|
+
$scope.hide();
|
|
291
|
+
};
|
|
292
|
+
},
|
|
293
|
+
template: `/*##client-side/sub/i-list2.content.html*/`,
|
|
294
|
+
};
|
|
295
|
+
},
|
|
296
|
+
]);
|
|
144
297
|
app.directive('iDate', function () {
|
|
145
298
|
return {
|
|
146
299
|
link: function (scope, element, attrs) {
|
|
@@ -820,155 +973,7 @@ app.directive('iTextarea', function () {
|
|
|
820
973
|
};
|
|
821
974
|
});
|
|
822
975
|
|
|
823
|
-
app.directive('iList', [
|
|
824
|
-
'$interval',
|
|
825
|
-
'$timeout',
|
|
826
|
-
'isite',
|
|
827
|
-
function ($interval, $timeout, isite) {
|
|
828
|
-
return {
|
|
829
|
-
restrict: 'E',
|
|
830
|
-
require: 'ngModel',
|
|
831
|
-
scope: {
|
|
832
|
-
v: '@',
|
|
833
|
-
label: '@',
|
|
834
|
-
display: '@',
|
|
835
|
-
display2: '@',
|
|
836
|
-
disabled: '@',
|
|
837
|
-
css: '@',
|
|
838
|
-
space: '@',
|
|
839
|
-
primary: '@',
|
|
840
|
-
ngValue: '@',
|
|
841
|
-
ngModel: '=',
|
|
842
|
-
ngSearch: '=',
|
|
843
|
-
ngChange: '&',
|
|
844
|
-
ngAdd: '&',
|
|
845
|
-
items: '=',
|
|
846
|
-
},
|
|
847
|
-
link: function ($scope, element, attrs, ctrl) {
|
|
848
|
-
$scope.display = attrs.display = attrs.display || 'name';
|
|
849
|
-
$scope.primary = attrs.primary = attrs.primary || 'id';
|
|
850
|
-
attrs.space = attrs.space || ' ';
|
|
851
|
-
attrs.ngValue = attrs.ngValue || '';
|
|
852
|
-
|
|
853
|
-
$scope.searchElement = $(element).find('.dropdown .search');
|
|
854
|
-
$scope.popupElement = $(element).find('.dropdown .dropdown-content');
|
|
855
|
-
|
|
856
|
-
if (typeof attrs.disabled !== 'undefined') {
|
|
857
|
-
attrs.disabled = 'disabled';
|
|
858
|
-
} else {
|
|
859
|
-
attrs.disabled = '';
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
if (typeof attrs.ngAdd == 'undefined') {
|
|
863
|
-
$scope.fa_add = 'fa-search';
|
|
864
|
-
} else {
|
|
865
|
-
$scope.fa_add = 'fa-plus';
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
if (typeof attrs.ngSearch == 'undefined') {
|
|
869
|
-
$scope.showSearch = !1;
|
|
870
|
-
} else {
|
|
871
|
-
$scope.showSearch = !0;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
let input = $(element).find('input');
|
|
875
|
-
$(element).hover(
|
|
876
|
-
() => {
|
|
877
|
-
$scope.popupElement.css('display', 'block');
|
|
878
|
-
},
|
|
879
|
-
() => {
|
|
880
|
-
$scope.popupElement.css('display', 'none');
|
|
881
|
-
}
|
|
882
|
-
);
|
|
883
|
-
$scope.focus = function () {
|
|
884
|
-
$('.i-list .dropdown-content').css('display', 'none');
|
|
885
|
-
$scope.popupElement.css('display', 'block');
|
|
886
|
-
$scope.searchElement.focus();
|
|
887
|
-
};
|
|
888
|
-
$scope.hide = function () {
|
|
889
|
-
$scope.popupElement.css('display', 'none');
|
|
890
|
-
};
|
|
891
|
-
|
|
892
|
-
$scope.getValue = function (item) {
|
|
893
|
-
let v = isite.getValue(item, $scope.display);
|
|
894
|
-
return v || '';
|
|
895
|
-
};
|
|
896
|
-
|
|
897
|
-
$scope.getValue2 = function (item) {
|
|
898
|
-
if ($scope.display2) {
|
|
899
|
-
return isite.getValue(item, $scope.display2) || '';
|
|
900
|
-
}
|
|
901
|
-
return '';
|
|
902
|
-
};
|
|
903
|
-
|
|
904
|
-
$scope.getNgModelValue = function (ngModel) {
|
|
905
|
-
if (ngModel && $scope.display && $scope.ngValue) {
|
|
906
|
-
return isite.getValue(ngModel, $scope.display.replace($scope.ngValue + '.', '')) || '';
|
|
907
|
-
} else if (ngModel && $scope.display) {
|
|
908
|
-
return isite.getValue(ngModel, $scope.display) || '';
|
|
909
|
-
}
|
|
910
|
-
return '';
|
|
911
|
-
};
|
|
912
|
-
|
|
913
|
-
$scope.getNgModelValue2 = function (ngModel) {
|
|
914
|
-
if (ngModel && $scope.display2 && $scope.ngValue) {
|
|
915
|
-
return isite.getValue(ngModel, $scope.display2.replace($scope.ngValue + '.', '')) || '';
|
|
916
|
-
} else if (ngModel && $scope.display2) {
|
|
917
|
-
return isite.getValue(ngModel, $scope.display2) || '';
|
|
918
|
-
}
|
|
919
|
-
return '';
|
|
920
|
-
};
|
|
921
|
-
|
|
922
|
-
$scope.getNgValue = function (item) {
|
|
923
|
-
if (item && $scope.ngValue) {
|
|
924
|
-
return isite.getValue(item, $scope.ngValue);
|
|
925
|
-
}
|
|
926
|
-
return item;
|
|
927
|
-
};
|
|
928
|
-
|
|
929
|
-
$scope.$watch('items', (items) => {
|
|
930
|
-
input.val('');
|
|
931
|
-
|
|
932
|
-
if (items) {
|
|
933
|
-
items.forEach((item) => {
|
|
934
|
-
item.$display = $scope.getValue(item) + attrs.space + $scope.getValue2(item);
|
|
935
|
-
});
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
if (items && $scope.ngModel) {
|
|
939
|
-
items.forEach((item) => {
|
|
940
|
-
if (isite.getValue(item, $scope.primary) == isite.getValue($scope.ngModel, $scope.primary)) {
|
|
941
|
-
$scope.ngModel = item;
|
|
942
|
-
item.$display = $scope.getValue(item) + attrs.space + $scope.getValue2(item);
|
|
943
|
-
input.val(item.$display);
|
|
944
|
-
}
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
});
|
|
948
|
-
|
|
949
|
-
$scope.$watch('ngModel', (ngModel) => {
|
|
950
|
-
input.val('');
|
|
951
|
-
|
|
952
|
-
$scope.ngModel = ngModel;
|
|
953
976
|
|
|
954
|
-
if (ngModel) {
|
|
955
|
-
input.val(' ' + $scope.getNgModelValue(ngModel) + attrs.space + $scope.getNgModelValue2(ngModel));
|
|
956
|
-
}
|
|
957
|
-
});
|
|
958
|
-
|
|
959
|
-
$scope.updateModel = function (item) {
|
|
960
|
-
$scope.ngModel = $scope.getNgValue(item, $scope.ngValue);
|
|
961
|
-
input.val($scope.getNgModelValue($scope.ngModel) + attrs.space + $scope.getNgModelValue2($scope.ngModel));
|
|
962
|
-
$timeout(() => {
|
|
963
|
-
$scope.ngChange();
|
|
964
|
-
});
|
|
965
|
-
$scope.hide();
|
|
966
|
-
};
|
|
967
|
-
},
|
|
968
|
-
template: `/*##client-side/sub/i-list2.content.html*/`,
|
|
969
|
-
};
|
|
970
|
-
},
|
|
971
|
-
]);
|
|
972
977
|
|
|
973
978
|
app.directive('iChecklist', [
|
|
974
979
|
'$interval',
|