grid_table 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/grid_table/version.rb +1 -1
- data/vendor/assets/javascripts/gridtable.js +19 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb5341d0c50f6878b55cce0a85e5f2cde174f184
|
4
|
+
data.tar.gz: b500976a3684460ecb3f12d1e345b797d6077a6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e3c408bafe26b976eab971dcce36e7964a70668ebae8feb529de9f77c2dfc018fff96a98c3e14ea5d5af4c561fd27301f02f2bd87757773074428932dc2b23f
|
7
|
+
data.tar.gz: 1115b8b02d21a6d3bff6fcbbe0fdbac16b2283141cc101ce5acd65d131fb1f91b8e1ad7f2ad8011c2e700299310e4dd7a4b8ba720e2c0b97b2bd664399f18278
|
data/lib/grid_table/version.rb
CHANGED
@@ -123,30 +123,33 @@ GridTable = (function() {
|
|
123
123
|
});
|
124
124
|
};
|
125
125
|
})(this));
|
126
|
-
|
127
|
-
var dataFilterSelector = "[data-grid-table-id='" + this.gridTableParams.getId() + "'][data-filter]";
|
126
|
+
var dataFilterSelector = "[data-filter]";
|
128
127
|
$("select" + dataFilterSelector).each((function (_this) {
|
129
|
-
return function(index, filter) {
|
130
|
-
|
131
|
-
return $(filter).on("change", function(event) {
|
128
|
+
return function (index, filter) {
|
129
|
+
if ($(filter).data('grid-table-id').split(',').includes(_this.gridTableParams.getId())) {
|
132
130
|
_this.gridTableParams.setFilter($(filter).data('field'), $(filter).val());
|
133
|
-
return
|
134
|
-
|
131
|
+
return $(filter).on("change", function (event) {
|
132
|
+
_this.gridTableParams.setFilter($(filter).data('field'), $(filter).val());
|
133
|
+
return _this.loadData();
|
134
|
+
});
|
135
|
+
}
|
135
136
|
};
|
136
137
|
})(this));
|
137
138
|
|
138
139
|
// find non-selectable inputs
|
139
140
|
$("input:not([type=radio], [type=checkbox])" + dataFilterSelector).each((function (_this) {
|
140
141
|
return function (index, filter) {
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
142
|
+
if ($(filter).data('grid-table-id').split(',').includes(_this.gridTableParams.getId())) {
|
143
|
+
var timeout;
|
144
|
+
timeout = null;
|
145
|
+
return $(filter).on("propertychange keyup input paste", function (event) {
|
146
|
+
clearTimeout(timeout);
|
147
|
+
return timeout = setTimeout((function () {
|
148
|
+
_this.gridTableParams.setFilter($(filter).data('field'), $(filter).val());
|
149
|
+
return _this.loadData();
|
150
|
+
}), 500);
|
151
|
+
});
|
152
|
+
}
|
150
153
|
};
|
151
154
|
})(this));
|
152
155
|
|