Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
b713776
a progressbar with javascript
lanetminal Jan 6, 2017
06cd90c
added folder
lanetminal Jan 13, 2017
e42ec91
extended an existing online project
lanetminal Jan 17, 2017
91d4eef
Merge pull request #1 from rupalitomar5/develop
rupalitomar5 Jan 17, 2017
c3aad38
performed CRUD with UI
lanetminal Jan 17, 2017
7eeb393
performed CRUD with file using UI
lanetminal Jan 18, 2017
7cdb1d9
database operations
lanetminal Jan 19, 2017
9570d5e
Merge pull request #5 from rupalitomar5/task
rupalitomar5 Jan 19, 2017
e64ee0b
Resolved errors
lanetminal Jan 20, 2017
b8538ab
Crud in mysql
lanetminal Jan 20, 2017
95cb0e3
Merge pull request #6 from rupalitomar5/task
rupalitomar5 Jan 20, 2017
593edd9
Resolved errors with select
lanetminal Jan 20, 2017
9b4f498
resolved errors
lanetminal Jan 21, 2017
a198291
added sorting and paging in mongodb
lanetminal Jan 21, 2017
0a8f59e
Merge pull request #7 from rupalitomar5/task
rupalitomar5 Jan 21, 2017
e382982
added relationship, validation,paging errors and file uploading
lanetminal Jan 23, 2017
4410b3e
Merge pull request #8 from rupalitomar5/task
rupalitomar5 Jan 23, 2017
a18c072
adding a .gitignore
lanetminal Jan 23, 2017
86d6684
two roles added
lanetminal Jan 24, 2017
ccf25dc
Merge pull request #9 from rupalitomar5/task
rupalitomar5 Jan 24, 2017
ced1c2b
trying to modify gitignore
lanetminal Jan 24, 2017
43180a5
checking the modified gitignore
lanetminal Jan 24, 2017
1bba34c
Merge pull request #10 from rupalitomar5/task
rupalitomar5 Jan 24, 2017
f9c44c0
trying to modify gitignore
lanetminal Jan 24, 2017
0d8e03b
Merge branch 'master' of https://github.com/rupalitomar5/practice int…
lanetminal Jan 25, 2017
6d00af7
Merge pull request #11 from rupalitomar5/task
rupalitomar5 Jan 25, 2017
7e8f872
Merge branch 'master' of https://github.com/rupalitomar5/practice int…
lanetminal Jan 25, 2017
794dac6
Trying to change the config
lanetminal Jan 25, 2017
76bb438
Trying to change the gitignore
lanetminal Jan 25, 2017
a262b28
Introducing angular
lanetminal Jan 25, 2017
184482c
Basic angular
lanetminal Jan 25, 2017
1791cfe
Merge pull request #12 from rupalitomar5/task
rupalitomar5 Jan 25, 2017
268b4f3
a more try with .idea folder
lanetminal Jan 27, 2017
1bff803
Update .gitignore
rupalitomar5 Jan 27, 2017
3370d92
Merge pull request #13 from rupalitomar5/task
rupalitomar5 Jan 27, 2017
4bc0693
Angular with apis
lanetminal Jan 27, 2017
2cf6ec6
Merge pull request #14 from rupalitomar5/task
rupalitomar5 Jan 27, 2017
9a996ea
followed a tutorial in Yeoman
lanetminal Jan 30, 2017
7920458
implemented some video angular concepts
lanetminal Jan 30, 2017
76fd710
followed a tutorial in Yeoman
lanetminal Jan 30, 2017
fad2880
Merge pull request #15 from rupalitomar5/test2
rupalitomar5 Jan 30, 2017
379ef8a
sort, filter and loop concepts
lanetminal Jan 31, 2017
7764bf5
sort, filter and loop concepts
lanetminal Jan 31, 2017
8d910fb
Merge branch 'test2' of https://github.com/rupalitomar5/practice into…
lanetminal Jan 31, 2017
672af40
Merge pull request #16 from rupalitomar5/test2
rupalitomar5 Jan 31, 2017
767b724
Merge pull request #17 from rupalitomar5/task
rupalitomar5 Jan 31, 2017
2983258
insertion
lanetminal Feb 1, 2017
3e3ec59
insertion
lanetminal Feb 1, 2017
7ef7348
Merge branch 'task' of https://github.com/rupalitomar5/practice into …
lanetminal Feb 1, 2017
00e1fc5
Merge pull request #18 from rupalitomar5/task
rupalitomar5 Feb 1, 2017
53e178f
work on the project
lanetminal Feb 2, 2017
c7e6923
Merge pull request #19 from rupalitomar5/task
rupalitomar5 Feb 2, 2017
b81ee1b
solved cors problem and displayed the data
lanetminal Feb 3, 2017
7224098
Merge pull request #20 from rupalitomar5/task
rupalitomar5 Feb 3, 2017
d4d5454
solved errors in edit uimodal and made a service
lanetminal Feb 4, 2017
0bcd376
Merge pull request #21 from rupalitomar5/task
rupalitomar5 Feb 4, 2017
8e1e18c
Todays task
lanetminal Feb 6, 2017
54620d9
Merge pull request #22 from rupalitomar5/task
rupalitomar5 Feb 6, 2017
f0512f1
done file upload and autocomplete
lanetminal Feb 7, 2017
ccd8c85
Merge pull request #23 from rupalitomar5/task
rupalitomar5 Feb 7, 2017
5af15fe
sort and search
lanetminal Feb 8, 2017
fbfacee
Merge pull request #24 from rupalitomar5/task
rupalitomar5 Feb 8, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
.idea/
uploads/
Binary file added 19_1_16/My_todolist/.DS_Store
Binary file not shown.
8 changes: 8 additions & 0 deletions 19_1_16/My_todolist/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions 19_1_16/My_todolist/.idea/my-todolist.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

474 changes: 474 additions & 0 deletions 19_1_16/My_todolist/.idea/workspace.xml

Large diffs are not rendered by default.

107 changes: 107 additions & 0 deletions 19_1_16/My_todolist/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
var express = require('express');
var session = require('cookie-session'); // Loads the piece of middleware for sessions
var bodyParser = require('body-parser');// Loads the piece of middleware for managing the settings
var mongoose=require('mongoose');
mongoose.connect('mongodb://localhost:27017/test');
var urlencodedParser = bodyParser.urlencoded({ extended: false });
//var fs = require('fs');
var app = express();
var Task=require('./model/task');
var router=express.Router();
// var buf = new Buffer(1024);
var id,id1=0;
var arr=[],arr1=[],arr2=[],array1=[];
var myo=new Object();
/* If there is no to do list in the session,
we create an empty one in the form of an array before continuing */
app.use(function(req, res, next){
arr=[];
arr1=[];
arr2=[];


if (typeof(arr2) == 'undefined') {
arr2 = [];}
if (typeof(arr) == 'undefined'){
arr=[];
}
if (typeof(arr1) == 'undefined'){
arr1=[];
}

next();
})

/* The to do list and the form are displayed */
router.get('/todo', function(req, res) {
Task.find(function(err,task){myo=JSON.parse(res.json(task));});
res.render('todo.ejs');
//, {todolist:arr, priority: arr1, member:arr2});
})
router.get('/todo1', function(req, res) {
res.render('todo1.ejs');
})
/* Adding an item to the to do list */
router.post('/todo/add/', urlencodedParser, function(req, res) {
if (req.body.newtodo != '') {
var task = new Task();
task.Todo = req.body.newtodo;
task.Memberassigned = req.body.taskassigned;
task.Priority = req.body.s1;
task.save(function (err) {
if (err) {
console.log(err);
}
console.log(task);
})
}
res.redirect('/todo');
})
.post('/todo/update/', urlencodedParser, function(req, res) {
Task.findById(id,function(err,task)
{
console.log(id);
if(err)
{
res.send(err);
}
task.Todo=req.body.updatedtodo;
task.Memberassigned=req.body.updatedmember;
task.Priority=req.body.updatedpriority;

task.save(function(err)
{
if(err) {
throw err;
}
console.log(task);
//res.json({message:'Bear updated!'});
});
})
res.redirect('/todo');
})
/* Deletes an item from the to do list */
router.get('/todo/delete/:_id', function(req, res) {
Task.remove(req.params.id);
res.redirect('/todo');
});
router.get('/todo/update/:id', function(req, res) {
id=req.params.id;
id1=1;
res.redirect('/todo1');
})
/* Redirects to the to do list if the page requested is not found */
app.use('/api',router);
app.use(function(req, res, next){

if(id1==0)
{
res.redirect('/api/todo');
}
else
{
res.redirect('/api/todo1');
}
})
app.listen(8008);

