-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
65 lines (60 loc) · 2.76 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
<html lang="en" ng-app="music">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.5/angular-material.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
</head>
<body ng-cloak ng-controller="ListController">
<div layout layout-align="center center">
<md-input-container>
<label>Search</label>
<input ng-model="filter" ng-change="filterChanged()">
</md-input-container>
</div>
<div layout layout-align="center center">
<md-checkbox ng-model="limit"></md-checkbox>
<md-input-container>
<label>Limit artists</label>
<input ng-model="maxResults">
</md-input-container>
</div>
<div layout layout-align="center center">
<md-checkbox ng-model="expandAll">Expand all</md-checkbox>
</div>
<div layout layout-align="center center">
<md-input-container>
<label>x</label>
<input ng-model="times" type="number" min="1" max="5">
</md-input-container>
</div>
<md-list>
<md-list-item layout="column" class="md-2-line"
ng-repeat="artist in (filteredArtists=(artists | filter : filterArtist | limitTo : (limit ? maxResults : undefined)))">
<div class="md-list-item-text">
<h3 ng-click="!expandAll && toggleExpanded($index)">
<span ng-hide="expandAll">
[<span ng-show="artist.expanded">-</span><span ng-hide="artist.expanded">+</span>]
</span>
{{artist.artist}} ({{artist.tracks.length}})
</h3>
</div>
<md-list-item layout ng-show="expandAll || artist.expanded" class="md-list-item-text" class="md-offset"
ng-repeat="track in artist.tracks | filter : filterTracks">
<h4>{{track.title}}</h4>
<md-button ng-click="addTrackToPlaylist(track)">
<md-icon>playlist_add</md-icon>
</md-button>
</md-list-item>
<md-divider ng-hide="$last"/>
</md-list-item>
</md-list>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.5/angular-material.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.5.1/lodash.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>