Merge branch 'Eole' into develop

Conflicts:
	client/js/controllers/home/home.js
This commit is contained in:
EoleDev 2016-03-23 14:43:27 +01:00
commit d3fc2ab36c
6 changed files with 38 additions and 7 deletions

View file

@ -24,7 +24,7 @@ mainApp.config(['$routeProvider', function($routeProvider){
templateUrl: 'partials/image/image.html',
controller: 'imageCtrl'
}).otherwise({
redirectTo: '/home'
redirectTo: '/'
});
}]);

23
client/js/controllers/home/home.js Normal file → Executable file
View file

@ -9,16 +9,31 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
var callMeAfterPullData=function(data){
$scope.machines=Compute.getData().machines;
Loading.stop();
};
}
;
if(Compute.getData().machines == null && Identity.isAlreadyLogin()){
Loading.start();
Compute.pullData(callMeAfterPullData);
}
else{
if(Identity.isAlreadyLogin()){
callMeAfterPullData();
}
}
Image.getImages(function(){});
$scope.raiseShowMachineDetailsEvent=function(id){
var callback=function(){
Loading.stop();
var data=Compute.getData();
$rootScope.$broadcast("showMachineDetailsEvent", data.machines[id], data.axioms);
}
Loading.start();
Compute.pullMachines(callback);