-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(audioButtons): previous and next buttons as components, routing …
…for citizenScience
- Loading branch information
Showing
7 changed files
with
83 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
angular.module("bawApp.audioControls",[ | ||
"bawApp.audioControls.playButton", | ||
"bawApp.audioControls.volumeSlider" | ||
"bawApp.audioControls.volumeSlider", | ||
"bawApp.audioControls.clipNavigationButton" | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
angular.module("bawApp.audioControls.clipNavigationButton", []) | ||
.component("clipNavigationButton", { | ||
templateUrl: "audioControls/clipNavigationButton.tpl.html", | ||
controller: [ | ||
"$scope", | ||
function ($scope) { | ||
|
||
var self = this; | ||
|
||
|
||
|
||
/** | ||
* Returns whether the next button is disabled based on whether | ||
* the bound link is a string of length at least 1 | ||
* @returns {boolean} | ||
*/ | ||
$scope.disabled = function () { | ||
var anchorLinkValue = self.anchorLink(); | ||
return !(angular.isString(anchorLinkValue) && anchorLinkValue.length > 0); | ||
}; | ||
|
||
}], | ||
bindings: { | ||
anchorLink: "=", | ||
direction: "=" | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<a class="btn btn-default" ng-href="{{$ctrl.anchorLink()}}" | ||
ng-disabled="disabled()" | ||
title="Previous Recording"> | ||
<span class="glyphicon" ng-class="{'glyphicon-step-backward': $ctrl.direction === 'previous', 'glyphicon-step-forward': $ctrl.direction !== 'previous'}"></span> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters