diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-03-28 12:17:43 +0200 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-03-28 12:17:43 +0200 |
| commit | 53f65de9d4163c9c095f2b8e87baca648c3645bd (patch) | |
| tree | 37f167f38b25aa50bd7dd1429438c0245a280a28 /client/js/controllers/home/home.js | |
| parent | 60cfe3ebc039df8d6a468a43a59e7fd8c2a16956 (diff) | |
| parent | 804fa322d841d73ee7592885ec500dc94e91b9e6 (diff) | |
Test
Diffstat (limited to 'client/js/controllers/home/home.js')
| -rwxr-xr-x[-rw-r--r--] | client/js/controllers/home/home.js | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/client/js/controllers/home/home.js b/client/js/controllers/home/home.js index b508c97..10142c9 100644..100755 --- a/client/js/controllers/home/home.js +++ b/client/js/controllers/home/home.js @@ -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); |
