send form when pressing enter

This commit is contained in:
2017-09-23 12:56:32 +02:00
parent 79d860cee7
commit d797a3c9ec
2 changed files with 49 additions and 41 deletions

View File

@@ -3,6 +3,12 @@ $(document).ready(function(){
$('#search-submit').click(plot); $('#search-submit').click(plot);
$('#search-input').keypress(function(e) {
if(e.which == 13) {
plot();
}
});
renderGroupBy(); renderGroupBy();
updateSearchLimitValue(); updateSearchLimitValue();

View File

@@ -20,47 +20,49 @@
data-autocomplete-empty-message="nothing found" /> data-autocomplete-empty-message="nothing found" />
</div> </div>
<div id="search-bar"> <div id="search-bar">
<label for="search-group-by-1">Group By:</label> <form>
<select id="search-group-by-1"></select> <label for="search-group-by-1">Group By:</label>
<select id="search-group-by-2"></select> <select id="search-group-by-1"></select>
<select id="search-group-by-3"></select> <select id="search-group-by-2"></select>
<select id="search-group-by-3"></select>
<label for="search-limit-by">Limit By:</label>
<select id="search-limit-by"> <label for="search-limit-by">Limit By:</label>
<option value="NO_LIMIT" selected="selected">no limit</option> <select id="search-limit-by">
<option value="MOST_VALUES">most values</option> <option value="NO_LIMIT" selected="selected">no limit</option>
<option value="FEWEST_VALUES">fewest values</option> <option value="MOST_VALUES">most values</option>
</select> <option value="FEWEST_VALUES">fewest values</option>
<input type="number" id="search-limit-value" name="search-limit-value" min="1" max="1000" value="10"/> </select>
<input type="number" id="search-limit-value" name="search-limit-value" min="1" max="1000" value="10"/>
<label for="search-date-from">From Date:</label>
<input id="search-date-from" class="input_date" type="text" value="{{oldestValue}}" required="required" pattern="\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1]) [0-2]\d:[0-5]\d:[0-5]\d"> <label for="search-date-from">From Date:</label>
<input id="search-date-from" class="input_date" type="text" value="{{oldestValue}}" required="required" pattern="\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1]) [0-2]\d:[0-5]\d:[0-5]\d">
<label for="search-date-range">Interval:</label>
<input id="search-date-range" type="text" list="ranges" required="required" value="1 week" pattern="\d+ (second|minute|hour|day|week|month)s?"> <label for="search-date-range">Interval:</label>
<datalist id="ranges"> <input id="search-date-range" type="text" list="ranges" required="required" value="1 week" pattern="\d+ (second|minute|hour|day|week|month)s?">
<option value="60 seconds"> <datalist id="ranges">
<option value="5 minutes"> <option value="60 seconds">
<option value="1 hour"> <option value="5 minutes">
<option value="1 day"> <option value="1 hour">
<option value="1 week"> <option value="1 day">
<option value="1 month"> <option value="1 week">
</datalist> <option value="1 month">
</datalist>
<label for="search-y-axis-scale">Y-Axis:</label>
<select id="search-y-axis-scale"> <label for="search-y-axis-scale">Y-Axis:</label>
<option value="LINEAR" selected="selected">linear</option> <select id="search-y-axis-scale">
<option value="LOG10">log 10</option> <option value="LINEAR" selected="selected">linear</option>
<option value="LOG2">log 2</option> <option value="LOG10">log 10</option>
</select> <option value="LOG2">log 2</option>
</select>
<label for="show-aggregate">Aggregate:</label>
<select id="show-aggregate"> <label for="show-aggregate">Aggregate:</label>
<option value="NONE" selected="selected">-</option> <select id="show-aggregate">
<option value="MEAN">Mean</option> <option value="NONE" selected="selected">-</option>
</select> <option value="MEAN">Mean</option>
</select>
<button id="search-submit"><i class="fa fa-area-chart" aria-hidden="true"></i> Plot</button>
<button id="search-submit"><i class="fa fa-area-chart" aria-hidden="true"></i> Plot</button>
</form>
</div> </div>
<div id="navigation"> <div id="navigation">