Extremely long strings displayed on UserStory table - fix
String name limited to show 50 characters on table - Tooltip added to show full text on detail view Signed-off-by: Teresita de Jesus Guerrero Vela <teresita.guerrero.vela@intel.com>
This commit is contained in:
parent
837c8466f9
commit
d3561377bb
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
(function(){
|
||||
(function () {
|
||||
|
||||
angular.module('dashboardProjectApp')
|
||||
.controller('projectDetailController', ['$scope','$state', 'UserStory', '$location',
|
||||
|
@ -39,19 +39,30 @@
|
|||
$scope.actualProject = {};
|
||||
|
||||
function getFile() {
|
||||
UserStory.findById({id:$scope.taskId},
|
||||
function success(userStory) {
|
||||
$scope.userStory = userStory;
|
||||
|
||||
UserStory.findById({id:$scope.taskId},
|
||||
function success(userStory) {
|
||||
$scope.userStory = userStory;
|
||||
// Formating User Story name
|
||||
if ((userStory.description).length > 100) {
|
||||
$scope.userStory.shortDescription = userStory.
|
||||
description.substr(0,50) + " ...";
|
||||
}
|
||||
else {
|
||||
$scope.userStory.shortDescription = userStory.
|
||||
description;
|
||||
}
|
||||
|
||||
$scope.userStory.updatedOn = moment($scope.userStory.updatedOn).format("MM-DD-YYYY");
|
||||
for(var key in $scope.userStory.tasks_status) {
|
||||
$scope.actualProject[key] = $scope.userStory.tasks_status[key].projects[0]
|
||||
$scope.userStory.updatedOn = moment($scope.userStory.
|
||||
updatedOn).format("MM-DD-YYYY");
|
||||
for(var key in $scope.userStory.tasks_status) {
|
||||
$scope.actualProject[key] = $scope.userStory.
|
||||
tasks_status[key].projects[0]
|
||||
}
|
||||
}, function onError(error){
|
||||
$location.path('/projectDetail/notFound/' + $scope.taskId);
|
||||
}
|
||||
|
||||
}, function onError(error){
|
||||
$location.path('/projectDetail/notFound/' + $scope.taskId);
|
||||
});
|
||||
);
|
||||
};
|
||||
|
||||
$scope.selectProject = function(keyProject, idTask){
|
||||
|
@ -76,7 +87,8 @@
|
|||
}])
|
||||
.filter('capitalize', function() {
|
||||
return function(input) {
|
||||
return (!!input) ? input.charAt(0).toUpperCase() + input.substr(1).toLowerCase() : '';
|
||||
return (!!input) ? input.charAt(0).toUpperCase() + input.substr(1).
|
||||
toLowerCase() : '';
|
||||
}
|
||||
})
|
||||
.filter('removeDashes', function() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<div class="well frm-well">
|
||||
<div class="row">
|
||||
<div class="col-xs-11">
|
||||
<div class="dp-title ">
|
||||
{{userStory.description}}
|
||||
<div class="dp-title" data-toggle="tooltip" title="{{userStory.description}}">
|
||||
{{userStory.shortDescription}}
|
||||
<span class="dp-label label label-primary dp-label-{{userStory.status}}">
|
||||
{{userStory.status | removeDashes | capitalize}}
|
||||
</span>
|
||||
|
|
|
@ -23,3 +23,9 @@
|
|||
.fixed-table-toolbar .bars, .fixed-table-toolbar .search, .fixed-table-toolbar .columns{
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.fixed-table-container tbody td {
|
||||
max-width:200px; /* Customise it accordingly */
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue