-
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(citSci): formatting dataset item info and adding onboarding for …
…those item info and progress bar
- Loading branch information
Showing
5 changed files
with
69 additions
and
31 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
angular.module("bawApp.citizenScience.itemInfo", ["bawApp.components.onboarding"]) | ||
.component("itemInfo", { | ||
templateUrl: "citizenScience/listen/itemInfo.tpl.html", | ||
controller: [ | ||
"$scope", "moment", "conf.constants", "onboardingService", | ||
function ($scope, moment, constants, onboardingService) { | ||
|
||
var self = this; | ||
|
||
$scope.ready = false; | ||
$scope.dateString = null; | ||
$scope.projectList = []; | ||
$scope.site = null; | ||
$scope.datasetItemId = null; | ||
|
||
$scope.$watch(() => self.sample.item, (newVal) => { | ||
|
||
if (self.sample.item && self.sample.item.hasOwnProperty("start")) { | ||
$scope.ready = true; | ||
$scope.dateString = moment(self.sample.item.start).format(constants.localization.dateTimeFormat); | ||
$scope.projectList = self.sample.item.audioRecording.site.projects.filter(p => p.hasOwnProperty("name")).map(p => p.name); | ||
$scope.site = self.sample.item.audioRecording.site.name; | ||
} | ||
|
||
}); | ||
|
||
onboardingService.addSteps({ | ||
element: "item-info", | ||
intro: "The date, time and location information", | ||
order: 2.5 | ||
}); | ||
|
||
}], | ||
bindings: { | ||
sample:"<" | ||
} | ||
}); |
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,15 @@ | ||
|
||
<span>{{dateString}}</span> | ||
<span> | ||
<span class="project_info"> | ||
<span ng-repeat="project in projectList"> | ||
<span class="glyphicon glyphicon-home"></span>{{project}} | ||
</span> | ||
</span> | ||
<span class="glyphicon glyphicon-map-marker"></span>{{site}} | ||
</span> | ||
|
||
|
||
|
||
|
||
|
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