nice-elements 1.9.13 → 1.9.14
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/.vscode/settings.json +17 -10
- package/CHANGELOG.md +390 -386
- package/LICENSE.md +21 -21
- package/README.md +93 -93
- package/bower.json +10 -18
- package/dist/nice.js +7954 -7906
- package/dist/nice.min.js +1 -1
- package/dist/style.css +22 -18
- package/dist/style.css.map +1 -1
- package/dist/style.min.css +7 -7
- package/package.json +40 -40
- package/src/components/nice-button/nice-button.html +4 -4
- package/src/components/nice-button/nice-button.js +41 -41
- package/src/components/nice-button/nice-button.scss +16 -16
- package/src/components/nice-button-toggle/nice-button-toggle.html +9 -9
- package/src/components/nice-button-toggle/nice-button-toggle.js +23 -23
- package/src/components/nice-button-toggle/nice-button-toggle.scss +2 -2
- package/src/components/nice-calendar/nice-calendar.html +91 -91
- package/src/components/nice-calendar/nice-calendar.js +334 -334
- package/src/components/nice-calendar/nice-calendar.scss +285 -285
- package/src/components/nice-checkbox/nice-checkbox.html +5 -5
- package/src/components/nice-checkbox/nice-checkbox.js +33 -33
- package/src/components/nice-checkbox/nice-checkbox.scss +91 -91
- package/src/components/nice-choice/nice-choice.html +18 -18
- package/src/components/nice-choice/nice-choice.js +210 -210
- package/src/components/nice-choice/nice-choice.scss +110 -109
- package/src/components/nice-click-outside/nice-click-outside.js +105 -105
- package/src/components/nice-comment/nice-comment.html +10 -10
- package/src/components/nice-comment/nice-comment.js +69 -69
- package/src/components/nice-comment/nice-comment.scss +39 -39
- package/src/components/nice-date/nice-date.html +74 -74
- package/src/components/nice-date/nice-date.js +327 -327
- package/src/components/nice-date/nice-date.scss +302 -302
- package/src/components/nice-date-input/nice-date-input.html +41 -41
- package/src/components/nice-date-input/nice-date-input.js +109 -109
- package/src/components/nice-date-input/nice-date-input.scss +45 -45
- package/src/components/nice-date-range/nice-date-range.html +15 -15
- package/src/components/nice-date-range/nice-date-range.js +76 -76
- package/src/components/nice-date-range/nice-date-range.scss +390 -390
- package/src/components/nice-datetime-picker/nice-datetime-picker.html +29 -29
- package/src/components/nice-datetime-picker/nice-datetime-picker.js +87 -87
- package/src/components/nice-datetime-picker/nice-datetime-picker.scss +428 -428
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.html +55 -55
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.js +246 -246
- package/src/components/nice-datetimerange-picker/nice-datetimerange-picker.scss +73 -73
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.html +44 -44
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.js +172 -172
- package/src/components/nice-datetimerange-picker-2/nice-datetimerange-picker-2.scss +127 -127
- package/src/components/nice-dropdown/nice-dropdown.html +60 -60
- package/src/components/nice-dropdown/nice-dropdown.js +489 -489
- package/src/components/nice-dropdown/nice-dropdown.scss +249 -249
- package/src/components/nice-dropdown-date/nice-dropdown-date.html +28 -28
- package/src/components/nice-dropdown-date/nice-dropdown-date.js +126 -126
- package/src/components/nice-dropdown-date/nice-dropdown-date.scss +82 -82
- package/src/components/nice-dropdown-old/nice-dropdown-old.html +44 -44
- package/src/components/nice-dropdown-old/nice-dropdown-old.js +330 -330
- package/src/components/nice-dropdown-old/nice-dropdown-old.scss +129 -129
- package/src/components/nice-dtp/nice-dtp.html +91 -91
- package/src/components/nice-dtp/nice-dtp.js +833 -833
- package/src/components/nice-help/nice-help.html +6 -6
- package/src/components/nice-help/nice-help.js +55 -55
- package/src/components/nice-help/nice-help.scss +78 -78
- package/src/components/nice-input/nice-input.html +48 -47
- package/src/components/nice-input/nice-input.js +231 -224
- package/src/components/nice-input/nice-input.scss +130 -130
- package/src/components/nice-label/nice-label.html +10 -10
- package/src/components/nice-label/nice-label.js +30 -30
- package/src/components/nice-loader/nice-loader.html +6 -6
- package/src/components/nice-loader/nice-loader.js +28 -28
- package/src/components/nice-loader/nice-loader.scss +47 -47
- package/src/components/nice-notification/nice-notification.html +3 -3
- package/src/components/nice-notification/nice-notification.js +124 -124
- package/src/components/nice-notification/nice-notification.scss +66 -66
- package/src/components/nice-number/nice-number.html +40 -40
- package/src/components/nice-number/nice-number.js +166 -166
- package/src/components/nice-number/nice-number.scss +18 -18
- package/src/components/nice-percent/nice-percent.html +24 -24
- package/src/components/nice-percent/nice-percent.js +94 -94
- package/src/components/nice-pill/nice-pill.html +3 -3
- package/src/components/nice-pill/nice-pill.js +29 -29
- package/src/components/nice-pill/nice-pill.scss +25 -25
- package/src/components/nice-popup/nice-popup.html +6 -6
- package/src/components/nice-popup/nice-popup.js +122 -122
- package/src/components/nice-popup/nice-popup.scss +43 -43
- package/src/components/nice-progress-bar/nice-progress-bar.html +15 -15
- package/src/components/nice-progress-bar/nice-progress-bar.js +54 -54
- package/src/components/nice-progress-bar/nice-progress-bar.scss +47 -47
- package/src/components/nice-quantity/nice-quantity.html +22 -22
- package/src/components/nice-quantity/nice-quantity.js +55 -55
- package/src/components/nice-quantity/nice-quantity.scss +51 -51
- package/src/components/nice-search/nice-search.html +44 -44
- package/src/components/nice-search/nice-search.js +239 -239
- package/src/components/nice-search/nice-search.scss +90 -90
- package/src/components/nice-search2/nice-search2.html +32 -32
- package/src/components/nice-search2/nice-search2.js +264 -264
- package/src/components/nice-search2/nice-search2.scss +80 -80
- package/src/components/nice-slot/nice-slot.html +10 -10
- package/src/components/nice-slot/nice-slot.js +29 -29
- package/src/components/nice-steps/nice-steps.scss +81 -81
- package/src/components/nice-svgs/nice-svgs.html +1262 -1262
- package/src/components/nice-svgs/nice-svgs.js +16 -16
- package/src/components/nice-time-picker/nice-time-picker.html +43 -43
- package/src/components/nice-time-picker/nice-time-picker.js +83 -83
- package/src/components/nice-time-picker/nice-time-picker.scss +37 -37
- package/src/components/nice-title/nice-title.html +3 -3
- package/src/components/nice-title/nice-title.js +21 -21
- package/src/components/nice-toast/nice-toast.html +2 -2
- package/src/components/nice-toast/nice-toast.js +56 -56
- package/src/components/nice-toast/nice-toast.scss +74 -74
- package/src/components/nice-toggle/nice-toggle.html +12 -12
- package/src/components/nice-toggle/nice-toggle.js +95 -95
- package/src/components/nice-toggle/nice-toggle.scss +67 -67
- package/src/components/nice-tooltip/_nice-tooltip.scss +71 -71
- package/src/components/nice-tooltip/nice-tooltip.js +23 -23
- package/src/components/nice-upload/nice-upload.html +22 -22
- package/src/components/nice-upload/nice-upload.js +157 -157
- package/src/components/nice-upload/nice-upload.scss +85 -85
- package/src/components/nice-wrapper/_nice-wrapper.scss +87 -87
- package/src/components/nice-wrapper/nice-wrapper.html +12 -12
- package/src/components/nice-wrapper/nice-wrapper.js +43 -43
- package/src/components/nice-yesno/nice-yesno.html +14 -14
- package/src/components/nice-yesno/nice-yesno.js +109 -109
- package/src/components/nice-yesno/nice-yesno.scss +95 -95
- package/src/filters/nice-date.js +17 -17
- package/src/filters/nice-highlight.js +16 -16
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.html +30 -30
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.js +67 -67
- package/src/modals/nice-multilangual-modal/nice-multilangual-modal.scss +19 -19
- package/src/nice.js +2 -2
- package/src/services/nice-service.js +19 -19
- package/src/styles/_bootstrap-variables.scss +178 -178
- package/src/styles/_nice-buttons.scss +403 -403
- package/src/styles/_nice-common.scss +471 -467
- package/src/styles/_nice-ngdialog.scss +85 -85
- package/src/styles/_nice-spacing.scss +283 -283
- package/src/styles/_nice.scss +65 -65
- package/src/styles/_variables.scss +195 -195
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
.nice-yesno {
|
|
2
|
-
.nice-disabled {
|
|
3
|
-
|
|
4
|
-
.yesno-wrapper,
|
|
5
|
-
.yesno-yes-bg,
|
|
6
|
-
.yesno-no-bg,
|
|
7
|
-
.yesno-button {
|
|
8
|
-
cursor: not-allowed !important;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.yesno-wrapper {
|
|
13
|
-
background: $nice-yesno-bg;
|
|
14
|
-
border: 1px solid $nice-border-color;
|
|
15
|
-
color: $nice-font-color;
|
|
16
|
-
border-radius: $nice-border-radius;
|
|
17
|
-
|
|
18
|
-
height: 34px;
|
|
19
|
-
position: relative;
|
|
20
|
-
|
|
21
|
-
&:focus-within {
|
|
22
|
-
@extend .nice-focus;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.yesno-yes-bg,
|
|
26
|
-
.yesno-no-bg,
|
|
27
|
-
.yesno-button {
|
|
28
|
-
text-align: center;
|
|
29
|
-
line-height: 34px;
|
|
30
|
-
min-height: unset;
|
|
31
|
-
cursor: pointer;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.yesno-yes-bg,
|
|
35
|
-
.yesno-no-bg {
|
|
36
|
-
opacity: 0.8;
|
|
37
|
-
height: 100%;
|
|
38
|
-
position: absolute;
|
|
39
|
-
top: 0;
|
|
40
|
-
bottom: 0;
|
|
41
|
-
appearance: none;
|
|
42
|
-
background: none;
|
|
43
|
-
border: 0 none;
|
|
44
|
-
padding: 0;
|
|
45
|
-
line-height: 1;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.yesno-no-bg {
|
|
49
|
-
left: 50%;
|
|
50
|
-
width: 50%;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.yesno-yes-bg {
|
|
54
|
-
left: 0;
|
|
55
|
-
width: 50%;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.yesno-button {
|
|
59
|
-
transition: all 0.5s;
|
|
60
|
-
background-color: $nice-yesno-slider-bg;
|
|
61
|
-
border-radius: $nice-border-radius-small;
|
|
62
|
-
color: white;
|
|
63
|
-
position: absolute;
|
|
64
|
-
line-height: 28px;
|
|
65
|
-
padding: 0;
|
|
66
|
-
top: 2px;
|
|
67
|
-
bottom: 2px;
|
|
68
|
-
left: 2px;
|
|
69
|
-
width: calc(50% - 2px);
|
|
70
|
-
opacity: 1 !important;
|
|
71
|
-
|
|
72
|
-
&:hover {
|
|
73
|
-
background-color: darken($nice-yesno-slider-bg, 5%);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&:focus {
|
|
77
|
-
outline: 0 none;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.yesno-button-no {
|
|
82
|
-
left: 50%;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.yesno-button-yes {
|
|
86
|
-
left: 2px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&.true {
|
|
90
|
-
.yesno-button {
|
|
91
|
-
left: 50%;
|
|
92
|
-
width: 50%;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
1
|
+
.nice-yesno {
|
|
2
|
+
.nice-disabled {
|
|
3
|
+
|
|
4
|
+
.yesno-wrapper,
|
|
5
|
+
.yesno-yes-bg,
|
|
6
|
+
.yesno-no-bg,
|
|
7
|
+
.yesno-button {
|
|
8
|
+
cursor: not-allowed !important;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.yesno-wrapper {
|
|
13
|
+
background: $nice-yesno-bg;
|
|
14
|
+
border: 1px solid $nice-border-color;
|
|
15
|
+
color: $nice-font-color;
|
|
16
|
+
border-radius: $nice-border-radius;
|
|
17
|
+
|
|
18
|
+
height: 34px;
|
|
19
|
+
position: relative;
|
|
20
|
+
|
|
21
|
+
&:focus-within {
|
|
22
|
+
@extend .nice-focus;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.yesno-yes-bg,
|
|
26
|
+
.yesno-no-bg,
|
|
27
|
+
.yesno-button {
|
|
28
|
+
text-align: center;
|
|
29
|
+
line-height: 34px;
|
|
30
|
+
min-height: unset;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.yesno-yes-bg,
|
|
35
|
+
.yesno-no-bg {
|
|
36
|
+
opacity: 0.8;
|
|
37
|
+
height: 100%;
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 0;
|
|
40
|
+
bottom: 0;
|
|
41
|
+
appearance: none;
|
|
42
|
+
background: none;
|
|
43
|
+
border: 0 none;
|
|
44
|
+
padding: 0;
|
|
45
|
+
line-height: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.yesno-no-bg {
|
|
49
|
+
left: 50%;
|
|
50
|
+
width: 50%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.yesno-yes-bg {
|
|
54
|
+
left: 0;
|
|
55
|
+
width: 50%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.yesno-button {
|
|
59
|
+
transition: all 0.5s;
|
|
60
|
+
background-color: $nice-yesno-slider-bg;
|
|
61
|
+
border-radius: $nice-border-radius-small;
|
|
62
|
+
color: white;
|
|
63
|
+
position: absolute;
|
|
64
|
+
line-height: 28px;
|
|
65
|
+
padding: 0;
|
|
66
|
+
top: 2px;
|
|
67
|
+
bottom: 2px;
|
|
68
|
+
left: 2px;
|
|
69
|
+
width: calc(50% - 2px);
|
|
70
|
+
opacity: 1 !important;
|
|
71
|
+
|
|
72
|
+
&:hover {
|
|
73
|
+
background-color: darken($nice-yesno-slider-bg, 5%);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:focus {
|
|
77
|
+
outline: 0 none;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.yesno-button-no {
|
|
82
|
+
left: 50%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.yesno-button-yes {
|
|
86
|
+
left: 2px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.true {
|
|
90
|
+
.yesno-button {
|
|
91
|
+
left: 50%;
|
|
92
|
+
width: 50%;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
96
|
}
|
package/src/filters/nice-date.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ngdoc date
|
|
3
|
-
* @name niceElements.filter:niceDate
|
|
4
|
-
* @function
|
|
5
|
-
* @description
|
|
6
|
-
* # niceDate
|
|
7
|
-
* Filter in the niceElements.
|
|
8
|
-
*/
|
|
9
|
-
angular.module('niceElements').filter('niceDate', function () {
|
|
10
|
-
return function (object, addTime, addSeconds) {
|
|
11
|
-
var formatString = "D.M.YYYY";
|
|
12
|
-
if (addTime) {
|
|
13
|
-
formatString = "D.M.YYYY • H:mm";
|
|
14
|
-
if (addSeconds) formatString += ":ss";
|
|
15
|
-
}
|
|
16
|
-
return moment(object).format(formatString);
|
|
17
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* @ngdoc date
|
|
3
|
+
* @name niceElements.filter:niceDate
|
|
4
|
+
* @function
|
|
5
|
+
* @description
|
|
6
|
+
* # niceDate
|
|
7
|
+
* Filter in the niceElements.
|
|
8
|
+
*/
|
|
9
|
+
angular.module('niceElements').filter('niceDate', function () {
|
|
10
|
+
return function (object, addTime, addSeconds) {
|
|
11
|
+
var formatString = "D.M.YYYY";
|
|
12
|
+
if (addTime) {
|
|
13
|
+
formatString = "D.M.YYYY • H:mm";
|
|
14
|
+
if (addSeconds) formatString += ":ss";
|
|
15
|
+
}
|
|
16
|
+
return moment(object).format(formatString);
|
|
17
|
+
};
|
|
18
18
|
});
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ngdoc date
|
|
3
|
-
* @name niceElements.filter:niceHighlight
|
|
4
|
-
* @function
|
|
5
|
-
* @description
|
|
6
|
-
* # niceHighlight
|
|
7
|
-
* Filter in the niceElements.
|
|
8
|
-
*/
|
|
9
|
-
angular.module('niceElements').filter('niceHighlight', function () {
|
|
10
|
-
return function (value, highlightedText) {
|
|
11
|
-
if (!value) return "";
|
|
12
|
-
var regex = new RegExp(highlightedText, 'gmi');
|
|
13
|
-
var newValue = String(value).replace(regex, "<span class='nice-highligh'>$&</span>");
|
|
14
|
-
return newValue;
|
|
15
|
-
};
|
|
16
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* @ngdoc date
|
|
3
|
+
* @name niceElements.filter:niceHighlight
|
|
4
|
+
* @function
|
|
5
|
+
* @description
|
|
6
|
+
* # niceHighlight
|
|
7
|
+
* Filter in the niceElements.
|
|
8
|
+
*/
|
|
9
|
+
angular.module('niceElements').filter('niceHighlight', function () {
|
|
10
|
+
return function (value, highlightedText) {
|
|
11
|
+
if (!value) return "";
|
|
12
|
+
var regex = new RegExp(highlightedText, 'gmi');
|
|
13
|
+
var newValue = String(value).replace(regex, "<span class='nice-highligh'>$&</span>");
|
|
14
|
+
return newValue;
|
|
15
|
+
};
|
|
16
|
+
});
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<div class="nice-multilangual-modal">
|
|
2
|
-
<div class="dialog-title" ng-if="!model">
|
|
3
|
-
<translate translate-context="Nice">Translations</translate>
|
|
4
|
-
</div>
|
|
5
|
-
<div class="dialog-title" ng-if="model">
|
|
6
|
-
<div translate class="sub-title" translate-context="Nice">Translations for</div>
|
|
7
|
-
<span class="title">{{ model }}</span>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div class="dialog-body" ng-form="forma">
|
|
11
|
-
<div class="nice-multilangual-languages">
|
|
12
|
-
<div class="nice-multilangual-language" ng-repeat="(key, field) in fields">
|
|
13
|
-
<!-- <nice-icon class="nice-multilangual-language-flag" icon="{{ 'flag-' + key }}"></nice-icon> -->
|
|
14
|
-
<nice-input title="{{ languagesMap[key] }}" class="flex-grow" model="fields[key]" is-inline="false" no-margin="true" on-clear="removeLanguage(key)" class="flex-grow"></nice-input>
|
|
15
|
-
<!-- <button type="button" class="btn btn-danger btn-icon" ng-click="removeLanguage(key)">
|
|
16
|
-
<nice-icon icon="icon-trash-2"></nice-icon>
|
|
17
|
-
</button> -->
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<nice-dropdown ng-if="!hide" title="{{ 'Add language' | translate:null:'Nice' }}" is-inline="false" model="selector.newLanguage" list="languages" add-button-function="addLanguage" filter-function="filterLanguages" no-margin="true"></nice-dropdown>
|
|
22
|
-
<!-- <pre class="mb-0">{{ fields | json }}</pre> -->
|
|
23
|
-
</div>
|
|
24
|
-
|
|
25
|
-
<div class="dialog-footer">
|
|
26
|
-
<div class="view-actions">
|
|
27
|
-
<button type="button" class="btn btn-danger btn-navigation" ng-click="close()" translate-context="Nice" translate>Cancel</button>
|
|
28
|
-
<button type="button" class="btn btn-success btn-navigation" ng-click="save()" translate-context="Nice" translate>Save</button>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
1
|
+
<div class="nice-multilangual-modal">
|
|
2
|
+
<div class="dialog-title" ng-if="!model">
|
|
3
|
+
<translate translate-context="Nice">Translations</translate>
|
|
4
|
+
</div>
|
|
5
|
+
<div class="dialog-title" ng-if="model">
|
|
6
|
+
<div translate class="sub-title" translate-context="Nice">Translations for</div>
|
|
7
|
+
<span class="title">{{ model }}</span>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div class="dialog-body" ng-form="forma">
|
|
11
|
+
<div class="nice-multilangual-languages">
|
|
12
|
+
<div class="nice-multilangual-language" ng-repeat="(key, field) in fields">
|
|
13
|
+
<!-- <nice-icon class="nice-multilangual-language-flag" icon="{{ 'flag-' + key }}"></nice-icon> -->
|
|
14
|
+
<nice-input title="{{ languagesMap[key] }}" class="flex-grow" model="fields[key]" is-inline="false" no-margin="true" on-clear="removeLanguage(key)" class="flex-grow"></nice-input>
|
|
15
|
+
<!-- <button type="button" class="btn btn-danger btn-icon" ng-click="removeLanguage(key)">
|
|
16
|
+
<nice-icon icon="icon-trash-2"></nice-icon>
|
|
17
|
+
</button> -->
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<nice-dropdown ng-if="!hide" title="{{ 'Add language' | translate:null:'Nice' }}" is-inline="false" model="selector.newLanguage" list="languages" add-button-function="addLanguage" filter-function="filterLanguages" no-margin="true"></nice-dropdown>
|
|
22
|
+
<!-- <pre class="mb-0">{{ fields | json }}</pre> -->
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div class="dialog-footer">
|
|
26
|
+
<div class="view-actions">
|
|
27
|
+
<button type="button" class="btn btn-danger btn-navigation" ng-click="close()" translate-context="Nice" translate>Cancel</button>
|
|
28
|
+
<button type="button" class="btn btn-success btn-navigation" ng-click="save()" translate-context="Nice" translate>Save</button>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
31
|
</div>
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
angular.module('niceElements')
|
|
2
|
-
.directive('niceMultilangualModal', function () {
|
|
3
|
-
return {
|
|
4
|
-
templateUrl: 'src/modals/nice-multilangual-modal/nice-multilangual-modal.html',
|
|
5
|
-
restrict: 'E',
|
|
6
|
-
transclude: true,
|
|
7
|
-
scope: {
|
|
8
|
-
model: '=',
|
|
9
|
-
callback: '=',
|
|
10
|
-
dialog: '=',
|
|
11
|
-
multilanguage: '=', // Multiple languages object
|
|
12
|
-
multilanguageField: '@', // Multiple languages field name
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
controller: function ($scope, $timeout) {
|
|
16
|
-
$scope.selector = {
|
|
17
|
-
newLanguage: null
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
if (!$scope.multilanguage) $scope.multilanguage = {};
|
|
21
|
-
if (!$scope.multilanguage[$scope.multilanguageField]) $scope.multilanguage[$scope.multilanguageField] = {};
|
|
22
|
-
$scope.fields = angular.copy($scope.multilanguage[$scope.multilanguageField]);
|
|
23
|
-
|
|
24
|
-
$scope.languages = [
|
|
25
|
-
{ id: 'sl', value: "Slovenščina" },
|
|
26
|
-
{ id: 'en', value: "English" },
|
|
27
|
-
{ id: 'de', value: "Deutsch" },
|
|
28
|
-
{ id: 'it', value: "Italiano" },
|
|
29
|
-
{ id: 'fr', value: "Français" },
|
|
30
|
-
];
|
|
31
|
-
$scope.languagesMap = {};
|
|
32
|
-
angular.forEach($scope.languages, function (l) { $scope.languagesMap[l.id] = l.value; })
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
$scope.filterLanguages = function (list) {
|
|
36
|
-
return _.filter(list, function (l) { return !Object.keys($scope.fields).includes(l.id); })
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
$scope.addLanguage = function () {
|
|
40
|
-
if (!$scope.selector.newLanguage) return;
|
|
41
|
-
$scope.fields[$scope.selector.newLanguage.id] = "";
|
|
42
|
-
$scope.selector.newLanguage = null;
|
|
43
|
-
$scope.hide = true;
|
|
44
|
-
$timeout(function () {
|
|
45
|
-
$scope.hide = false;
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
$scope.removeLanguage = function (key) {
|
|
50
|
-
delete $scope.fields[key];
|
|
51
|
-
$scope.hide = true;
|
|
52
|
-
$timeout(function () {
|
|
53
|
-
$scope.hide = false;
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
$scope.save = function () {
|
|
58
|
-
$scope.callback($scope.fields);
|
|
59
|
-
$scope.dialog.close();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
$scope.close = function () {
|
|
63
|
-
$scope.dialog.close();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
});
|
|
1
|
+
angular.module('niceElements')
|
|
2
|
+
.directive('niceMultilangualModal', function () {
|
|
3
|
+
return {
|
|
4
|
+
templateUrl: 'src/modals/nice-multilangual-modal/nice-multilangual-modal.html',
|
|
5
|
+
restrict: 'E',
|
|
6
|
+
transclude: true,
|
|
7
|
+
scope: {
|
|
8
|
+
model: '=',
|
|
9
|
+
callback: '=',
|
|
10
|
+
dialog: '=',
|
|
11
|
+
multilanguage: '=', // Multiple languages object
|
|
12
|
+
multilanguageField: '@', // Multiple languages field name
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
controller: function ($scope, $timeout) {
|
|
16
|
+
$scope.selector = {
|
|
17
|
+
newLanguage: null
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
if (!$scope.multilanguage) $scope.multilanguage = {};
|
|
21
|
+
if (!$scope.multilanguage[$scope.multilanguageField]) $scope.multilanguage[$scope.multilanguageField] = {};
|
|
22
|
+
$scope.fields = angular.copy($scope.multilanguage[$scope.multilanguageField]);
|
|
23
|
+
|
|
24
|
+
$scope.languages = [
|
|
25
|
+
{ id: 'sl', value: "Slovenščina" },
|
|
26
|
+
{ id: 'en', value: "English" },
|
|
27
|
+
{ id: 'de', value: "Deutsch" },
|
|
28
|
+
{ id: 'it', value: "Italiano" },
|
|
29
|
+
{ id: 'fr', value: "Français" },
|
|
30
|
+
];
|
|
31
|
+
$scope.languagesMap = {};
|
|
32
|
+
angular.forEach($scope.languages, function (l) { $scope.languagesMap[l.id] = l.value; })
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
$scope.filterLanguages = function (list) {
|
|
36
|
+
return _.filter(list, function (l) { return !Object.keys($scope.fields).includes(l.id); })
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
$scope.addLanguage = function () {
|
|
40
|
+
if (!$scope.selector.newLanguage) return;
|
|
41
|
+
$scope.fields[$scope.selector.newLanguage.id] = "";
|
|
42
|
+
$scope.selector.newLanguage = null;
|
|
43
|
+
$scope.hide = true;
|
|
44
|
+
$timeout(function () {
|
|
45
|
+
$scope.hide = false;
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
$scope.removeLanguage = function (key) {
|
|
50
|
+
delete $scope.fields[key];
|
|
51
|
+
$scope.hide = true;
|
|
52
|
+
$timeout(function () {
|
|
53
|
+
$scope.hide = false;
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
$scope.save = function () {
|
|
58
|
+
$scope.callback($scope.fields);
|
|
59
|
+
$scope.dialog.close();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
$scope.close = function () {
|
|
63
|
+
$scope.dialog.close();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
});
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.nice-multilangual-modal {
|
|
2
|
-
.nice-multilangual-languages {
|
|
3
|
-
.nice-multilangual-language {
|
|
4
|
-
margin-bottom: 1rem;
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: flex-end;
|
|
7
|
-
gap: 1rem;
|
|
8
|
-
|
|
9
|
-
.nice-multilangual-language-flag {
|
|
10
|
-
width: 34px;
|
|
11
|
-
height: 34px;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.add-language {
|
|
17
|
-
width: 200px;
|
|
18
|
-
display: block;
|
|
19
|
-
}
|
|
1
|
+
.nice-multilangual-modal {
|
|
2
|
+
.nice-multilangual-languages {
|
|
3
|
+
.nice-multilangual-language {
|
|
4
|
+
margin-bottom: 1rem;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: flex-end;
|
|
7
|
+
gap: 1rem;
|
|
8
|
+
|
|
9
|
+
.nice-multilangual-language-flag {
|
|
10
|
+
width: 34px;
|
|
11
|
+
height: 34px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.add-language {
|
|
17
|
+
width: 200px;
|
|
18
|
+
display: block;
|
|
19
|
+
}
|
|
20
20
|
}
|
package/src/nice.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
3
|
angular.module('niceElements', []);
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @ngdoc date
|
|
3
|
-
* @name niceElements.service:NiceService
|
|
4
|
-
* @function
|
|
5
|
-
* @description
|
|
6
|
-
* # NiceService
|
|
7
|
-
* Service in the niceElements.
|
|
8
|
-
*/
|
|
9
|
-
angular.module('niceElements')
|
|
10
|
-
.service('NiceService', function () {
|
|
11
|
-
var service = {
|
|
12
|
-
name: "Nice elements",
|
|
13
|
-
version: "1.9.
|
|
14
|
-
getHeader: function () {
|
|
15
|
-
return {};
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
return service;
|
|
1
|
+
/**
|
|
2
|
+
* @ngdoc date
|
|
3
|
+
* @name niceElements.service:NiceService
|
|
4
|
+
* @function
|
|
5
|
+
* @description
|
|
6
|
+
* # NiceService
|
|
7
|
+
* Service in the niceElements.
|
|
8
|
+
*/
|
|
9
|
+
angular.module('niceElements')
|
|
10
|
+
.service('NiceService', function () {
|
|
11
|
+
var service = {
|
|
12
|
+
name: "Nice elements",
|
|
13
|
+
version: "1.9.14",
|
|
14
|
+
getHeader: function () {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return service;
|
|
20
20
|
})
|