Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
fix(annotation): add tooltip to project_id
Browse files Browse the repository at this point in the history
Closes #2066
Christine Yu committed Apr 26, 2016
1 parent 8e0cfba commit cf2c32a
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/scripts/annotations/annotations.controllers.ts
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ module ngApp.annotations.controllers {
import IAnnotationsService = ngApp.annotations.services.IAnnotationsService;
import TableiciousConfig = ngApp.components.tables.directives.tableicious.TableiciousConfig;
import IFacetService = ngApp.components.facets.services.IFacetService;
import IProjectsService = ngApp.projects.services.IProjectsService;


export interface IAnnotationsController {
@@ -58,7 +59,9 @@ module ngApp.annotations.controllers {

class AnnotationController implements IAnnotationController {
/* @ngInject */
constructor(public annotation: IAnnotation, private CoreService: ICoreService) {
constructor(public annotation: IAnnotation,
public ProjectsService: IProjectsService,
private CoreService: ICoreService) {
CoreService.setPageTitle("Annotation", annotation.annotation_id);
}
}
4 changes: 3 additions & 1 deletion app/scripts/annotations/templates/annotation.html
Original file line number Diff line number Diff line change
@@ -38,7 +38,9 @@ <h3 class="panel-title" data-translate>Summary</h3>
<tr>
<th data-translate scope="row">Project ID</th>
<td>
<a data-ui-sref="project({ projectId: ac.annotation.project.project_id })">
<a data-ui-sref="project({ projectId: ac.annotation.project.project_id })"
data-uib-tooltip="{{ ::ac.ProjectsService.projectIdMapping[ ac.annotation.project.project_id ] }}"
>
{{ ::ac.annotation.project.project_id }}
</a>
</td>
1 change: 1 addition & 0 deletions app/scripts/annotations/tests/annotations.tests.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ describe('Annotations:', function () {
$provide.value('AuthRestangular', {});
$provide.value('notify', {});
$provide.value('config', {});
$provide.value('ProjectsService', {});
}));

// Injection of dependencies, $http will be mocked with $httpBackend

0 comments on commit cf2c32a

Please sign in to comment.