Skip to content

Commit

Permalink
Accept enter key in planner iRail#243
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertware committed Dec 6, 2016
1 parent c54d189 commit 2b54f95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 0 additions & 6 deletions public/app/js/iRail/Controllers/PlannerCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ var PlannerCtrl = function ($scope, $http, $filter, $timeout, $window) {
* FUNCTIONS THAT CAN BE CALLED
*-------------------------------------------------------*/

$(document).keypress(function (e) {
if(e.which === 13){
$("#confirm").focus();
}
});

/**
* Check if we can dump the data
*/
Expand Down
6 changes: 4 additions & 2 deletions resources/views/_partials/route/planner.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
</a>
</script>

<form>

<div class="row">

<div class="col-sm-6">
<div class="form-group">
<div class="input-group-oneliner has-affix">
<label for="departureStation" class="input-group-label">{{ Lang::get('client.fromStation') }}</label>
<input type="text" id="departureStation" ng-model="departure" placeholder="{{ Lang::get('client.typeFromStation') }}" typeahead="station as station.name for station in getStations($viewValue)" typeahead-template-url="customTemplate.html" class="form-control input-lg" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false">
<input type="text" id="departureStation" ng-model="departure" placeholder="{{ Lang::get('client.typeFromStation') }}" typeahead="station as station.name for station in getStations($viewValue)" typeahead-template-url="customTemplate.html" class="form-control input-lg" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus>
<a class="input-group-affix" ng-click="reverse()" ng-show="results"><i class="fa fa-exchange"></i> <span class="sr-only">{{Lang::get('client.reverse')}}</span></a>
</div>
</div>
Expand Down Expand Up @@ -66,7 +68,7 @@
</button>
</div>
</div>

</form>
<div class="alert alert-danger" ng-show="data === null">
<p ng-show="stationnotfound === true">
{{ Lang::get('client.errorCheckInput') }}
Expand Down

0 comments on commit 2b54f95

Please sign in to comment.