r1716 - oipf/emulator/js/contollers
Author: ygrego Date: 2015-06-15 08:26:06 +0000 (Mon, 15 Jun 2015) New Revision: 1716 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1716 Log: The get of file remoteControl.json was failed. Modified: oipf/emulator/js/contollers/RemoteControlControllers.js Modified: oipf/emulator/js/contollers/RemoteControlControllers.js =================================================================== --- oipf/emulator/js/contollers/RemoteControlControllers.js 2015-06-15 08:13:38 UTC (rev 1715) +++ oipf/emulator/js/contollers/RemoteControlControllers.js 2015-06-15 08:26:06 UTC (rev 1716) @@ -1,16 +1,16 @@ -/* +/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ var RemoteControlControllers = angular.module('RemoteControlControllers', []); -RemoteControlControllers.controller('RemoteControlController', +RemoteControlControllers.controller('RemoteControlController', ['$scope', '$http', '$timeout', function ($scope, $http, $timeout) { - $http.get('remoteControl/remoteControl.json').success(function(data) { + $http.get('./emulator/remoteControl/remoteControl.json').success(function(data) { $scope.remoteControl = data; }); - + $scope.clickMapping = { "POWER": "setEmulatorON", "0": "setChannelByNumber", @@ -26,7 +26,7 @@ "V+": "setVolume", "V-": "setVolume", }; - + $scope.state = 'OFF'; $scope.channel = ""; $scope.channelNumber = ""; @@ -34,17 +34,17 @@ $scope.volumeViewActive = false; $scope.emulatorON = false; $scope.currentVolume = 50; - + $scope.setSate = function() { }; - + $scope.setEmulatorON = function() { $scope.emulatorON = !$scope.emulatorON; }; $scope.setChannelByNumber = function(buttonId) { $scope.channelNumberActive = true; - + if ($scope.channel.length == 0) { $timeout(function() { $scope.channel = $scope.channelNumber.toString(); @@ -53,9 +53,9 @@ }, 3000); } $scope.channelNumber += buttonId; - + }; - + $scope.setVolume = function(buttonId) { $scope.volumeViewActive = true; if (buttonId == "V+" && $scope.currentVolume < 100) { @@ -67,7 +67,7 @@ $scope.volumeViewActive = false; }, 3000); }; - + $scope.remoteControlClick = function(buttonId) { var methodName = $scope.clickMapping[buttonId]; console.log("methodName:", methodName, $scope[methodName]);
participants (1)
-
ygregoï¼ users.nuiton.org