-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
116 lines (98 loc) · 4.87 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
<!doctype html>
<html lang="en" ng-app>
<head>
<meta charset="utf-8">
<title>Unhosted Time Tracker</title>
<link rel="stylesheet" href="libs/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="page">
<div id="remotestorage-connect"></div>
<h1>Unhosted Time Tracker</h1>
<div ng-controller="TaskController">
<form class="form-inline" ng-submit="addTask()">
<input id="addTaskText" type="text" ng-model="taskText" size="40" autofocus="true"
placeholder="Add new task title here ...">
<input class="btn btn-primary" type="submit" value="Add Task">
</form>
<div ng-switch on="tasks.length">
<div class="alert alert-info" id="noTaskTitleWarning" style="display: none;" ng-show="noTaskTitleWarning">
Sorry, but You can't add a Task without a title!
</div>
<div ng-switch-when="0" class="alert alert-info" style="display: none;" ng-show="tasks.length==0">
You have no tasks yet. Please add some tasks<span ng-show="!isConnected"> or connect
to your remote storage account by using the funny button in the right top corner</span>!
</div>
<div ng-switch-default style="display: none;" ng-show="tasks.length>0">
<table class="table table-bordered tasks">
<thead>
<th>Done?</th>
<th>Task Title</th>
<th>Tracked Time</th>
<th></th>
</thead>
<tbody>
<tr ng-repeat="task in tasks" class="completed-{{task.completed}} tracking-{{isTracking(task)}}">
<td>
<input type="checkbox" ng-model="task.completed" ng-click="onToggledCompleted(task)">
</td>
<td>
<span class="taskTitle">{{task.title}}</span>
</td>
<td>
<span class="spentTimeLabel">{{spentTimeLabel(task)}}</span>
</td>
<td>
<div class="btn-group">
<button class="btn" ng-class="{active:isTracking(task),'btn-warning':isTracking(task)}"
ng-click="onTrackButton(task)">{{trackButtonLabel(task)}}
</button>
<button class="btn dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#" ng-click="showAddTimeDialog(task);">Add time
manually</a></li>
<li><a href="#" ng-click="removeTask(task);">Remove Task</a></li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
<span>{{remaining()}} of {{tasks.length}} remaining</span>
<button class="btn btn-mini" ng-click="removeFinishedTasks()">Remove Done Tasks</button>
</div>
</div>
<div id="addTimeDialog" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Add Time to Task "{{currentTask.title}}"</h3>
</div>
<form class="addTimeForm" ng-submit="addTime()">
<div class="modal-body">
<p>
Add <input id="addedHours" type="number" maxlength="2" min="-99" max="99" ng-model="addedHours" size="3"> hours and
<input id="addedMinutes" type="number" maxlength="2" min="-99" max="99" ng-model="addedMinutes" size="3"> minutes.
</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Cancel</a>
<input class="btn btn-primary" type="submit" value="Add Time">
</div>
</form>
</div>
</div>
</div>
<script src="libs/angular/angular.min.js"></script>
<script src="libs/sugar.min.js"></script>
<script src="libs/jquery/jquery.min.js"></script>
<script src="libs/bootstrap/js/bootstrap.min.js"></script>
<script src="libs/remote-storage/remoteStorage-debug.js"></script>
<!-- <script src="https://raw.github.com/RemoteStorage/remoteStorage.js/gh-pages/build/0.7.0-head/remoteStorage-debug.js"></script> -->
<script src="libs/remote-storage/tasks-js.js"></script>
<script src="app.js"></script>
</body>
</html>