Add search filter to services admin list; refresh load_services.json
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
52e00216f7
commit
d7bdcac978
@@ -4,7 +4,10 @@
|
||||
<a href="<?php echo SITEURL;?>services/add-service" class="submitBtn">Új szolgáltatás</a>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<table class="tableClass">
|
||||
<input type="text" id="service-search" class="formInputBox" placeholder="Keresés..." style="padding:6px 10px;" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<table class="tableClass" id="services-table">
|
||||
<tr>
|
||||
<td style="min-width:55px;"></td>
|
||||
<td>#</td>
|
||||
@@ -61,3 +64,16 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#service-search').on('keyup', function(){
|
||||
var q = $(this).val().toLowerCase().trim();
|
||||
$('#services-table tr').each(function(idx){
|
||||
if(idx === 0) return;
|
||||
var text = $(this).text().toLowerCase();
|
||||
$(this).toggle(q === '' || text.indexOf(q) !== -1);
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user