-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
121 lines (121 loc) · 4.94 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!doctype html>
<html lang="en" ng-app="jackalApp">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Jackal Database Dev Functions</title>
<link rel="stylesheet" href="vendor/css/normalize.css">
<link rel="stylesheet" href="vendor/css/bootstrap.min.css">
<link rel="stylesheet" href="app/css/app.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="vendor/js/bootstrap.min.js"></script>
<script src="vendor/js/angular.js"></script>
<script src='https://cdn.firebase.com/v0/firebase.js'></script>
<script src="https://cdn.firebase.com/v0/firebase-simple-login.js"></script>
<script src='https://cdn.firebase.com/libs/angularfire/0.3.0/angularfire.min.js'></script>
<script src="app/js/app.js"></script>
</head>
</html>
<body ng-controller="DatabaseCtrl">
<div class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-content">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Jackal</a>
</div>
</div>
<div class="container">
<div class="well">
<span ng-show="user">
<a ng-click="logout()">Logout</a> | {{user.name}} | {{user.uid}}
</span>
<span ng-hide="user">
<a ng-click="login()">Login</a>
</span>
</div>
<div class="panel panel-default" ng-show="user">
<div class="panel-heading">
<div class="form-group">
<button type="button" class="btn btn-default" ng-hide="activeID" ng-click="addSession()">
<span class="glyphicon glyphicon-file"></span>
</button>
<button type="button" class="btn btn-default" ng-show="activeID && active.owner == user.uid" ng-click="saveSession()">
<span class="glyphicon glyphicon-floppy-disk"></span>
</button>
<button type="button" class="btn btn-default" ng-show="activeID && active.owner != user.uid" ng-click="forkSession()">
<span class="glyphicon glyphicon-random"></span>
</button>
<button type="button" class="btn btn-default" ng-show="activeID" ng-click="removeSession()">
<span class="glyphicon glyphicon-trash"></span>
</button>
<button type="button" class="btn btn-default" ng-show="activeID" ng-click="closeSession()">
<span class="glyphicon glyphicon-remove"></span>
</button>
<button type="button" class="btn btn-default" disabled="disabled" ng-show="active.created">
Added: {{active.created | date:'short'}}
</button>
<button type="button" class="btn btn-default" disabled="disabled" ng-show="active.lastChanged">
Editted: {{active.lastChanged | date:'short'}}
</button>
<button type="button" class="btn btn-default" disabled="disabled" ng-show="active.created">
By: {{active.owner}}
</button>
<button type="button" class="btn btn-default" disabled="disabled" ng-show="active.forkedFrom">
Forked From: {{active.forkedFrom}}
</button>
<input type="checkbox" class="pull-right" ng-model="active.public">
</div>
</div>
<div class="panel-body">
<input type="text" class="form-control" ng-model="active.title">
<hr>
<textarea class="form-control" rows="5" ng-model="active.code"></textarea>
</div>
</div>
<div class="panel panel-default" ng-show="user">
<div class="panel-heading">
My Private Sessions
</div>
<div class="panel-body">
<div class="btn-group">
<button class="btn btn-default" ng-repeat="session in myPrivateSessions" ng-click="setActive(session.$id, session, false, user.uid)">
{{session.title}}
</button>
</div>
</div>
</div>
<div class="panel panel-default" ng-show="user">
<div class="panel-heading">
My Public Sessions
</div>
<div class="panel-body">
<div class="btn-group">
<button class="btn btn-default" ng-repeat="session in myPublicSessions" ng-click="setActive(session.$id, session, true, user.uid)">
{{session.title}}
</button>
</div>
</div>
</div>
<div class="panel panel-default" ng-show="user">
<div class="panel-heading">
All Public Sessions
</div>
<!-- requires nested iterator because the sessions are stored in a list for each user within a list of all other users -->
<div class="panel-body" ng-repeat="userObj in allPublicSessions" ng-show="userObj.sessions.length > 0">
<!-- iterate over the sessions for each user -->
<div class="btn-group">
<button class="btn btn-primary" disabled="disabled">
{{userObj.username}}
</button>
<button class="btn btn-default" ng-repeat="session in userObj.sessions" ng-click="setActive(session.$id, session, true, userObj.uid)">
{{session.title}}
</button>
</div>
</div>
</div>
</div>
</body>
</html>