Fix all pep8 and eslint errors :0
This commit is contained in:
@@ -27,7 +27,7 @@ app.service("InstanceList", ["$http", function($http){
|
||||
'item_type': item_type,
|
||||
'duration': duration,
|
||||
}
|
||||
$http.post("/infoscreen/instance", data).then(function(response){
|
||||
$http.post("/infoscreen/instance", data).then(function(response) { //eslint-disable-line no-unused-vars
|
||||
self.getRotation(rotation_id);
|
||||
});
|
||||
};
|
||||
@@ -46,7 +46,7 @@ app.service("InstanceList", ["$http", function($http){
|
||||
});
|
||||
}
|
||||
this.deleteInstance = function(id){
|
||||
$http.delete("/infoscreen/instance/"+id).then(function(response){
|
||||
$http.delete("/infoscreen/instance/"+id).then(function(response) { //eslint-disable-line no-unused-vars
|
||||
self.getRotation(self.selected_rot.id);
|
||||
});
|
||||
}
|
||||
@@ -55,7 +55,7 @@ app.service("InstanceList", ["$http", function($http){
|
||||
$http.post("/infoscreen/create_rotation", data);
|
||||
}
|
||||
this.deleteRotation = function(id) {
|
||||
$http.delete("/infoscreen/delete_rotation/" + id).then(function(response) {
|
||||
$http.delete("/infoscreen/delete_rotation/" + id).then(function(response) { //eslint-disable-line no-unused-vars
|
||||
});
|
||||
}
|
||||
}]);
|
||||
@@ -77,7 +77,7 @@ app.service("ItemList", ["$http",'InstanceList', function($http, InstanceList){
|
||||
InstanceList.getRotation(InstanceList.selected_rot.id);
|
||||
});
|
||||
};
|
||||
this.refreshCB = function(response){
|
||||
this.refreshCB = function(response) { //eslint-disable-line no-unused-vars
|
||||
self.loadItems();
|
||||
};
|
||||
}]);
|
||||
|
||||
@@ -15,7 +15,7 @@ app.controller('infoscreen_main', function($scope,$http,$timeout){
|
||||
else {
|
||||
$scope.next();
|
||||
}
|
||||
},function(response){
|
||||
},function(response) { //eslint-disable-line no-unused-vars
|
||||
$timeout(get_rotation, 10000);
|
||||
});
|
||||
}
|
||||
@@ -107,12 +107,12 @@ app.controller('timetableCtrl',
|
||||
function($scope, $http, $interval) {
|
||||
function load(){
|
||||
$http.get('/infoscreen/hsl_data')
|
||||
.then(function(data, status, headers, config) {
|
||||
.then(function(data, status, headers, config) { //eslint-disable-line no-unused-vars
|
||||
$scope.arr=[];
|
||||
parse(data);
|
||||
});
|
||||
$http.get('/infoscreen/hsl_data/settings')
|
||||
.then(function(data, status, headers, config) {
|
||||
.then(function(data, status, headers, config) { //eslint-disable-line no-unused-vars
|
||||
$scope.departureThreshold = data.data['departure_threshold'];
|
||||
$scope.hurryThreshold = data.data['hurry_threshold'];
|
||||
});
|
||||
@@ -139,8 +139,8 @@ app.controller('timetableCtrl',
|
||||
var line = stop['departures'][lineIndex];
|
||||
var time = line['time'];
|
||||
var date = line['date'];
|
||||
var hours = Math.floor(line['time'] / 100);
|
||||
var minutes = line['time'] % 100;
|
||||
var hours = Math.floor(time / 100);
|
||||
var minutes = time % 100;
|
||||
if (hours >= 24) {
|
||||
hours -= 24;
|
||||
date++;
|
||||
@@ -198,12 +198,12 @@ app.controller('timetableCtrl',
|
||||
function delOld(){
|
||||
var tooSoon = typeof($scope.departureThreshold) != 'undefined' ? $scope.departureThreshold: 0;
|
||||
var hurry = typeof($scope.hurryThreshold) != 'undefined' ? $scope.hurryThreshold : 0;
|
||||
f = new Date();
|
||||
for(var a=$scope.arr.length-1; a>=0; a--){
|
||||
var f = new Date();
|
||||
for (var a=$scope.arr.length-1; a>=0; a--) {
|
||||
var time=$scope.arr[a]['time'].split(":");
|
||||
date=$scope.arr[a]['date'].toString();
|
||||
d= new Date(f);
|
||||
d.setFullYear(date.substring(0,4),date.substring(4,6)-1,date.substring(6,8));
|
||||
var date=$scope.arr[a]['date'].toString();
|
||||
var d = new Date(f);
|
||||
d.setFullYear(date.substring(0,4), date.substring(4,6)-1, date.substring(6,8));
|
||||
d.setHours(time[0]);
|
||||
d.setMinutes(time[1]);
|
||||
var diff=(d.getTime()-f.getTime());
|
||||
|
||||
Reference in New Issue
Block a user