Automatically set table filter option to 'equals' if its not set
This commit is contained in:
parent
3b3d739e91
commit
a6eade1ae1
File diff suppressed because one or more lines are too long
@ -98,7 +98,7 @@
|
|||||||
<option value="null">IS NULL</option>
|
<option value="null">IS NULL</option>
|
||||||
<option value="not_null">NOT NULL</option>
|
<option value="not_null">NOT NULL</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="text" class="form-control" placeholder="Search query" />
|
<input type="text" class="form-control" placeholder="Filter value" id="table_filter_value" />
|
||||||
<button class="btn btn-primary btn-sm apply-filters" type="submit">Apply</button>
|
<button class="btn btn-primary btn-sm apply-filters" type="submit">Apply</button>
|
||||||
<button class="btn btn-default btn-sm reset-filters"><i class="fa fa-times"></i></button>
|
<button class="btn btn-default btn-sm reset-filters"><i class="fa fa-times"></i></button>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1093,6 +1093,14 @@ $(document).ready(function() {
|
|||||||
showTableContent();
|
showTableContent();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Automatically prefill the filter if it's not set yet
|
||||||
|
$("select.column").on("change", function() {
|
||||||
|
if ($("select.filter").val() == "") {
|
||||||
|
$("select.filter").val("equal");
|
||||||
|
$("#table_filter_value").focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$("#pagination .next-page").on("click", function() {
|
$("#pagination .next-page").on("click", function() {
|
||||||
var current = $(".current-page").data("page");
|
var current = $(".current-page").data("page");
|
||||||
var total = $(".current-page").data("pages");
|
var total = $(".current-page").data("pages");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user