Cleaned up search bugs
这个提交包含在:
父节点
dd86a1dda8
当前提交
fe54069d6e
共有 3 个文件被更改,包括 29 次插入 和 8 次删除
|
|
@ -79,19 +79,35 @@ $(document).ready(function() {
|
||||||
<?php if ($this->uri->segment(1) == "search") { ?>
|
<?php if ($this->uri->segment(1) == "search") { ?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
i=0;
|
i=0;
|
||||||
|
|
||||||
|
function searchButtonPress(){
|
||||||
|
event.preventDefault()
|
||||||
|
if ($('#callsign').val()) {
|
||||||
|
$('#partial_view').load("logbook/search_result/" + $('#callsign').val(), function() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
<?php if($this->input->post('callsign') != "") { ?>
|
||||||
$('#partial_view').load("logbook/search_result/<?php echo $this->input->post('callsign'); ?>", function() {
|
$('#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 ($('#callsign').val()) {
|
||||||
if ($(this).val()) {
|
$('#partial_view').load("logbook/search_result/" + $('#callsign').val(), function() {});
|
||||||
|
|
||||||
$('#partial_view').load("logbook/search_result/" + $(this).val(), function() {
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
|
||||||
|
event.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,12 @@
|
||||||
<form method="post" action="" id="search_box" name="test">
|
<form method="post" action="" id="search_box" name="test">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="callsign" class="col-sm-2 col-form-label">Callsign</label>
|
<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="">
|
<input type="text" class="form-control" id="callsign" value="">
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,4 +159,6 @@ TD.lotw{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#search_box #callsign {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
正在加载…
在新工单中引用