← Back to team overview

launchpad-dev team mailing list archive

Re: [Branch ~launchpad-pqm/launchpad/devel] Rev 9757: [r=intellectronica][ui=intellectronica][bug=455340][js] When a branch

 

On Fri, Oct 23, 2009 at 05:45:30AM -0000, noreply@xxxxxxxxxxxxx wrote:
> Merge authors:
>   Graham Binns (gmb)
> ------------------------------------------------------------
> revno: 9757 [merge]
> committer: Launchpad Patch Queue Manager <launchpad@xxxxxxxxxxxxxxxxx>
> branch nick: launchpad
> timestamp: Fri 2009-10-23 06:43:47 +0100
> message:
>   [r=intellectronica][ui=intellectronica][bug=455340][js] When a branch
>   	is linked to a bug using the inline widget on the bug page the
>   	bug's branch list will be automatically updated.
> added:
>   lib/lp/bugs/templates/bug-branch.pt
> modified:
>   lib/canonical/launchpad/javascript/bugs/bugtask-index.js
>   lib/lp/bugs/browser/bugbranch.py
>   lib/lp/bugs/browser/configure.zcml
>   lib/lp/bugs/templates/bugtask-index.pt

> === modified file 'lib/canonical/launchpad/javascript/bugs/bugtask-index.js'
> --- lib/canonical/launchpad/javascript/bugs/bugtask-index.js	2009-10-16 08:25:31 +0000
> +++ lib/canonical/launchpad/javascript/bugs/bugtask-index.js	2009-10-22 15:03:15 +0000
> @@ -633,22 +633,69 @@
>      // Call linkBranch() on the bug.
>      config = {
>          on: {
> -            success: function(client) {
> +            success: function(bug_branch_entry) {
>                  link_branch_link.toggleClass(
>                      'update-in-progress-message');
> -                anim.run();
> +
> +                // Grab the XHTML representation of the branch and add
> +                // it to the list of branches.
> +                config = {
> +                    on: {
> +                        success: function(branch_html) {
> +                            add_branch_to_linked_branches(branch_html);
> +                        }
> +                    },
> +                    accept: LP.client.XHTML
> +                }
> +                lp_client.get(bug_branch_entry.get('self_link'), config);
>              },
> -            failure: error_handler.getFailureHandler()
> +            failure: error_handler.getFailureHandler(),
>          },


You didn't lint this file after doing this change on the last line, did
you?

(Having a trailing comma in dictionaries aren't allowed in JS)


-- 
Björn Tillenius | https://launchpad.net/~bjornt



Follow ups