jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/366567 )
Change subject: Popup: Build as DOM instead of HTML strings ...................................................................... Popup: Build as DOM instead of HTML strings Change-Id: Ib33b6b2a1f3e0f9c50398287822ae88305855a58 --- M resources/ext.CodeMirror.js 1 file changed, 15 insertions(+), 9 deletions(-) Approvals: jenkins-bot: Verified Kaldari: Looks good to me, approved Jforrester: Looks good to me, approved diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js index eb7c7be..cf13bef 100644 --- a/resources/ext.CodeMirror.js +++ b/resources/ext.CodeMirror.js @@ -390,16 +390,22 @@ * Add a popup for first time users (T165003) */ function addPopup() { - this.popuptext = '<div class=\'codemirror-popup-div\'>' + - '<div class=\'codemirror-popup-top\'>{ <span class=\'codemirror-popup-color-blue\'>' + - mw.message( 'codemirror-popup-syntax' ).escaped() + '</span> ' + - mw.message( 'codemirror-popup-highlighting' ).escaped() + ' }</div>' + - '<div class=\'codemirror-popup-text\'>' + mw.message( 'codemirror-popup-desc' ).escaped() + '</div>' + - '<div class=\'codemirror-popup-btn codemirror-popup-btn-yes\'>' + mw.message( 'codemirror-popup-btn-yes' ).escaped() + '</div>' + - '<div class=\'codemirror-popup-btn codemirror-popup-btn-no\'>' + mw.message( 'codemirror-popup-btn-no' ).escaped() + '</div>' + - '</div>'; + var $content = + $( '<div>' ).addClass( 'codemirror-popup-div' ).append( + $( '<div>' ).addClass( 'codemirror-popup-top' ).append( + '{ ', + $( '<span>' ).addClass( 'codemirror-popup-color-blue' ).text( mw.msg( 'codemirror-popup-syntax' ) ), + ' ', + document.createTextNode( mw.msg( 'codemirror-popup-highlighting' ) ), + ' }' + ), + $( '<div>' ).addClass( 'codemirror-popup-text' ).text( mw.msg( 'codemirror-popup-desc' ) ), + $( '<div>' ).addClass( 'codemirror-popup-btn codemirror-popup-btn-yes' ).text( mw.msg( 'codemirror-popup-btn-yes' ) ), + $( '<div>' ).addClass( 'codemirror-popup-btn codemirror-popup-btn-no' ).text( mw.msg( 'codemirror-popup-btn-no' ) ) + ); + popup = new OO.ui.PopupWidget( { - $content: $( this.popuptext ), + $content: $content, containerPadding: 80, $floatableContainer: $( '#mw-editbutton-codemirror' ), padded: false, -- To view, visit https://gerrit.wikimedia.org/r/366567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib33b6b2a1f3e0f9c50398287822ae88305855a58 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org> Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org> Gerrit-Reviewer: Niharika29 <nko...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits