Fixed small output bug
This commit is contained in:
@@ -5,7 +5,6 @@ Estimates are written somwhere inside Description field in the form of:
|
||||
`Estimate: X` where X can be any whole number.
|
||||
|
||||
Estimates are summed by label and by list and total number of hours is colorfully written in front of the label list name.
|
||||
`?` instead of number of hours marks those labels that don't have any cards with estimates entered.
|
||||
|
||||
You can use it here:
|
||||
https://dl.dropboxusercontent.com/u/11716687/web/trello-estimates/index.html#
|
||||
|
||||
19
index.html
19
index.html
@@ -102,21 +102,32 @@
|
||||
return hours;
|
||||
}
|
||||
|
||||
var printOutValues = function() {
|
||||
$.each(values.labels, function(labelId, value) {
|
||||
$("#label_" + labelId).html("" + value + "h");
|
||||
});
|
||||
|
||||
$.each(values.lists, function(listId, value) {
|
||||
$("#list_" + listId).html("" + value + "h");
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
var loadedCards = function(cards) {
|
||||
if (!cards) return;
|
||||
|
||||
$.each(cards, function(index, card) {
|
||||
var hours = getHours(card.desc);
|
||||
values.lists[card.idList] += hours;
|
||||
$("#list_" + card.idList).html("" + values.lists[card.idList] + "h");
|
||||
|
||||
if (!card.idLabels) return true;
|
||||
$.each(card.idLabels, function(_index, labelId) {
|
||||
|
||||
values.labels[labelId] += hours;
|
||||
$("#label_" + labelId).html("" + values.labels[labelId] + "h");
|
||||
});
|
||||
});
|
||||
|
||||
printOutValues();
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user