3 changes: 3 additions & 0 deletions 19_1_16/My_todolist/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fffffffffffffffff,1,wwwwwwwwwwwwwww
ffffffffft,tttttttttttttttttt,yyyyyyyyyyyyyyyyy
gggggggggggg,,fffffffffffffffffffff
793 changes: 793 additions & 0 deletions 19_1_16/My_todolist/locations.txt

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions 19_1_16/My_todolist/model/task.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
var mongoose=require('mongoose');
var Schema=mongoose.Schema;
var TaskSchema= new Schema({
Todo:String,
Memberassigned:String,
Priority:Number
});

module.exports=mongoose.model('Task',TaskSchema);
113 changes: 113 additions & 0 deletions 19_1_16/My_todolist/npm-debug.log

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions 19_1_16/My_todolist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "my-todolist",
"version": "0.1.0",
"dependencies": {
"express": "~4.11.0",
"ejs": "~2.1.4",
"mongoose":"4.7,7",
"cookie-session": "~1.1.0",
"body-parser": "~1.10.1"
},
"author": "Mateo21 <mateo21@email.com>",
"description": "A very basic to do list manager"
}
1 change: 1 addition & 0 deletions 19_1_16/My_todolist/test1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var MongoClient=require('mongodb').MongoClient;
Binary file added 19_1_16/My_todolist/views/.DS_Store
Binary file not shown.
41 changes: 41 additions & 0 deletions 19_1_16/My_todolist/views/todo.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>

<html>
<head>
<title>My todolist</title>
<style>
a {text-decoration: none; color: black;}
</style>
</head>

<body>
<h1>My todolist</h1>
<code>
<ul>
<!-- % todolist.forEach(function(todo, index) { %>
% priority.forEach(function(p,index1){%>
% member.forEach(function(m,index2){%>
% if((index==index1) && (index1==index2)){%>
<li><a href="/todo/delete/<!--%= index %>-->"><!--delete </a><a href="/todo/update/<!--<= index %>"> update</a>&nbsp;%= todo %>&nbsp;%=p %>&nbsp;%=m %></li>
% }})})});%>
-->
</ul>
</code>
<form action="/api/todo/add/" method="post">
<p>
<label for="newtodo">What shoud be done?</label>
<input type="text" name="newtodo" id="newtodo" autofocus /><br>
<label for="newtodo">Assigned to whom?</label>
<input type="text" name="taskassigned" id="taskassigned" /><br>
Priority:
<select name="s1" id="s1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<input type="submit" />
</p>
</form>
</body>
</html>
12 changes: 12 additions & 0 deletions 19_1_16/My_todolist/views/todo1.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<form action="/api/todo/update/" method="post">
<p>
<label for="updatedtodo">What shoud I do?</label>
<input type="text" name="updatedtodo" id="updatedtodo" autofocus /><br>
<label for="updatedpriority">Priority</label>
<input type="text" name="updatedpriority" id="updatedpriority" /><br>
<label for="updatedmember">Assigned to whom?</label>
<input type="text" name="updatedmember" id="updatedmember" /><br>
<input type="submit" />
</p>

</form>
12 changes: 12 additions & 0 deletions 19_1_16/Try with Database/.idea/Try with Database.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions 19_1_16/Try with Database/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading