Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
Update percentage again after animation
Browse files Browse the repository at this point in the history
v1.2.1
  • Loading branch information
Cycododge committed Sep 9, 2013
1 parent a78d83a commit 4c7e074
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 8 deletions.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Progress for Trello v1.2.0
# Progress for Trello v1.2.1

Track the overall completion of your Trello-based project with this Chrome extension, by counting cards or scrum points.

Expand Down Expand Up @@ -38,6 +38,31 @@ Be a part of the progress [here](https://trello.com/b/0QkitWlZ/progress-for-trel
This plug-in directly injects code into the Trello page in order to quickly and easily monitor changes to your boards.


## Release Notes

v1.2.1 - 9/9/2013

- Update percentage again after animation


v1.2.0 - 8/31/2013

- Percentage now calculated by rounding down
- Animated percentage changes
- Can now track against multiple lists
- Counting completed checklist items, now tracks card too.
- Fixed display for settings


v1.1.0 - 8/16/2013

- Add version number to settings menu
- track scrum points
- track checklist items
- separate settings menu from the header
- UI/UX Changes


![Screenshot](https://raw.github.com/Cycododge/Progress-For-Trello/master/resources/doneCardsCompleted.png)


Expand Down
15 changes: 9 additions & 6 deletions js/bp-trello.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ AUTHOR
Cycododge
UPDATED
8/30/2013
9/9/2013
*/

(function bpExt($){
/* "GLOBAL" VARS */

//initialize variables.
var releaseVersion = '1.2.0', _lists = [], _cards = [], browser = {}, bp = {}, curBoard = '', firstVisit = false,
var releaseVersion = '1.2.1', _lists = [], _cards = [], browser = {}, bp = {}, curBoard = '', firstVisit = false,
injectedHTML = '<div class="ext-bp">'+
'<div class="bp-optionsIcon icon-sm icon-checklist bp-button"></div>'+
'<div class="bp-barContainer">'+
Expand Down Expand Up @@ -468,14 +468,14 @@ UPDATED
//don't update if nothing changed from last time
if(bp.math.nextPercentage == newPercent){ return; }

//update the global var
//update the global var for next check
bp.math.nextPercentage = newPercent;

//adjust the progress bar width
$('.bp-progress').animate({width:bp.math.nextPercentage+'%'},animateSpeed);
$('.bp-progress').animate({width:newPercent+'%'},animateSpeed);

//determine how to add/remove to the text
var diff = (bp.math.nextPercentage - bp.math.lastPercentage).toFixed(0);
var diff = (newPercent - bp.math.lastPercentage).toFixed(0);

//change the text over the course of animateSpeed
var numLoops = 0, stepLength = 25;
Expand All @@ -488,10 +488,13 @@ UPDATED
//determine if text should be updated again
if(numLoops >= animateSpeed){
//reset last percentage to the new one
bp.math.lastPercentage = bp.math.nextPercentage;
bp.math.lastPercentage = newPercent;

//stop looping
clearInterval(animate);

//output the final percentage (accounts for any errors)
$('.bp-progress .bp-pc').text(newPercent+'%');
}
},stepLength);
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Progress for Trello",
"version": "1.2.0",
"version": "1.2.1",
"manifest_version": 2,
"description": "Track the overall completion of your Trello-based project by counting cards, scrum points, and checklists.",
"homepage_url": "http://cycododge.com/projects#progress",
Expand Down
Binary file removed resources/donePointsCompleted.png
Binary file not shown.
Binary file removed resources/todoDoingDoneCardsCompleted.png
Binary file not shown.

0 comments on commit 4c7e074

Please sign in to comment.