Samwilson has uploaded a new change for review. https://gerrit.wikimedia.org/r/311929
Change subject: Reduce main edit box height when editin in vertical mode ...................................................................... Reduce main edit box height when editin in vertical mode This change makes the main text box smaller so that it all can be visible on the screen along with the image above it. Both are set to the same height of one-third of the window height. When switching back to the default horizonal mode, the image and the text box are returned to their default sizes. This also fixes a bug whereby the zoom initialization was setting the image height too late, and so the image was displaying at full height. Change-Id: I6d2ec037f0633c413e3d225c2477e29f73200b36 Task: T145923 --- M modules/page/ext.proofreadpage.page.edit.js 1 file changed, 10 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage refs/changes/29/311929/1 diff --git a/modules/page/ext.proofreadpage.page.edit.js b/modules/page/ext.proofreadpage.page.edit.js index c9cd2ee..0249edd 100644 --- a/modules/page/ext.proofreadpage.page.edit.js +++ b/modules/page/ext.proofreadpage.page.edit.js @@ -75,12 +75,15 @@ if ( isLayoutHorizontal ) { $container.appendTo( $editForm.find( '.prp-page-container' ) ); + // Switch CSS widths and heights back to the default side-by-size layout. $container.css( { - width: '' + width: '', + height: '' } ); $editForm.find( '.prp-page-content' ).css( { width: '' } ); + $("#wpTextbox1").css( { height: '' } ); ensureImageZoomInitialization(); isLayoutHorizontal = false; @@ -88,6 +91,7 @@ } else { $container.insertBefore( $editForm ); + // Set the width and height of the image and form. $container.css( { width: '100%', overflow: 'auto', @@ -97,11 +101,13 @@ width: '100%' } ); - $container.css( { - height: $( window ).height() / 3 + 'px' - } ); + // Turn on image zoom before setting the image height, or it'll be overridden. ensureImageZoomInitialization(); + // Set the image and the edit box to the same height (and 1/3 of the window each). + $container.css( { height: $( window ).height() / 3 + 'px' } ); + $("#wpTextbox1").css( { height: $container.css( "height" ) } ); + isLayoutHorizontal = true; } } -- To view, visit https://gerrit.wikimedia.org/r/311929 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d2ec037f0633c413e3d225c2477e29f73200b36 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ProofreadPage Gerrit-Branch: master Gerrit-Owner: Samwilson <s...@samwilson.id.au> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits