Merge lp:~rockstar/launchpad/bug-517266 into lp:launchpad

Proposed by Paul Hummer
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~rockstar/launchpad/bug-517266
Merge into: lp:launchpad
Diff against target: 26 lines (+9/-7)
1 file modified
lib/canonical/launchpad/javascript/code/popupdiff.js (+9/-7)
To merge this branch: bzr merge lp:~rockstar/launchpad/bug-517266
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+19730@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) wrote :

Hi Aaron-

  So, this is a change to the popupdiff info on the bugs page. Basically, if
the diff has no lines of difference, there won't be a node for 'a.diff-link'.
In those cases, we have nothing to highlight or attach events to.

  I don't think we can test this other than actually walking through it by
hand. Windmill doesn't have a way to say "There aren't any errors in the
browser, right?"

Cheers,
Paul

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 merge approve

> I don't think we can test this other than actually walking through it by
> hand. Windmill doesn't have a way to say "There aren't any errors in the
> browser, right?"

There might be a way to say "this was never called", but I think it's
fine to land like this.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkt+6AIACgkQ0F+nu1YWqI0TpQCfXQ17r/8Al7+bHuTFwN+DAXBP
WeEAn1ug77anicvtZ8C9SKCpITs8MVSF
=XT8J
-----END PGP SIGNATURE-----

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/javascript/code/popupdiff.js'
--- lib/canonical/launchpad/javascript/code/popupdiff.js 2009-11-19 08:17:29 +0000
+++ lib/canonical/launchpad/javascript/code/popupdiff.js 2010-02-19 17:48:18 +0000
@@ -99,13 +99,15 @@
99 */99 */
100function link_popup_diff_onclick(node) {100function link_popup_diff_onclick(node) {
101 var a = node.query('a.diff-link');101 var a = node.query('a.diff-link');
102 a.addClass('js-action');102 if (Y.Lang.isValue(a)) {
103 var librarian_url = a.getAttribute('href');103 a.addClass('js-action');
104 var api_url = node.query('a.api-ref').getAttribute('href');104 var librarian_url = a.getAttribute('href');
105 a.on('click', function(e) {105 var api_url = node.query('a.api-ref').getAttribute('href');
106 e.preventDefault();106 a.on('click', function(e) {
107 display_diff(a, api_url, librarian_url);107 e.preventDefault();
108 });108 display_diff(a, api_url, librarian_url);
109 });
110 }
109}111}
110112
111/*113/*