From 77163df5dc8b91748cad821942deedbb6f5ac734 Mon Sep 17 00:00:00 2001 From: "sravan.mummadi" Date: Sun, 16 Oct 2016 18:46:09 -0500 Subject: [PATCH 1/8] two quadrants --- public/index.html | 90 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 65 insertions(+), 25 deletions(-) diff --git a/public/index.html b/public/index.html index 3bb866403..bfe0fde7d 100644 --- a/public/index.html +++ b/public/index.html @@ -35,49 +35,89 @@

I'm a Todo-aholic {{ todos.length }}

+
+
+ +
+
+ + + + +
+ +
+ +

+ +

+ +
+
- -
-
+ +
+
+
+
- + + +
- -
- + + + +
+
+
+ +
+
-

- -

+ -
-
+ +
+ +
- -
-
-
-
+

+ +

- - +
- - - + +
+
+
+
+ + + +
+ + + +
+
+
-

A demo by Scotch.

Read the tutorial.

+ From bc333956d348d7c8799e6a9939d947b4773affbf Mon Sep 17 00:00:00 2001 From: "sravan.mummadi" Date: Sun, 16 Oct 2016 19:03:22 -0500 Subject: [PATCH 2/8] cosmetic changes --- public/index.html | 55 ++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/public/index.html b/public/index.html index bfe0fde7d..2d5181ea3 100644 --- a/public/index.html +++ b/public/index.html @@ -36,10 +36,28 @@

I'm a Todo-aholic {{ todos.length }}

-
+
+ + +
+
+
+
+ + + +
+ + + +
+
+
+ +
-
+
@@ -57,9 +75,14 @@

I'm a Todo-aholic {{ todos.length }}

+ +
+ +
+
-
+
@@ -72,11 +95,10 @@

I'm a Todo-aholic {{ todos.length }}

-
-
+
-
+
@@ -94,27 +116,10 @@

I'm a Todo-aholic {{ todos.length }}

- -
-
- -
- - - -
- - - - -
-
+
-
-

A demo by Scotch.

-

Read the tutorial.

-
+
From c8cb73c5b02fcf3173b99ea56db68ade9718b735 Mon Sep 17 00:00:00 2001 From: "sravan.mummadi" Date: Sun, 16 Oct 2016 19:06:26 -0500 Subject: [PATCH 3/8] placeholder change --- public/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index 2d5181ea3..72148fa2d 100644 --- a/public/index.html +++ b/public/index.html @@ -45,7 +45,7 @@

I'm a Todo-aholic {{ todos.length }} - +

@@ -87,7 +87,7 @@

I'm a Todo-aholic {{ todos.length }} - +

