Skip to content

Commit 03f9eed

Browse files
Route planner now works in Firefox (no more mixed content)
1 parent 108bf79 commit 03f9eed

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

app/config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
'Illuminate\View\ViewServiceProvider',
109109
'Illuminate\Workbench\WorkbenchServiceProvider',
110110
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
111-
'Way\Generators\GeneratorsServiceProvider',
111+
// 'Way\Generators\GeneratorsServiceProvider',
112112
),
113113

114114
/*

public/js/irailapp/app.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,20 @@
5050
$scope.planning = false;
5151
$scope.loading = true;
5252

53-
var url = 'http://api.irail.be/connections/?to=' + $scope.destination.name
54-
+ '&from=' + $scope.departure.name
53+
window.history.pushState("departure", "iRail.be", "?to=" + $scope.destination.id
54+
+ '&from=' + $scope.departure.id
5555
+ '&date=' + ($filter('date')($scope.mydate, 'ddMMyy'))
5656
+ '&time=' + ($filter('date')($scope.mytime, 'HHmm'))
5757
+ '&timeSel=' + $scope.timeoption
58-
+ '&lang=NL&format=json';
58+
+ '&auto=true'
59+
);
5960

60-
$http.get(url)
61+
$urlInWindow = document.URL;
62+
63+
$http.get($urlInWindow)
6164
.success(function(data) {
6265
$scope.parseResults(data);
63-
window.history.pushState("departure", "iRail.be", "?to=" + $scope.destination.id
64-
+ '&from=' + $scope.departure.id
65-
+ '&date=' + ($filter('date')($scope.mydate, 'ddMMyy'))
66-
+ '&time=' + ($filter('date')($scope.mytime, 'HHmm'))
67-
+ '&timeSel=' + $scope.timeoption
68-
+ '&auto=true'
69-
);
66+
7067
$scope.loading = false;
7168
$scope.results = true;
7269
})

0 commit comments

Comments
 (0)