-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
85 lines (72 loc) · 3.05 KB
/
index.html
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html ng-app="trello">
<head>
<title>Trello</title>
</head>
<body ng-controller="body">
<header>
<form ng-show="!isLoggedIn && !newUser" ng-submit="login()">
Sign in:
Email: <input type="email" ng-required="true" ng-model="userName"></input>
Pwd: <input type="password" ng-required="true" ng-model="pwd"></input>
<input type="submit" value="Login" >
<a href=""><span ng-click="showSignup(true)">New user</span></a>
</form>
<form ng-show="!isLoggedIn && newUser" ng-submit="signup()">
New User:
Email: <input type="email" ng-required="true" ng-model="newUserName"></textarea>
Pwd: <input type="password" ng-required="true" ng-model="newPwd"></input>
<input type="submit" value="Signup" >
<a href=""><span ng-click="showSignup(false)">Existing</span></a>
</form>
<div ng-show="isLoggedIn">
Logged in as: {{user.email}}
<input type="button" value="Logout" ng-click="logout()">
</div>
<hr>
{{msg}}
<hr>
</header>
<h2>People on Trello</h2>
<div ng-repeat="(id,obj) in people">
{{obj.email}} <input type="button" ng-show="showShareBtn(obj.email)" value="Add to current board" ng-click="shareWith(obj.email)">
</div>
<hr>
<div ng-show="isLoggedIn">
<h2>Add a Board</h2>
<div class="inputWrapper">
<form ng-submit="addBoard()">
Board Name: <textarea ng-required="true" ng-model="newBoardName"></textarea>
<input id="addBoard" type="submit" value="Add" >
</form>
</div>
<h2>Boards</h2>
<div ng-repeat = "(id,board) in displayBoards"> <!--ng-repeat-->
<a href="" ng-click="selectBoard(id,board)"> <strong>{{board.name}}</strong></a> - by {{board.by}}
</div>
<div ng-show="selectedBoard">
<h2>Selected Board: {{selectedBoard.name}}</h2>
<h3>Shared amongst:</h3>
<div ng-repeat = "(id,obj) in shared"> <!--ng-repeat-->
{{obj.email}} <input type="button" ng-show="showUnshareBtn(obj.email)" value="Remove" ng-click="dontShareWith(obj.email)">
</div>
<h3>Add a Card</h3>
<form ng-submit="addCard()">
Card Name: <textarea ng-required="true" ng-model="newCardName" ></textarea>
<input type="submit" value="Add" >
</form>
<h3>Cards</h3>
<div ng-repeat = "(id,card) in cards"> <!--ng-repeat-->
<strong>{{card.name}}</strong></a> {{card.by}}
</div>
</div>
</div>
<script src="angular.min.js"></script>
<script src="ng-code.js"></script>
<script src="https://cdn.firebase.com/v0/firebase.js"></script>
<script type='text/javascript'
src='https://cdn.firebase.com/js/simple-login/1.3.2/firebase-simple-login.js'>
</script>
<script src="https://cdn.firebase.com/libs/angularfire/0.7.1/angularfire.min.js"></script>
</body>
</html>