json-rules-filter 1.0.18 → 1.0.19
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/package.json
CHANGED
|
@@ -32,9 +32,13 @@
|
|
|
32
32
|
number: {
|
|
33
33
|
nEquals: "Igual a", nDifference: "Diferente de", nGreatherThan: "Mayor que",
|
|
34
34
|
nGreatherThanOrEquals: "Mayor o igual que", nLowerThan: "Menor que", nLowerThanOrEquals: "Menor o igual que"
|
|
35
|
+
},
|
|
36
|
+
searchLabel:{
|
|
37
|
+
string: "Texto",
|
|
38
|
+
number: "Número"
|
|
35
39
|
}
|
|
36
40
|
},
|
|
37
|
-
title: { text: "Reglas de filtrado", className: "fs-6 fw-semibold"
|
|
41
|
+
title: { text: "Reglas de filtrado", className: "fs-6 fw-semibold"},
|
|
38
42
|
buttons: {
|
|
39
43
|
reset: { text: "Resetear", className: "fw-semibold link-danger link-offset-2 link-underline link-underline-opacity-0" },
|
|
40
44
|
dropdown: { text: "Añadir regla", className: "btn btn-secondary" },
|
|
@@ -51,7 +55,6 @@
|
|
|
51
55
|
data: data,
|
|
52
56
|
settings: settings,
|
|
53
57
|
$contenedor: $contenedor,
|
|
54
|
-
|
|
55
58
|
// ---- Compatibility helper bs5/bs4 ------
|
|
56
59
|
bs: function (classes) {
|
|
57
60
|
if (this.settings.bsVersion === 5) return classes;
|
|
@@ -180,7 +183,7 @@
|
|
|
180
183
|
});
|
|
181
184
|
|
|
182
185
|
//Dropdown
|
|
183
|
-
$dropdown.on('click', function (e) {
|
|
186
|
+
$dropdown.off('click').on('click', function (e) {
|
|
184
187
|
e.preventDefault();
|
|
185
188
|
e.stopPropagation();
|
|
186
189
|
const $conatiner_dropdown = $(this).parent().find('.dropdown-rules-columns');
|
|
@@ -231,14 +234,14 @@
|
|
|
231
234
|
// Define search input template (hidden for 'select' type)
|
|
232
235
|
const searchInput = `
|
|
233
236
|
<div class="col-7">
|
|
234
|
-
<label class="${labelClass}"><span class="text-danger">*</span>${type}</label>
|
|
237
|
+
<label class="${labelClass}"><span class="text-danger">*</span>${this.settings.language.searchLabel[type]}</label>
|
|
235
238
|
<input type="text" class="form-control" name="input-rule-search" id="input-rule-search-${id_select}">
|
|
236
239
|
</div>`;
|
|
237
240
|
|
|
238
241
|
const row = `
|
|
239
242
|
<div id="select-rule-container-${id_select}" class="d-flex justify-content-between mt-2 pt-2 mb-4 ${$contenedor.find("[name=select-rule-option]").length > 0 ? ' border-top my-3' : ""}">
|
|
240
243
|
<div class="${rowClass} flex-grow-1">
|
|
241
|
-
<div class="col-4">
|
|
244
|
+
<div class="col-4 ${type == 'select' ? 'col-sm-12"' : 'cols-sm-5'}>
|
|
242
245
|
<label class="${labelClass}">${name}</label>
|
|
243
246
|
<select class="form-select form-control" ${type === 'select' ? 'multiple' : ''} data-type="${type}" data-name="${name}" data-field="${dataField}" id="select-rule-option-${id_select}" data-id="${id_select}" name="select-rule-option"></select>
|
|
244
247
|
</div>
|