← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/remove-add-branch-leftovers into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/remove-add-branch-leftovers into lp:launchpad.

Commit message:
Remove unused leftovers from "Register a branch", which was removed in r14929.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/remove-add-branch-leftovers/+merge/327869
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/remove-add-branch-leftovers into lp:launchpad.
=== modified file 'lib/lp/app/browser/tests/test_macro_view.py'
--- lib/lp/app/browser/tests/test_macro_view.py	2015-04-19 12:56:32 +0000
+++ lib/lp/app/browser/tests/test_macro_view.py	2017-07-21 09:56:40 +0000
@@ -37,7 +37,6 @@
         '+bugtask-macros-tableview',
         'bugtask-macros-cve',
         '+bmp-macros',
-        'branch-form-macros',
         '+announcement-macros',
         '+person-macros',
         '+milestone-macros',

=== modified file 'lib/lp/code/browser/configure.zcml'
--- lib/lp/code/browser/configure.zcml	2017-06-16 10:29:14 +0000
+++ lib/lp/code/browser/configure.zcml	2017-07-21 09:56:40 +0000
@@ -401,12 +401,6 @@
         permission="zope.Public"
         template="../templates/branch-macros.pt"/>
     <browser:page
-        for="*"
-        name="branch-form-macros"
-        permission="zope.Public"
-        template="../templates/branch-form-macros.pt"
-        class="lp.app.browser.launchpad.Macro"/>
-    <browser:page
         name="+whiteboard"
         for="lp.code.interfaces.branch.IBranch"
         class="lp.code.browser.branch.BranchEditWhiteboardView"

=== modified file 'lib/lp/code/javascript/util.js'
--- lib/lp/code/javascript/util.js	2016-10-13 14:46:41 +0000
+++ lib/lp/code/javascript/util.js	2017-07-21 09:56:40 +0000
@@ -9,28 +9,6 @@
 YUI.add('lp.code.util', function(Y) {
 var ns = Y.namespace('lp.code.util');
 
-var update_branch_unique_location = function() {
-    var unique_location = Y.one("#branch-unique-location");
-    var owner = Y.one("[id='field.owner']").get('value');
-    var name = Y.one("[id='field.name']").get('value');
-    if (name === '') {
-        name = '<name>';
-    }
-    var branch_location = "lp:~" + owner + "/" + target_name + "/" + name;
-    unique_location.set('text', branch_name);
-};
-
-var hookUpBranchFieldFunctions = function () {
-    var owner = Y.one("[id='field.owner']");
-    owner.on('keyup', update_branch_unique_name);
-    owner.on('change', update_branch_unique_name);
-    var name = Y.one("[id='field.name']");
-    name.on('keyup', update_branch_unique_name);
-    name.on('change', update_branch_unique_name);
-    Y.one('#branch-unique-name-div').setStyle('display', 'block');
-    update_branch_unique_name();
-};
-
 var submit_filter = function (e) {
     Y.one('#filter_form').submit();
 };
@@ -62,10 +40,8 @@
     Y.one('[id="tryagain.actions.tryagain"]').addClass('hidden');
 };
 
-ns.hookUpBranchFieldFunctions = hookUpBranchFieldFunctions;
 ns.hookUpBranchFilterSubmission = hookUpBranchFilterSubmission;
 ns.hookUpMergeProposalFilterSubmission = hookUpMergeProposalFilterSubmission;
 ns.hookUpRetryImportSubmission = hookUpRetryImportSubmission;
 
 }, "0.1", {"requires": ["node", "dom"]});
-

=== removed file 'lib/lp/code/templates/branch-form-macros.pt'
--- lib/lp/code/templates/branch-form-macros.pt	2012-02-07 18:32:11 +0000
+++ lib/lp/code/templates/branch-form-macros.pt	1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
- <tal:root
-   xmlns:tal="http://xml.zope.org/namespaces/tal";
-   xmlns:metal="http://xml.zope.org/namespaces/metal";
-   omit-tag="">
-
-<metal:add-branch define-macro="add-branch-content">
-
-  <div id="branch-unique-location-div" class="hidden">
-    The resulting location of the branch will be:
-    <strong><span id="branch-unique-location"></span></strong> (<a href="/+help-code/register-branch.html" target="help">Do you need to register?</a>)
-  </div>
-
-  <div metal:use-macro="context/@@launchpad_form/form">
-  </div>
-
-<script type='text/javascript' tal:content="string:var target_name='${view/target/name}';" />
-
-<script type="text/javascript">
-//<![CDATA[
-LPJS.use('lp.code.util', function(Y) {
-  Y.on('domready', function(e) {
-      Y.lp.code.util.hookUpBranchFieldFunctions(Y);
-  }, window);
-});
-
-//]]>
-</script>
-
-</metal:add-branch>
-
-</tal:root>


Follow ups