mirror of
https://github.com/ail-project/ail-framework.git
synced 2025-01-31 06:26:14 +00:00
Enter simulate button click on input field for terms management and plot tool
This commit is contained in:
parent
465d18fc73
commit
1c96eac2e4
2 changed files with 27 additions and 3 deletions
|
@ -76,8 +76,8 @@
|
|||
|
||||
<div class="form-group input-group" style="margin-bottom: 30px;">
|
||||
<span class="input-group-addon"><span class="fa fa-eye"></span></span>
|
||||
<input id="followTermInput" class="form-control" placeholder="Term to track" type="text" style="max-width: 400px;">
|
||||
<button class="btn btn-success btn-interaction" style="margin-left: 10px;" data-section="followTerm" data-action="add"> Add term</button>
|
||||
<input id="followTermInput" class="form-control" placeholder="Term to track" type="text" style="max-width: 400px;" onkeypress="return enterKeyScript(event)">
|
||||
<button id="followTermBtn" class="btn btn-success btn-interaction" style="margin-left: 10px;" data-section="followTerm" data-action="add"> Add term</button>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover" id="myTable">
|
||||
|
@ -131,7 +131,7 @@
|
|||
<div class="form-group input-group" style="margin-bottom: 30px;">
|
||||
<span class="input-group-addon"><span class="fa fa-eye-slash "></span></span>
|
||||
<input id="blacklistTermInput" class="form-control" placeholder="Term to track" type="text" style="max-width: 400px;">
|
||||
<button class="btn btn-danger btn-interaction" style="margin-left: 10px;" data-section="blacklistTerm" data-action="add"> Black list a term</button>
|
||||
<button id="blacklistTermBtn" class="btn btn-danger btn-interaction" style="margin-left: 10px;" data-section="blacklistTerm" data-action="add"> Black list a term</button>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-bordered table-hover" id="myTable2">
|
||||
|
@ -182,11 +182,28 @@
|
|||
table_track = $('#myTable').DataTable();
|
||||
table_black = $('#myTable2').DataTable();
|
||||
|
||||
$("#followTermInput").keyup(function(event){
|
||||
if(event.keyCode == 13){
|
||||
$("#followTermBtn").click();
|
||||
$("#followTermInput").val("");
|
||||
}
|
||||
});
|
||||
|
||||
$("#blacklistTermInput").keyup(function(event){
|
||||
if(event.keyCode == 13){
|
||||
$("#blacklistTermBtn").click();
|
||||
$("#blacklistTermInput").val("");
|
||||
}
|
||||
});
|
||||
|
||||
perform_binding();
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
function perform_binding() {
|
||||
$(".btn-interaction").unbind("click.interaction");
|
||||
$(".btn-interaction").bind("click.interaction", perform_operation);
|
||||
|
|
|
@ -144,6 +144,13 @@
|
|||
|
||||
$('#plot-btn').click(plotData);
|
||||
|
||||
$("#TermInput").keyup(function(event){
|
||||
if(event.keyCode == 13){
|
||||
$("#plot-btn").click();
|
||||
$("#TermInput").val("");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue