Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 80: On "Active Sprints" board show icon for Milestone or Projec…
…t depending on how the Sprint is populated The crafted icons are added any each reasonable location, helping improve usability via the icon as hints. This includes icons for all known ServiceTypes. This also fixes the management board, thereby allowing for the remote project management icons being displayed in this case as well.
- Loading branch information
Showing
18 changed files
with
196 additions
and
16 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,34 @@ | ||
app.directive('remoteProjectsIcon', function ($controller) { | ||
return { | ||
templateUrl: 'views/directives/remoteProjectsIcon.html', | ||
restrict: 'E', | ||
scope: { | ||
type: '@', | ||
width: '@', | ||
height: '@' | ||
}, | ||
link: function ($scope, element, attr) { | ||
$scope.typeIcon = false; | ||
$scope.tooltip = ""; | ||
|
||
if ($scope.type === 'GITHUB_MILESTONE') { | ||
$scope.typeIcon = 'github-milestone.png'; | ||
$scope.tooltip = "Github Milestone"; | ||
} else if ($scope.type === 'GITHUB_PROJECT') { | ||
$scope.typeIcon = 'github-project.png'; | ||
$scope.tooltip = "Github Project"; | ||
} else if ($scope.type === 'VERSION_ONE') { | ||
$scope.typeIcon = 'versionone.png'; | ||
$scope.tooltip = "Versione One"; | ||
} | ||
|
||
if (angular.isUndefined($scope.width)) { | ||
$scope.width = "16"; | ||
} | ||
|
||
if (angular.isUndefined($scope.height)) { | ||
$scope.height = "16"; | ||
} | ||
} | ||
}; | ||
}); |
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,2 +1,3 @@ | ||
@import "header"; | ||
@import "footer"; | ||
@import "footer"; | ||
@import "remoteProjectsIcon"; |
5 changes: 5 additions & 0 deletions
5
app/resources/styles/sass/directives/_remoteProjectsIcon.scss
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 @@ | ||
.remote-product-icon { | ||
display: inline-block; | ||
position: relative; | ||
top: 0px; | ||
} |
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,3 @@ | ||
<span ng-if="typeIcon" class="remote-product-icon"> | ||
<img src="resources/images/{{typeIcon}}" title="{{tooltip}}" width="{{width}}" height="{{height}}" aria-hidden="true"> | ||
</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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
describe("directive: remoteProjectsIcon", function () { | ||
var $compile, $q, $scope, directive, element; | ||
|
||
var initializeVariables = function () { | ||
inject(function (_$q_, _$compile_) { | ||
$q = _$q_; | ||
$compile = _$compile_; | ||
}); | ||
}; | ||
|
||
var initializeDirective = function (settings) { | ||
inject(function (_$rootScope_) { | ||
$scope = _$rootScope_.$new(); | ||
|
||
var attr = settings && settings.attr ? settings.attr : "type=\"GITHUB_MILESTONE\""; | ||
var body = settings && settings.body ? settings.body : ""; | ||
|
||
element = angular.element("<remote-projects-icon " + attr + ">" + body + "</remote-projects-icon>"); | ||
directive = $compile(element)($scope); | ||
|
||
$scope.$digest(); | ||
}); | ||
}; | ||
|
||
beforeEach(function () { | ||
module("core"); | ||
module("app"); | ||
module("templates"); | ||
|
||
installPromiseMatchers(); | ||
initializeVariables(); | ||
}); | ||
|
||
describe("Is the directive", function () { | ||
it("defined", function () { | ||
initializeDirective(); | ||
expect(directive).toBeDefined(); | ||
}); | ||
}); | ||
}); |