-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (56 loc) · 2.21 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
<!doctype html>
<html lang="en" ng-app="t9Word">
<head>
<meta charset="utf-8">
<title>T9 Word</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/t9word.css">
<script src="js/t9.js"></script>
<script src="js/lib/angular.min.js"></script>
<script src="js/controllers.js"></script>
</head>
<body ng-controller="T9Ctrl" ng-keypress="pressPhoneKey($event)">
<h1>T9 Word</h1>
<div id="phone-pad">
<div class="row">
<a href="" ng-click="addToSequence(1)">1<small> </small></a>
<a href="" ng-click="addToSequence(2)">2<small>ABC</small></a>
<a href="" ng-click="addToSequence(3)">3<small>DEF</small></a>
</div>
<div class="row">
<a href="" ng-click="addToSequence(4)">4<small>GHI</small></a>
<a href="" ng-click="addToSequence(5)">5<small>JKL</small></a>
<a href="" ng-click="addToSequence(6)">6<small>MNO</small></a>
</div>
<div class="row">
<a href="" ng-click="addToSequence(7)">7<small>PQRS</small></a>
<a href="" ng-click="addToSequence(8)">8<small>TUV</small></a>
<a href="" ng-click="addToSequence(9)">9<small>WXYZ</small></a>
</div>
<div class="row">
<a href="" ng-click="undoLast()">*<small>(undo)</small></a>
<a href="" ng-click="addToSequence(0)">0<small> </small></a>
<a href="" ng-click="clearSequence()">#<small>(clear)</small></a>
</div>
</div>
<div id="t9words">
<h2>{{numberSequence}}</h2>
<div class="info">
<aside class="total">Total words: {{words.length | number:0}}</aside>
<aside class="search">Search: <input type="search" ng-model="query"></aside>
</div>
<div class="words">
<ul>
<li ng-repeat="word in words | filter:query | startFrom:currentPage*pageSize | limitTo:pageSize">
{{word}}
</li>
</ul>
</div>
<div class="pager" ng-hide="numberOfPages() <= 1">
<button ng-hide="currentPage == 0" ng-click="currentPage=currentPage-1"><</button>
<span>{{currentPage+1 | number:0}} / {{numberOfPages() | number:0}}</span>
<button ng-hide="currentPage >= filteredWords.length/pageSize - 1" ng-click="currentPage=currentPage+1">></button>
</div>
</div>
</body>
</html>