Skip to content

Commit

Permalink
Fixed click/a bug & hide a until ready
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Sep 9, 2014
1 parent da4fc7b commit 68999bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/app/recordings/recentRecordings/_recentRecordings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
tr:hover {
cursor: pointer;
}

.hide * {
visibility: collapse;
}
}
6 changes: 5 additions & 1 deletion src/app/recordings/recentRecordings/recentRecordings.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ angular.module("bawApp.recordings.recentRecordings", [])
console.error(reason);
});

$scope.navigate = function navigate(link) {
$scope.navigate = function navigate($event, link) {
if ($event.target.nodeName.toLowerCase() == "a") {
return;
}

$location.url(link);
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/recordings/recentRecordings/recentRecordings.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ <h1>Recent Audio Recordings</h1>
</tr>
</thead>
<tbody>
<tr ng-repeat="r in recentRecordings" ng-click="navigate(r.listenLink)">
<tr ng-repeat="r in recentRecordings" ng-click="navigate($event, r.listenLink)">
<td>{{r.site.name || r.siteId}}</td>
<td>{{r.durationHumanized}}</td>
<td>{{r.uploadedHumanized}}</td>
<td>
<td ng-class="{hide:!r}">
<a ng-href="{{r.listenLink}}" class="btn btn-primary btn-small">
<span class="glyphicon glyphicon-play"></span> Play
</a>
Expand Down

0 comments on commit 68999bf

Please sign in to comment.