From 10eb4471ab820bb2323077cb7be8029a2e9b0759 Mon Sep 17 00:00:00 2001 From: okalintu Date: Tue, 3 Mar 2015 15:46:01 +0200 Subject: sanitized routes --- f/scripts/angular | 1 + f/scripts/client.js | 26 ++++++++++++++++++++++++++ f/styles/style.css | 0 f/templates/adm.html | 18 ++++++++++++++++++ f/templates/index.html | 23 +++++++++++++++++++++++ 5 files changed, 68 insertions(+) create mode 120000 f/scripts/angular create mode 100644 f/scripts/client.js create mode 100644 f/styles/style.css create mode 100644 f/templates/adm.html create mode 100644 f/templates/index.html (limited to 'f') diff --git a/f/scripts/angular b/f/scripts/angular new file mode 120000 index 0000000..aaffc07 --- /dev/null +++ b/f/scripts/angular @@ -0,0 +1 @@ +../../node_modules/angular \ No newline at end of file diff --git a/f/scripts/client.js b/f/scripts/client.js new file mode 100644 index 0000000..fb612ed --- /dev/null +++ b/f/scripts/client.js @@ -0,0 +1,26 @@ +var ioc = angular.module('ioc',[]); + +ioc.controller('ioctrl',function($scope){ + var soc= io(); + $scope.que=[]; + $scope.row=""; + $scope.name=""; + $scope.qsize=0; + + $scope.submit = function(){ + soc.emit("queadd",{"row":$scope.row,"name":$scope.name}); + $scope.row=""; + $scope.name=""; + }; + + soc.on("quedata",function(data){ + $scope.que=data; + $scope.qsize=data.length; + $scope.$apply(); + }); + + $scope.popfirst = function(){ + soc.emit("quepopfirst",""); + }; + +}); diff --git a/f/styles/style.css b/f/styles/style.css new file mode 100644 index 0000000..e69de29 diff --git a/f/templates/adm.html b/f/templates/adm.html new file mode 100644 index 0000000..bbc4209 --- /dev/null +++ b/f/templates/adm.html @@ -0,0 +1,18 @@ + + + + + + +Jono + + +
+
+
Jonoa: {{qsize}}
+
Rivi: {{que[0].row}}
+
Nimi: {{que[0].name}}
+
+
+ + diff --git a/f/templates/index.html b/f/templates/index.html new file mode 100644 index 0000000..822c162 --- /dev/null +++ b/f/templates/index.html @@ -0,0 +1,23 @@ + + + + + + +Jono + + +
+
Rivi:
+
Nimi:
+ + + + + + + +
{{person.row}}{{person.name}}
+
+ + -- cgit v1.3