diff --git a/infoscreen/static/html/templatedefault.html b/infoscreen/static/html/templatedefault.html deleted file mode 100644 index 74ed902..0000000 --- a/infoscreen/static/html/templatedefault.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/infoscreen/static/html/test1.html b/infoscreen/static/html/test1.html new file mode 100644 index 0000000..1f62c8b --- /dev/null +++ b/infoscreen/static/html/test1.html @@ -0,0 +1 @@ +

testi1

diff --git a/infoscreen/static/html/test2.html b/infoscreen/static/html/test2.html new file mode 100644 index 0000000..95db769 --- /dev/null +++ b/infoscreen/static/html/test2.html @@ -0,0 +1 @@ +

testi2

diff --git a/infoscreen/static/html/test3.html b/infoscreen/static/html/test3.html new file mode 100644 index 0000000..eecc1a2 --- /dev/null +++ b/infoscreen/static/html/test3.html @@ -0,0 +1 @@ +

testi3

diff --git a/infoscreen/static/js/controllers.js b/infoscreen/static/js/controllers.js deleted file mode 100644 index 83eaeba..0000000 --- a/infoscreen/static/js/controllers.js +++ /dev/null @@ -1,3 +0,0 @@ -app.controller('templateDefault', function($scope){ - -}); diff --git a/infoscreen/static/js/infoscreen_controllers.js b/infoscreen/static/js/infoscreen_controllers.js new file mode 100644 index 0000000..cf6c098 --- /dev/null +++ b/infoscreen/static/js/infoscreen_controllers.js @@ -0,0 +1,16 @@ +var app = angular.module('infoApp', []); + +app.controller('infoscreen_main', function($scope, $http,$timeout){ + var index = -1; + var templates = [ + "/static/html/test1.html", + "/static/html/test2.html", + "/static/html/test3.html", + ]; + $scope.next = function(){ + index = (index + 1) % templates.length; + $scope.active = templates[index]; + $timeout($scope.next,5000); + } + $scope.next() +}); diff --git a/infoscreen/static/js/routes.js b/infoscreen/static/js/routes.js deleted file mode 100644 index 99787d5..0000000 --- a/infoscreen/static/js/routes.js +++ /dev/null @@ -1,13 +0,0 @@ -var app = angular.module('infoscreen', ['ngRoute']); - -app.config(['$routeProvider', function($routeProvider){ - $routeProvider - .when('/',{ - templateUrl:"/static/html/templatedefault.html", - controller:'templateDefault', - }) - .otherwise({ - 'redirectTo':"/" - }) -}]); - diff --git a/infoscreen/templates/infoscreen_index.html b/infoscreen/templates/infoscreen_index.html index 9ae49bc..942025f 100644 --- a/infoscreen/templates/infoscreen_index.html +++ b/infoscreen/templates/infoscreen_index.html @@ -1,5 +1,5 @@ - + @@ -11,11 +11,11 @@ - - + -
+
+