kopia lustrzana https://github.com/magicbug/Cloudlog
Cleaned up search bugs
rodzic
dd86a1dda8
commit
fe54069d6e
|
@ -79,19 +79,35 @@ $(document).ready(function() {
|
|||
<?php if ($this->uri->segment(1) == "search") { ?>
|
||||
<script type="text/javascript">
|
||||
i=0;
|
||||
|
||||
function searchButtonPress(){
|
||||
event.preventDefault()
|
||||
if ($('#callsign').val()) {
|
||||
$('#partial_view').load("logbook/search_result/" + $('#callsign').val(), function() {});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
<?php if($this->input->post('callsign') != "") { ?>
|
||||
$('#partial_view').load("logbook/search_result/<?php echo $this->input->post('callsign'); ?>", function() {
|
||||
});
|
||||
<?php } ?>
|
||||
|
||||
$(document).on('keypress',function(e) {
|
||||
if(e.which == 13) {
|
||||
|
||||
$("#callsign").keyup(function(){
|
||||
if ($(this).val()) {
|
||||
|
||||
$('#partial_view').load("logbook/search_result/" + $(this).val(), function() {
|
||||
});
|
||||
if ($('#callsign').val()) {
|
||||
$('#partial_view').load("logbook/search_result/" + $('#callsign').val(), function() {});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
|
|
|
@ -5,9 +5,12 @@
|
|||
<form method="post" action="" id="search_box" name="test">
|
||||
<div class="form-group row">
|
||||
<label for="callsign" class="col-sm-2 col-form-label">Callsign</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" id="callsign" value="">
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<button onclick="searchButtonPress()" class="btn btn-outline-success my-2 my-sm-0" type="submit"><i class="fas fa-search"></i> Search</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -159,4 +159,6 @@ TD.lotw{
|
|||
}
|
||||
|
||||
|
||||
|
||||
#search_box #callsign {
|
||||
text-transform: uppercase;
|
||||
}
|
Ładowanie…
Reference in New Issue