launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #13408
[Merge] lp:~rharding/launchpad/info_portlet_1052551 into lp:launchpad
Richard Harding has proposed merging lp:~rharding/launchpad/info_portlet_1052551 into lp:launchpad.
Commit message:
Update the JS initialization for the blueprint information type portlet.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1052551 in Launchpad itself: "Specification sharing policy is not honored by the edit information_type widget"
https://bugs.launchpad.net/launchpad/+bug/1052551
For more details, see:
https://code.launchpad.net/~rharding/launchpad/info_portlet_1052551/+merge/129706
= Summary =
See the bug for details on how users are unable to change the InformationType
on the bluesprints from the portlet.
== Implementation Notes ==
This fixes a couple of manual styles added to the choice widget setup as well
as a missed rename for the javascript method setup_information_type_choice to
setup_choice.
#24 Removes manual display:none set on the Edit action icon.
#47 Removes the manual setting of the icon to display:inline
The rest is mainly some matching of the layout of the HTML to the same thing
in the bug portlet so that I could compare the html and css classes required
to get things to work correctly.
== Q/A ==
When viewing a blueprint you should see the privacy portlet on the right side
and the edit icon should be available to change the information type.
--
https://code.launchpad.net/~rharding/launchpad/info_portlet_1052551/+merge/129706
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rharding/launchpad/info_portlet_1052551 into lp:launchpad.
=== modified file 'lib/lp/blueprints/javascript/addspec.js'
--- lib/lp/blueprints/javascript/addspec.js 2012-09-21 15:39:22 +0000
+++ lib/lp/blueprints/javascript/addspec.js 2012-10-15 16:09:21 +0000
@@ -17,4 +17,4 @@
choice_data);
};
-}, "0.1", {"requires": ['lp.app.information_type']});
+}, "0.1", {"requires": ['lp.app.information_type', 'lp.app.choice']});
=== modified file 'lib/lp/blueprints/templates/blueprint-portlet-privacy.pt'
--- lib/lp/blueprints/templates/blueprint-portlet-privacy.pt 2012-08-03 19:41:22 +0000
+++ lib/lp/blueprints/templates/blueprint-portlet-privacy.pt 2012-10-15 16:09:21 +0000
@@ -6,11 +6,16 @@
tal:attributes="class view/privacy_portlet_css"
tal:define="link context/menu:context/information_type"
>
+
+ <div id="privacy-text">
<span id="information-type-summary"
- tal:attributes="class view/information_type_css;">This blueprint
- contains <strong id="information-type" tal:content="view/information_type"></strong> information</span> <a class="sprite edit action-icon"
- id="privacy-link" tal:attributes="href link/path"
- tal:condition="link/enabled" style="display: none" >Edit</a>
+ tal:attributes="class view/information_type_css;">This blueprint contains
+ <strong id="information-type" tal:content="view/information_type"></strong> information</span> <a class="sprite edit action-icon" id="privacy-link"
+ tal:attributes="href link/path"
+ tal:condition="link/enabled">Edit</a>
- <div id="information-type-description" style="padding-top: 5px" tal:content="view/information_type_description"></div>
+ <div id="information-type-description" style="padding-top: 5px"
+ tal:content="view/information_type_description">
+ </div>
+ </div>
</div>
=== modified file 'lib/lp/blueprints/templates/specification-index.pt'
--- lib/lp/blueprints/templates/specification-index.pt 2012-08-30 18:19:51 +0000
+++ lib/lp/blueprints/templates/specification-index.pt 2012-10-15 16:09:21 +0000
@@ -314,10 +314,10 @@
'lp.app.information_type', 'node', 'widget', function(Y) {
Y.on('domready', function(){
var privacy_link = Y.one('#privacy-link');
- Y.lp.app.information_type.setup_information_type_choice(
- privacy_link, new Y.lp.client.Launchpad(), LP.cache.context,
- null);
- privacy_link.setStyle('display', 'inline');
+ Y.lp.app.information_type.setup_choice(
+ privacy_link,
+ new Y.lp.client.Launchpad(),
+ LP.cache.context);
});
Y.on('lp:context:implementation_status:changed', function(e) {
=== modified file 'lib/lp/bugs/templates/bug-portlet-privacy.pt'
--- lib/lp/bugs/templates/bug-portlet-privacy.pt 2012-06-20 05:25:44 +0000
+++ lib/lp/bugs/templates/bug-portlet-privacy.pt 2012-10-15 16:09:21 +0000
@@ -9,15 +9,16 @@
tal:define="link context/menu:context/visibility"
>
<div id="privacy-text">
- <span id="information-type-summary"
- tal:attributes="class view/information_type_css;">This report
- contains
+ <span id="information-type-summary"
+ tal:attributes="class view/information_type_css;">This report contains
<strong id="information-type" tal:content="view/information_type" />
information
- </span> <a class="sprite edit action-icon" id="privacy-link"
- tal:attributes="href link/path" tal:condition="link/enabled"
- >Edit</a>
- <div id="information-type-description" style="padding-top: 5px"
- tal:content="view/information_type_description"></div>
+ </span> <a class="sprite edit action-icon" id="privacy-link"
+ tal:attributes="href link/path" tal:condition="link/enabled"
+ >Edit</a>
+
+ <div id="information-type-description" style="padding-top: 5px"
+ tal:content="view/information_type_description">
+ </div>
</div>
</div>
Follow ups