diff options
| author | Yoggzo <yogg@epsina.com> | 2016-02-29 14:20:13 +0100 |
|---|---|---|
| committer | Yoggzo <yogg@epsina.com> | 2016-02-29 14:20:13 +0100 |
| commit | cfce59d6dc120848624e105614575ae0f48af81b (patch) | |
| tree | 348540cbed9dfce254a64ceee69977e9954b65e1 /client/js/controllers/home/machineDetails.js | |
| parent | 6349739a6c42d413e1bc1ea5068336187055c277 (diff) | |
merge
Diffstat (limited to 'client/js/controllers/home/machineDetails.js')
| -rw-r--r-- | client/js/controllers/home/machineDetails.js | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/client/js/controllers/home/machineDetails.js b/client/js/controllers/home/machineDetails.js new file mode 100644 index 0000000..f84a073 --- /dev/null +++ b/client/js/controllers/home/machineDetails.js @@ -0,0 +1,39 @@ +/** + * The home controller + * + * @param {$scope} $scope The $scope service from angular + */ +mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', '$timeout', function ($scope, Compute, $rootScope, $timeout) +{ + + $scope.machine={}; + $("#waitingForToggleMachine").hide(); + + $scope.$on('showMachineDetailsEvent', function(eventName ,machine){ + $scope.machine=machine; + $('#machineDetailsModal').modal({backdrop: false, keyboard: true}); + }); + + + $scope.toggleMachineState=function(){ + $("#waitingForToggleMachine").show(); + + // Fake timeout + $timeout(function(){ + $("#waitingForToggleMachine").hide(); + }, 3000); + $timeout(function(){ + $scope.machine.online=!$scope.machine.online; + + }, 3000); + + + }; + + $scope.applyModifications=function(){ + //Todo + } + + + +}]); |
