Summary Table Auto-Update
Review Request #2726 — Created Dec. 1, 2011 and submitted
Summary table auto-update Update the status of the rows within the summary table and update the counters. Fixes: Added an anchor selector to the find statement. Refactored string concatenation. Fixed comment style. Removed white space. Merged with master/origin. Changed update method to use gCommentIssueManager. Changed native DOM transformations to jQuery. Added base value for parseInt. Changed jQuery .html() to .text() where relevant.
Ubuntu 10.04 (Linux): Chrome 14.
Description | From | Last Updated |
---|---|---|
You're still just calling updateIssueSummaryTable here. I think instead, you should register a callback via the gCommentIssueManager.registerCallback function. You'll need … |
mike_conley | |
Space after these comment slashes |
mike_conley | |
Instead of using innerHTML, we can use jQuery's .html() instead. While we're at it, we should probably through that string … |
mike_conley | |
Same as above |
mike_conley | |
Same as above, re: .html(), and parseInt. |
mike_conley | |
parseInt should take '10' as the second parameter. This is the base it'll convert to. Browsers are fairly tolerant about … |
chipx86 | |
I imagine you want to use text(). Only use html() If you actually want to deal with the raw HTML … |
chipx86 |
- Change Summary:
-
Merge branch 'master' into summarytableupdate.
- Summary:
-
Summary table auto-updateSummary Table Autoupdate
- Description:
-
+ Merge branch 'master' into summarytableupdate
+ + Conflicts:
+ reviewboard/htdocs/media/rb/css/reviews.less + reviewboard/htdocs/media/rb/js/reviews.js + reviewboard/templates/reviews/review_detail.html + + Enhance the Issue Summary table.
+ + The Issue Summary table now uncollapses and navigates to the reviews
+ when the appropriate link is clicked. + + The CSS has been converted to use lesscss format.
+ + Reviewed at http://reviews.reviewboard.org/r/2709/
+ Summary table auto-update
Update the status of the rows within the summary table and update the counters.
~ Refactored css/html elements.
~ Added javascript function to update html element classes and counters. ~ Fixes:
~ + Added an anchor selector to the find statement.
+ Refactored string concatenation. + Fixed comment style. + + Removed white space.
+ + + + Fixes:
+ + Fixed javascript uncollapse bug and added comment.
+ Fixed lesscss style. + + Changed css to less css. Changed review_details.html to reflect javascript and css changes.
+ + + + Enhanced Summary Table
+ + Added javascript to uncollapse and navigate to selected reviews.
+ + Merge branch 'release-1.6.x'
+ + + + Fix the import path for the fallback PIL Image.
+ + It seems easy for PIL to be installed wrong. When it is installed wrong,
+ you need to insert Image instead of PIL.Image. Our unit tests attempted + this, but failed, as we tried to import Image from Image. Clearly, + nobody has hit this before now, but I have on my new deployment. This is + now fixed. + + Fix unit tests with newer versions of Django.
+ + Newer versions of Django broke our unit tests by changing how the
+ permissions were created. This broke us because we stored the + auto-generated permissions in our test fixtures, but there's very little + reason for us to do that. They've been removed. + + There was also some issue with our Mercurial tests. We included the
+ hg.json fixture before test_scmtools.json, which meant that the + Mercurial tool definition was created after the repository. Django + appears to be more strict now, so we broke. This was silly anyway, so + now the hg.json repository entry has just been moved into + test_scmtools.json. + + Merge branch 'release-1.6.x'
+ + + + Release Review Board 1.6.3.
+ + + + Merge branch 'release-1.5.x' into release-1.6.x
+ + + + Release Review Board 1.5.7.
+ + + + Fix a comment vulnerability allowing scripts to be loaded.
+ + Due to the way that comments were loaded in, it was possible to
+ terminate a script and inject a new one while loading the diff viewer. + This isn't believed to have been a problem in the wild, but is certainly + an important one to fix. + + We now ensure that the text is escaped at the point where it's being fed
+ into the JavaScript. It's no longer possible to inject scripts. + + Thanks to Damian Johnson for the heads up and for the fix that this
+ change is based on. + + This will be going into 1.5.7 and 1.6.3 releases.
+ + Fix the location that reviewboard.db is stored in when running prepare-dev.
~ This commit also includes changes from r2709 (for some reason).
~ prepare-dev called into rb-site's sync_database, which changed to the
+ 'reviewboard' directory before running syncdb. This meant that the + initial database would appear in the wrong place. Now we explicitly + force it to be the correct directory before calling syncdb. - Diff:
-
Revision 2 (+207 -50)
- Change Summary:
-
Removed diff trash
- Summary:
-
Summary Table AutoupdateSummary Table Auto-Update
- Description:
-
+ Cleaned diff trash
+ + + Merge branch 'master' into summarytableupdate
Conflicts:
reviewboard/htdocs/media/rb/css/reviews.less reviewboard/htdocs/media/rb/js/reviews.js reviewboard/templates/reviews/review_detail.html Enhance the Issue Summary table.
The Issue Summary table now uncollapses and navigates to the reviews
when the appropriate link is clicked. The CSS has been converted to use lesscss format.
Reviewed at http://reviews.reviewboard.org/r/2709/
Summary table auto-update
Update the status of the rows within the summary table and update the counters.
Fixes:
Added an anchor selector to the find statement.
Refactored string concatenation. Fixed comment style. Removed white space.
Fixes:
Fixed javascript uncollapse bug and added comment.
Fixed lesscss style. Changed css to less css. Changed review_details.html to reflect javascript and css changes.
Enhanced Summary Table
Added javascript to uncollapse and navigate to selected reviews.
Merge branch 'release-1.6.x'
Fix the import path for the fallback PIL Image.
It seems easy for PIL to be installed wrong. When it is installed wrong,
you need to insert Image instead of PIL.Image. Our unit tests attempted this, but failed, as we tried to import Image from Image. Clearly, nobody has hit this before now, but I have on my new deployment. This is now fixed. Fix unit tests with newer versions of Django.
Newer versions of Django broke our unit tests by changing how the
permissions were created. This broke us because we stored the auto-generated permissions in our test fixtures, but there's very little reason for us to do that. They've been removed. There was also some issue with our Mercurial tests. We included the
hg.json fixture before test_scmtools.json, which meant that the Mercurial tool definition was created after the repository. Django appears to be more strict now, so we broke. This was silly anyway, so now the hg.json repository entry has just been moved into test_scmtools.json. Merge branch 'release-1.6.x'
Release Review Board 1.6.3.
Merge branch 'release-1.5.x' into release-1.6.x
Release Review Board 1.5.7.
Fix a comment vulnerability allowing scripts to be loaded.
Due to the way that comments were loaded in, it was possible to
terminate a script and inject a new one while loading the diff viewer. This isn't believed to have been a problem in the wild, but is certainly an important one to fix. We now ensure that the text is escaped at the point where it's being fed
into the JavaScript. It's no longer possible to inject scripts. Thanks to Damian Johnson for the heads up and for the fix that this
change is based on. This will be going into 1.5.7 and 1.6.3 releases.
Fix the location that reviewboard.db is stored in when running prepare-dev.
prepare-dev called into rb-site's sync_database, which changed to the
'reviewboard' directory before running syncdb. This meant that the initial database would appear in the wrong place. Now we explicitly force it to be the correct directory before calling syncdb. - Diff:
-
Revision 3 (+199 -51)
-
Hey Yazan: Hm, there appears to be some extra stuff in this diff that I don't think you added... Secondly, while you're a step closer to what I was asking for, I was hoping you would use the built in callback functionality of the gCommentIssueManager instead of hard-wiring your updateIssueSummaryTable function call. Email me if you need any further assistance on that. Thanks, -Mike
-
You're still just calling updateIssueSummaryTable here. I think instead, you should register a callback via the gCommentIssueManager.registerCallback function. You'll need to expand the notifyCallbacks helper function on line 162 to pass not only the new issue status, but the old one as well.
- Change Summary:
-
Merged with master
- Summary:
-
Summary Table Auto-UpdateIssue Summary table auto update.
- Diff:
-
Revision 4 (+199 -51)
- Change Summary:
-
Merged with master/origin
- Summary:
-
Issue Summary table auto update.Summary Table Auto-Update
- Description:
-
- Cleaned diff trash
- - - - Merge branch 'master' into summarytableupdate
- - Conflicts:
- reviewboard/htdocs/media/rb/css/reviews.less - reviewboard/htdocs/media/rb/js/reviews.js - reviewboard/templates/reviews/review_detail.html - - Enhance the Issue Summary table.
- - The Issue Summary table now uncollapses and navigates to the reviews
- when the appropriate link is clicked. - - The CSS has been converted to use lesscss format.
- - Reviewed at http://reviews.reviewboard.org/r/2709/
- Summary table auto-update
Update the status of the rows within the summary table and update the counters.
- - Fixes:
- - Added an anchor selector to the find statement.
- Refactored string concatenation. - Fixed comment style. - - Removed white space.
- - - - Fixes:
- - Fixed javascript uncollapse bug and added comment.
- Fixed lesscss style. - - Changed css to less css. Changed review_details.html to reflect javascript and css changes.
- - - - Enhanced Summary Table
- - Added javascript to uncollapse and navigate to selected reviews.
- - Merge branch 'release-1.6.x'
- - - - Fix the import path for the fallback PIL Image.
- - It seems easy for PIL to be installed wrong. When it is installed wrong,
- you need to insert Image instead of PIL.Image. Our unit tests attempted - this, but failed, as we tried to import Image from Image. Clearly, - nobody has hit this before now, but I have on my new deployment. This is - now fixed. - - Fix unit tests with newer versions of Django.
- - Newer versions of Django broke our unit tests by changing how the
- permissions were created. This broke us because we stored the - auto-generated permissions in our test fixtures, but there's very little - reason for us to do that. They've been removed. - - There was also some issue with our Mercurial tests. We included the
- hg.json fixture before test_scmtools.json, which meant that the - Mercurial tool definition was created after the repository. Django - appears to be more strict now, so we broke. This was silly anyway, so - now the hg.json repository entry has just been moved into - test_scmtools.json. - - Merge branch 'release-1.6.x'
- - - - Release Review Board 1.6.3.
- - - - Merge branch 'release-1.5.x' into release-1.6.x
- - - - Release Review Board 1.5.7.
- - - - Fix a comment vulnerability allowing scripts to be loaded.
- - Due to the way that comments were loaded in, it was possible to
- terminate a script and inject a new one while loading the diff viewer. - This isn't believed to have been a problem in the wild, but is certainly - an important one to fix. - - We now ensure that the text is escaped at the point where it's being fed
- into the JavaScript. It's no longer possible to inject scripts. - - Thanks to Damian Johnson for the heads up and for the fix that this
- change is based on. - - This will be going into 1.5.7 and 1.6.3 releases.
- - Fix the location that reviewboard.db is stored in when running prepare-dev.
- - prepare-dev called into rb-site's sync_database, which changed to the
- 'reviewboard' directory before running syncdb. This meant that the - initial database would appear in the wrong place. Now we explicitly - force it to be the correct directory before calling syncdb.
- Change Summary:
-
Changed update method to use gCommentIssueManager.
- Description:
-
Summary table auto-update
Update the status of the rows within the summary table and update the counters.
+ + Fixes:
+ + Added an anchor selector to the find statement.
+ Refactored string concatenation. + Fixed comment style. + Removed white space. + Merged with master/origin. + Changed update method to use gCommentIssueManager.
-
Yazan: Looking good, and real close. Just a couple of smaller nits I found on this pass. Thanks for your work! -Mike
-
-
Instead of using innerHTML, we can use jQuery's .html() instead. While we're at it, we should probably through that string through parseInt - that way, if for some reason the contents of the counter are NOT numeric, parseInt will give us back something we can still decrement. It might not be the correct number, but it won't halt the script.
-
-
-
- Change Summary:
-
Changed native DOM transformations to jQuery.
- Description:
-
Summary table auto-update
Update the status of the rows within the summary table and update the counters.
Fixes:
Added an anchor selector to the find statement.
Refactored string concatenation. Fixed comment style. Removed white space. Merged with master/origin. ~ Changed update method to use gCommentIssueManager. ~ Changed update method to use gCommentIssueManager. + Changed native DOM transformations to jQuery. - Diff:
-
Revision 7 (+51 -11)
- Screenshots:
-
Summary Table Auto-Update
-
Two last small things. Looking good though!
-
parseInt should take '10' as the second parameter. This is the base it'll convert to. Browsers are fairly tolerant about leaving it out, but it should be there.
-
I imagine you want to use text(). Only use html() If you actually want to deal with the raw HTML code (setting or getting).
- Change Summary:
-
Added base value for parseInt. Changed jQuery .html() to .text() where relevant.
- Description:
-
Summary table auto-update
Update the status of the rows within the summary table and update the counters.
Fixes:
Added an anchor selector to the find statement.
Refactored string concatenation. Fixed comment style. Removed white space. Merged with master/origin. Changed update method to use gCommentIssueManager. ~ Changed native DOM transformations to jQuery. ~ Changed native DOM transformations to jQuery. + Added base value for parseInt. + Changed jQuery .html() to .text() where relevant.