This commit is contained in:
manzerbredes 2016-03-28 12:17:43 +02:00
commit 53f65de9d4
88 changed files with 3596 additions and 694 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

@ -10,16 +10,31 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
console.log(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);