From d011cf32190e85c70efaa5f4ce218914afd39ab5 Mon Sep 17 00:00:00 2001 From: "sravan.mummadi" Date: Sun, 16 Oct 2016 19:27:08 -0500 Subject: [PATCH 4/8] Mongod path added --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5a83fc441..b48ea3a5e 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Node provides the RESTful API. Angular provides the frontend and accesses the AP - [Node and npm](http://nodejs.org) - MongoDB: Make sure you have your own local or remote MongoDB database URI configured in `config/database.js` +- MongoDB folder if installed with Hebrew : Mongoldb path : /usr/local/Cellar/mongodb/3.2.10/bin +- to Start MongoDB: mongod ## Installation From fba2858ffab48ec74d8697f8db30311e95f68c85 Mon Sep 17 00:00:00 2001 From: "sravan.mummadi" Date: Sun, 16 Oct 2016 19:28:06 -0500 Subject: [PATCH 5/8] changed order --- public/index.html | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/public/index.html b/public/index.html index 72148fa2d..2084fdb1d 100644 --- a/public/index.html +++ b/public/index.html @@ -38,21 +38,7 @@

I'm a Todo-aholic {{ todos.length }}
- -
-
-
-
- - - -
- - - -
-
-
+ @@ -74,12 +60,6 @@

I'm a Todo-aholic {{ todos.length }}

- - -

- -
-
@@ -96,6 +76,13 @@

I'm a Todo-aholic {{ todos.length }}

+ +
+ +
+ + +
@@ -115,6 +102,21 @@

I'm a Todo-aholic {{ todos.length }}

+ +
+
+
+
+ + + +
+ + + +
+
+
From cc6bd6d37dde7968fa6ba5fc25a27b914cbe56b0 Mon Sep 17 00:00:00 2001 From: "sravan.mummadi" Date: Sun, 16 Oct 2016 21:36:43 -0500 Subject: [PATCH 6/8] changed the button names --- README.md | 4 ++++ app/models/todo.js | 4 ++++ app/routes.js | 3 +-- mongodb_tut | 3 +++ package.json | 2 +- public/index.html | 8 ++++---- public/js/controllers/main.js | 5 +++-- 7 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 mongodb_tut diff --git a/README.md b/README.md index b48ea3a5e..15f783e81 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,10 @@ Node provides the RESTful API. Angular provides the frontend and accesses the AP ## Installation +step1: install git +step2: install npm +step3: npm install -g nodemon + 1. Clone the repository: `git clone git@github.com:scotch-io/node-todo` 2. Install the application: `npm install` 3. Place your own MongoDB URI in `config/database.js` diff --git a/app/models/todo.js b/app/models/todo.js index 770f42a6f..68a6610fc 100644 --- a/app/models/todo.js +++ b/app/models/todo.js @@ -4,5 +4,9 @@ module.exports = mongoose.model('Todo', { text: { type: String, default: '' + }, + quad: { + type: String, + default: 'imp-urg' } }); \ No newline at end of file diff --git a/app/routes.js b/app/routes.js index b78dbe4fa..0c28b1b8e 100644 --- a/app/routes.js +++ b/app/routes.js @@ -26,8 +26,7 @@ module.exports = function (app) { // create a todo, information comes from AJAX request from Angular Todo.create({ - text: req.body.text, - done: false + text: req.body.text }, function (err, todo) { if (err) res.send(err); diff --git a/mongodb_tut b/mongodb_tut new file mode 100644 index 000000000..71a8e7e9a --- /dev/null +++ b/mongodb_tut @@ -0,0 +1,3 @@ +To get mongo terminal +go to installation folder. +if you installed with hebrew go to /usr/local/Cellar/mongodb/3.2.10/bin and type mongo diff --git a/package.json b/package.json index b4584b750..a1fe87eee 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "author": "Scotch", "dependencies": { "body-parser": "^1.4.3", - "express": "^4.13.4", + "express": "^4.14.0", "method-override": "^2.1.3", "mongoose": "^4.4.12", "morgan": "^1.1.1" diff --git a/public/index.html b/public/index.html index 2084fdb1d..afc1ee93a 100644 --- a/public/index.html +++ b/public/index.html @@ -67,11 +67,11 @@

I'm a Todo-aholic {{ todos.length }} - +

- +
@@ -109,11 +109,11 @@

I'm a Todo-aholic {{ todos.length }} - +

- +
diff --git a/public/js/controllers/main.js b/public/js/controllers/main.js index 7cb2ce277..9ace343f0 100644 --- a/public/js/controllers/main.js +++ b/public/js/controllers/main.js @@ -16,8 +16,9 @@ angular.module('todoController', []) // CREATE ================================================================== // when submitting the add form, send the text to the node API - $scope.createTodo = function() { - + $scope.createTodo = function(event) { + $scope.button=event.target.id; + console.log($scope.button); // validate the formData to make sure that something is there // if form is empty, nothing will happen if ($scope.formData.text != undefined) { From bbef3ec71a449948792276cdb4feb8eda275bdc2 Mon Sep 17 00:00:00 2001 From: "sravan.mummadi" Date: Sun, 27 Nov 2016 14:15:13 -0600 Subject: [PATCH 7/8] added --- MongoDBCommands | 2 ++ README.md | 4 +++- Tasks_Format | 4 ++++ public/index.html | 4 ++-- public/js/services/todos.js | 1 + 5 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 MongoDBCommands create mode 100644 Tasks_Format diff --git a/MongoDBCommands b/MongoDBCommands new file mode 100644 index 000000000..1688ff14f --- /dev/null +++ b/MongoDBCommands @@ -0,0 +1,2 @@ +To List all data bases: show dbs +to select a data base: use 'dbnme' \ No newline at end of file diff --git a/README.md b/README.md index 15f783e81..39a893d84 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,10 @@ Node provides the RESTful API. Angular provides the frontend and accesses the AP - [Node and npm](http://nodejs.org) - MongoDB: Make sure you have your own local or remote MongoDB database URI configured in `config/database.js` -- MongoDB folder if installed with Hebrew : Mongoldb path : /usr/local/Cellar/mongodb/3.2.10/bin +- MongoDB folder if installed with Hebrew : Mongodb path : /usr/local/Cellar/mongodb/3.2.10/bin - to Start MongoDB: mongod +- to stop MongoDB: +- to get mongo terminal : Go to MongoDB Path and enter cmd 'Mongo' ## Installation diff --git a/Tasks_Format b/Tasks_Format new file mode 100644 index 000000000..eaf88018b --- /dev/null +++ b/Tasks_Format @@ -0,0 +1,4 @@ +A task is a unit of work. +Task can have several characterisitcs. +Task can be of several types. Task can be dependent on another task. A task can have sub tasks. +1) Defect Task: { defect id, ETA, isFrontend, iserrorinlogs, replicable, subtask: {update QC, commited code, }} \ No newline at end of file diff --git a/public/index.html b/public/index.html index afc1ee93a..545225f63 100644 --- a/public/index.html +++ b/public/index.html @@ -61,7 +61,7 @@

I'm a Todo-aholic {{ todos.length }}

-
+
@@ -103,7 +103,7 @@

I'm a Todo-aholic {{ todos.length }}

-
+
diff --git a/public/js/services/todos.js b/public/js/services/todos.js index 49761e727..76a2f5f48 100644 --- a/public/js/services/todos.js +++ b/public/js/services/todos.js @@ -5,6 +5,7 @@ angular.module('todoService', []) .factory('Todos', ['$http',function($http) { return { get : function() { + console.log("in get function"); return $http.get('/api/todos'); }, create : function(todoData) { From 6139a4b03a2d0be738859722ceb08c30c6c5b156 Mon Sep 17 00:00:00 2001 From: "sravan.mummadi" Date: Sat, 3 Dec 2016 18:42:31 -0600 Subject: [PATCH 8/8] test --- mongodb_tut | 1 + 1 file changed, 1 insertion(+) diff --git a/mongodb_tut b/mongodb_tut index 71a8e7e9a..2a9ea5aa6 100644 --- a/mongodb_tut +++ b/mongodb_tut @@ -1,3 +1,4 @@ To get mongo terminal go to installation folder. if you installed with hebrew go to /usr/local/Cellar/mongodb/3.2.10/bin and type mongo +test