From 94a9c3dbb0f4d5a18cd1522810f57ada29adfaaf Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Sun, 21 Jun 2015 22:27:48 +0300 Subject: [PATCH] Begining of add new tesk --- templates/js/app.js | 4 ++ .../js/controllers/newTasksController.js | 23 +++++++++ templates/views/index.html | 1 + templates/views/newTask.html | 48 +++++++++++++++++++ templates/views/settings.html | 4 ++ 5 files changed, 80 insertions(+) create mode 100644 templates/js/controllers/newTasksController.js create mode 100644 templates/views/newTask.html diff --git a/templates/js/app.js b/templates/js/app.js index 3a9b514..4511b58 100644 --- a/templates/js/app.js +++ b/templates/js/app.js @@ -45,6 +45,10 @@ app.config(['$routeProvider', '$locationProvider', .when('/tasks', { templateUrl: 'templates/views/tasks.html', controller: 'tasksController' + }) + .when('/tasks/new', { + templateUrl: 'templates/views/newTask.html', + controller: 'newTasksController' }); } ]); diff --git a/templates/js/controllers/newTasksController.js b/templates/js/controllers/newTasksController.js new file mode 100644 index 0000000..3766a2f --- /dev/null +++ b/templates/js/controllers/newTasksController.js @@ -0,0 +1,23 @@ +angular.module('SeHub').controller('newTasksController', ['$scope', + function($scope) { + + + + $scope.componentTypes = [{ + "type": "textbox" + }, { + "type": "textarea" + }, { + "type": "checkbox" + }]; + + + + $scope.task = []; + + $scope.addComponent = function(){ + $scope.task.push($scope.newComp); + $scope.newComp = {}; + } + } +]); \ No newline at end of file diff --git a/templates/views/index.html b/templates/views/index.html index f1fef9e..9599164 100644 --- a/templates/views/index.html +++ b/templates/views/index.html @@ -100,6 +100,7 @@ + \ No newline at end of file diff --git a/templates/views/newTask.html b/templates/views/newTask.html new file mode 100644 index 0000000..434eeca --- /dev/null +++ b/templates/views/newTask.html @@ -0,0 +1,48 @@ +
+
+
+

+ Task Info: +

+
+ +
+ +
+

+ Add A component: +

+
+
+ Select Type: + + {{component.type}} + +
+
+ + + + +
+
+ + Mandatory?: {{ newComp.isMandatory}} + +
+
+
+ Add Component +
+ +
+ +

+ Task Preview: +

+

{{task.toString()}}

+
+ +
\ No newline at end of file diff --git a/templates/views/settings.html b/templates/views/settings.html index 8121fb4..c90b019 100644 --- a/templates/views/settings.html +++ b/templates/views/settings.html @@ -55,6 +55,10 @@ + +

+ Statistics: +