summaryrefslogtreecommitdiff
path: root/client/js
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-02-28 16:07:52 +0100
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-02-28 16:07:52 +0100
commit1f397cf0c6a4f177c9f66e4a0f4d2274f26ae5be (patch)
tree2baa5ca70604ed9d321de6f884f054dee4f58eee /client/js
parent869538121bdc07adba1637252bf1d7338f1a27de (diff)
Begin machine details overlay
Diffstat (limited to 'client/js')
-rw-r--r--client/js/controllers/home/machineDetails.js21
-rw-r--r--client/js/controllers/home/main.js7
2 files changed, 27 insertions, 1 deletions
diff --git a/client/js/controllers/home/machineDetails.js b/client/js/controllers/home/machineDetails.js
new file mode 100644
index 0000000..43cfe07
--- /dev/null
+++ b/client/js/controllers/home/machineDetails.js
@@ -0,0 +1,21 @@
+/**
+ * The home controller
+ *
+ * @param {$scope} $scope The $scope service from angular
+ */
+mainApp.controller('machineDetailsCtrl', [ '$scope', 'Compute', '$rootScope', function ($scope, Compute, $rootScope)
+{
+
+
+
+
+ $scope.$on('showMachineDetailsEvent', function(eventName ,machine){
+ $scope.machine=machine;
+ $('#machineDetailsModal').modal({backdrop: false, keyboard: true});
+ });
+
+
+
+
+
+}]);
diff --git a/client/js/controllers/home/main.js b/client/js/controllers/home/main.js
index 27de5f3..3d57f8d 100644
--- a/client/js/controllers/home/main.js
+++ b/client/js/controllers/home/main.js
@@ -3,7 +3,7 @@
*
* @param {$scope} $scope The $scope service from angular
*/
-mainApp.controller('homeCtrl', [ '$scope', 'Compute', function ($scope, Compute)
+mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', function ($scope, Compute, $rootScope)
{
var updatePage=function(){
@@ -12,5 +12,10 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', function ($scope, Compute)
// Retrieve all Data
Compute.pullData(updatePage);
+
+ $scope.raiseShowMachineDetailsEvent=function(){
+ var machine={name: "Machine 1"};
+ $rootScope.$broadcast("showMachineDetailsEvent", machine);
+ }
}]);