=== modified file 'lib/canonical/launchpad/javascript/bugs/bugtask-index.js'
--- lib/canonical/launchpad/javascript/bugs/bugtask-index.js 2009-09-28 10:02:35 +0000
+++ lib/canonical/launchpad/javascript/bugs/bugtask-index.js 2009-09-28 11:01:30 +0000
@@ -634,14 +634,8 @@
* Set up the link-a-related-branch picker.
*/
function setup_link_branch_picker() {
- if (lp_client === undefined) {
- lp_client = new LP.client.Launchpad();
- }
-
- if (lp_bug_entry === undefined) {
- var bug_repr = LP.client.cache.bug;
- lp_bug_entry = new LP.client.Entry(
- lp_client, bug_repr, bug_repr.self_link);
+ if (lp_client === undefined || bug_repr === undefined) {
+ setup_client_and_bug();
}
var error_handler = new LP.client.ErrorHandler();
@@ -704,21 +698,13 @@ display_error(Y.get('.menu-link-addsubscriber'), error_msg);
};
- // Call linkBranch() on the bug and flash the 'add a branch' link
- // accordingly.
+ // Call linkBranch() on the bug.
config = {
on: { success: function(client) {
- // Show the green flash anim to say the action
- // has completed.
- var anim = Y.lazr.anim.green_flash(
- {node: link_branch_link});
- anim.on('end', function(e) {
- link_branch_link.toggleClass(
- 'update-in-progress-message');
- });
+ link_branch_link.toggleClass(
+ 'update-in-progress-message'); anim.run();
- link_branch_link.set('innerHTML', 'Link another branch');
}, failure: error_handler.getFailureHandler()
},
def addbranch(self):
"""Return the 'Add branch' Link."""
- if self.context.bug.linked_branches.count() > 0:
- text = 'Link another branch'
- else:
- text = 'Link a related branch'
+ text = 'Link a related branch'
return Link('+addbranch', text, icon='add')
-The text "Link a related branch" has now changed to "Link another branch".
-
- >>> user_browser.getLink('Link a related branch')
- Traceback (most recent call last):
- ...
- LinkNotFoundError
-
- >>> user_browser.getLink('Link another branch')
- <Link text='Link another branch'
- url='http://bugs.launchpad.dev/firefox/+bug/1/+addbranch'>
-
We can delete existing links between a bug and a branch.
Incremental diff of changes:
=== modified file 'lib/canonical/ launchpad/ javascript/ bugs/bugtask- index.js' launchpad/ javascript/ bugs/bugtask- index.js 2009-09-28 10:02:35 +0000 launchpad/ javascript/ bugs/bugtask- index.js 2009-09-28 11:01:30 +0000 related- branch picker. branch_ picker( ) { Launchpad( ); cache.bug; self_link) ; and_bug( );
--- lib/canonical/
+++ lib/canonical/
@@ -634,14 +634,8 @@
* Set up the link-a-
*/
function setup_link_
- if (lp_client === undefined) {
- lp_client = new LP.client.
- }
-
- if (lp_bug_entry === undefined) {
- var bug_repr = LP.client.
- lp_bug_entry = new LP.client.Entry(
- lp_client, bug_repr, bug_repr.
+ if (lp_client === undefined || bug_repr === undefined) {
+ setup_client_
}
var error_handler = new LP.client. ErrorHandler( );
display_ error(Y. get('.menu- link-addsubscri ber'), error_msg);
@@ -704,21 +698,13 @@
};
- // Call linkBranch() on the bug and flash the 'add a branch' link
success: function(client) { anim.green_ flash( link.toggleClas s( in-progress- message' ); link.toggleClas s( in-progress- message' );
anim. run(); link.set( 'innerHTML' , 'Link another branch');
failure: error_handler. getFailureHandl er()
- // accordingly.
+ // Call linkBranch() on the bug.
config = {
on: {
- // Show the green flash anim to say the action
- // has completed.
- var anim = Y.lazr.
- {node: link_branch_link});
- anim.on('end', function(e) {
- link_branch_
- 'update-
- });
+ link_branch_
+ 'update-
- link_branch_
},
},
=== modified file 'lib/lp/ bugs/browser/ bug.py' bugs/browser/ bug.py 2009-09-18 22:46:33 +0000 bugs/browser/ bug.py 2009-09-28 11:01:30 +0000
--- lib/lp/
+++ lib/lp/
@@ -239,10 +239,7 @@
def addbranch(self): bug.linked_ branches. count() > 0:
"""Return the 'Add branch' Link."""
- if self.context.
- text = 'Link another branch'
- else:
- text = 'Link a related branch'
+ text = 'Link a related branch'
return Link('+addbranch', text, icon='add')
def linktocve(self):
=== modified file 'lib/lp/ bugs/stories/ bugs/xx- link-bug- to-branch. txt' bugs/stories/ bugs/xx- link-bug- to-branch. txt 2009-09-18 22:46:33 +0000 bugs/stories/ bugs/xx- link-bug- to-branch. txt 2009-09-28 11:01:30 +0000 //dev/~ name12/ firefox/ main (Development)
--- lib/lp/
+++ lib/lp/
@@ -36,17 +36,6 @@
lp:
...
-The text "Link a related branch" has now changed to "Link another branch". getLink( 'Link a related branch') getLink( 'Link another branch') bugs.launchpad. dev/firefox/ +bug/1/ +addbranch'>
-
- >>> user_browser.
- Traceback (most recent call last):
- ...
- LinkNotFoundError
-
- >>> user_browser.
- <Link text='Link another branch'
- url='http://
-
We can delete existing links between a bug and a branch.
>>> delete_ branch_ link_url = (