jenkins-bot has submitted this change and it was merged.
Change subject: Adjust input based on available size
......................................................................
Adjust input based on available size
Bug: T93651
Change-Id: Ib53f2b69a4679eb686b69c68e9d7ff3da23b18bf
---
M resources/ext.gather.watchstar/CollectionsContentOverlay.js
M resources/ext.gather.watchstar/contentOverlay.less
2 files changed, 10 insertions(+), 3 deletions(-)
Approvals:
Jhernandez: Looks good to me, approved
jenkins-bot: Verified
diff --git a/resources/ext.gather.watchstar/CollectionsContentOverlay.js
b/resources/ext.gather.watchstar/CollectionsContentOverlay.js
index 86626fa..698db43 100644
--- a/resources/ext.gather.watchstar/CollectionsContentOverlay.js
+++ b/resources/ext.gather.watchstar/CollectionsContentOverlay.js
@@ -71,6 +71,8 @@
} else {
CollectionsContentOverlayBase.prototype.initialize.call( this, options );
}
+ // This should be an event on the view itself.
+ M.on( 'resize', $.proxy( this, 'expandForm' ) );
},
/** @inheritdoc */
show: function () {
@@ -100,8 +102,13 @@
} );
$form.append( this.createButton.$element );
- // Hide base overlay's spinner
- this.hideSpinner();
+
CollectionsContentOverlayBase.prototype.postRender.apply( this, arguments );
+ this.expandForm();
+ },
+ expandForm: function () {
+ // FIXME: This selectors might change in future. Yuck.
+ var $btn = this.$( 'form .oo-ui-widget' );
+ this.$( 'form input' ).css( 'width', this.$( 'form'
).width() - $btn.width() - 10 );
},
/**
* Tests if title is valid
diff --git a/resources/ext.gather.watchstar/contentOverlay.less
b/resources/ext.gather.watchstar/contentOverlay.less
index e2e6ee2..e9f83bb 100644
--- a/resources/ext.gather.watchstar/contentOverlay.less
+++ b/resources/ext.gather.watchstar/contentOverlay.less
@@ -105,7 +105,7 @@
text-align: center;
input {
- max-width: 150px;
+ width: 150px;
}
button {
margin-left: 1px;
--
To view, visit https://gerrit.wikimedia.org/r/205305
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib53f2b69a4679eb686b69c68e9d7ff3da23b18bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits