Skip to content

Commit

Permalink
Downloading new action in installation steps and in update page
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Sep 14, 2016
1 parent bd58186 commit ed34563
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
10 changes: 9 additions & 1 deletion assets/js/app/installation/installation.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

vm.downloadStep = 1;
vm.downloadProgress = 0;
var nbSteps = 8;
var nbSteps = 9;

// get all modes
updateService.updateModes()
Expand All @@ -105,6 +105,14 @@
// get all events
return updateService.updateEvents();
})
.then(function(){

vm.downloadStep++;
vm.downloadProgress += 100/nbSteps;

// get all actions
return updateService.updateActions();
})
.then(function(){

vm.downloadStep++;
Expand Down
5 changes: 5 additions & 0 deletions assets/js/app/system/system.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
// get all events
return updateService.updateEvents();
})
.then(function(){

// get all actions
return updateService.updateActions();
})
.then(function(){

// get all boxTypes
Expand Down
5 changes: 5 additions & 0 deletions assets/js/app/update/update.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

var service = {
verify: verify,
updateActions: updateActions,
updateEvents: updateEvents,
updateModes: updateModes,
updateBoxTypes: updateBoxTypes,
Expand All @@ -34,6 +35,10 @@
return $http({method: 'GET', url: '/update/verify'});
}

function updateActions(){
return $http({method: 'GET', url: '/update/action'});
}

function updateEvents(){
return $http({method: 'GET', url: '/update/event'});
}
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"installation-invalid-birthdate": "Invalid birthdate, should be in format YYYY-MM-DD.",
"installation-downloading-modes": "Downloading modes...",
"installation-downloading-sentences": "Downloading sentences...",
"installation-downloading-actions": "Downloading actions...",
"installation-downloading-events": "Downloading events...",
"installation-downloading-boxs": "Downloading boxs...",
"installation-downloading-categories": "Downloading categories...",
Expand Down
1 change: 1 addition & 0 deletions config/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
"installation-invalid-birthdate": "Date de naissance invalide. Le format de la date doit être YYYY-MM-DD.",
"installation-downloading-modes": "Téléchargement des modes...",
"installation-downloading-sentences": "Téléchargement des commandes...",
"installation-downloading-actions": "Téléchargement des actions de scénarios...",
"installation-downloading-events": "Téléchargement des évènements...",
"installation-downloading-categories": "Téléchargement des catégories...",
"installation-downloading-states": "Téléchargement des conditions...",
Expand Down

0 comments on commit ed34563

Please sign in to comment.