-
Notifications
You must be signed in to change notification settings - Fork 0
/
pseudo.txt
67 lines (49 loc) · 1.46 KB
/
pseudo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
File Structure:
render-user.js - holds JS to output to HTML
app.js - holds global array to make variables
accessible to other functions.
adding-removing.js - holds functions/data
app-user.js - holds major objects
{all[], add:, remove:, load:, save:}
MVP:
1) need to be able to enter data
Create a form with first name, last name, and email fields
2) add the todo to the list
3) delete a todo
4) style IT
Functions
1) to accept input we need --- <form>, <ul>
2) JS generate the <li> dynamically
3) <button>X</button> removes the <li> from the <ul>
F - "grabUserInput grabs the inputs from input class .userInfo
(validates all fields have an entry)
passes them to the createUsers
calling the add function
calling the render function
clears the input fields.
F - createUser = function (txt)
create a new object{
firstName: txt
lastName: txt
email: txt
}
F - add to list
?F - remove (splice)
F - load JSON.localstorage getItem
F - save JSON.localstorage ??Item
F - render the inputs
F - generate the <li>
F - generate button and assign to <li>
F - "Removing"
When the button is clicked
run the function to find the closest <li>
??? li.data('index');
remove(index)
render "all" list again
Features
1) validate the email by --- if (!'@') then alert user to enter valid email
2) Remove user
3) persist user data
4) sort by full name z-a, a-z
5) add sort by drop down
Testing the merge