Merge lp:~gmb/launchpad/fix-opera-spacing-bug-401130 into lp:launchpad/db-devel

Proposed by Graham Binns
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~gmb/launchpad/fix-opera-spacing-bug-401130
Merge into: lp:launchpad/db-devel
Diff against target: None lines
To merge this branch: bzr merge lp:~gmb/launchpad/fix-opera-spacing-bug-401130
Reviewer Review Type Date Requested Status
Gavin Panella (community) js Approve
Review via email: mp+9146@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) wrote :

A fix for a spacing issue with duplicate collapsibles in Opera.

Revision history for this message
Gavin Panella (allenap) :
review: Approve (js)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/javascript/bugs/filebug-dupefinder.js'
--- lib/canonical/launchpad/javascript/bugs/filebug-dupefinder.js 2009-07-17 00:26:05 +0000
+++ lib/canonical/launchpad/javascript/bugs/filebug-dupefinder.js 2009-07-22 16:42:10 +0000
@@ -193,11 +193,6 @@
193193
194 if (bug_already_reported_expanders !== null &&194 if (bug_already_reported_expanders !== null &&
195 bug_already_reported_expanders !== undefined) {195 bug_already_reported_expanders !== undefined) {
196 // Collapse all the details divs, since we don't want them
197 // expanded first up.
198 Y.each(Y.all('div.duplicate-details'), function(div) {
199 collapse_bug_details(div);
200 });
201196
202 // Set up the onclick handlers for the expanders.197 // Set up the onclick handlers for the expanders.
203 Y.each(Y.all('.similar-bug'), function(row) {198 Y.each(Y.all('.similar-bug'), function(row) {
@@ -206,6 +201,18 @@
206 var bug_title_link = row.query('.duplicate-bug-link');201 var bug_title_link = row.query('.duplicate-bug-link');
207 var view_bug_link = row.query('.view-bug-link');202 var view_bug_link = row.query('.view-bug-link');
208203
204 // Grab the initial height of the element and create a
205 // config for the slide_out animation. This allows us to
206 // deal with browsers like Opera in which the JS engine
207 // takes a punt at the right height for the slid-out
208 // drawer and gets it completely and utterly wrong.
209 var initial_height = bug_details_div.get('scrollHeight');
210 var slide_out_config = {
211 to: {
212 height: initial_height
213 }
214 };
215
209 // Shut down the default action for the link and mark it216 // Shut down the default action for the link and mark it
210 // as a JS'd link. We do this as it's simpler than217 // as a JS'd link. We do this as it's simpler than
211 // trying to find all the bits of the row that we want218 // trying to find all the bits of the row that we want
@@ -233,7 +240,8 @@
233 // tabbing will expand the different bugs.240 // tabbing will expand the different bugs.
234 bug_title_link.on('focus', function(e) {241 bug_title_link.on('focus', function(e) {
235 if (!bug_details_div.hasClass('lazr-opened')) {242 if (!bug_details_div.hasClass('lazr-opened')) {
236 var anim = Y.lazr.effects.slide_out(bug_details_div);243 var anim = Y.lazr.effects.slide_out(
244 bug_details_div, slide_out_config);
237 anim.run();245 anim.run();
238246
239 image.set(SRC, EXPANDER_EXPANDED);247 image.set(SRC, EXPANDER_EXPANDED);
@@ -249,7 +257,8 @@
249 if (bug_details_div.hasClass('lazr-opened')) {257 if (bug_details_div.hasClass('lazr-opened')) {
250 collapse_bug_details(image);258 collapse_bug_details(image);
251 } else {259 } else {
252 var anim = Y.lazr.effects.slide_out(bug_details_div);260 var anim = Y.lazr.effects.slide_out(
261 bug_details_div, slide_out_config);
253 anim.run();262 anim.run();
254263
255 image.set(SRC, EXPANDER_EXPANDED);264 image.set(SRC, EXPANDER_EXPANDED);
@@ -264,6 +273,13 @@
264273
265 // Hide the bug reporting form.274 // Hide the bug reporting form.
266 bug_reporting_form.setStyle(DISPLAY, NONE);275 bug_reporting_form.setStyle(DISPLAY, NONE);
276
277 // Collapse all the details divs, since we don't want them
278 // expanded first up.
279 Y.each(Y.all('div.duplicate-details'), function(div) {
280 collapse_bug_details(div);
281 });
282
267 }283 }
268284
269 bug_not_reported_button = Y.get('#bug-not-already-reported');285 bug_not_reported_button = Y.get('#bug-not-already-reported');

Subscribers

People subscribed via source and target branches

to status/vote changes: