From: James D. Forrester Date: Thu, 20 Jul 2017 19:18:44 +0000 (-0700) Subject: mediawiki.action.edit: Add TODO referencing T6714 X-Git-Tag: 1.31.0-rc.0~2516 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=6f567677852d0cd047d1f2485f6c364879775acd;p=lhc%2Fweb%2Fwiklou.git mediawiki.action.edit: Add TODO referencing T6714 Change-Id: Ifa5ba02d8e45b2529c17ba045e13fd6360569f4b --- diff --git a/resources/src/mediawiki.action/mediawiki.action.edit.js b/resources/src/mediawiki.action/mediawiki.action.edit.js index 5b810174bf..35b1b80863 100644 --- a/resources/src/mediawiki.action/mediawiki.action.edit.js +++ b/resources/src/mediawiki.action/mediawiki.action.edit.js @@ -17,7 +17,9 @@ */ $( function () { - var editBox, scrollTop, $editForm; + var editBox, scrollTop, $editForm, + // TODO T6714: Once this can be adjusted, read this from config. + summaryByteLimit = 255; if ( $( '#editform' ).hasClass( 'mw-editform-ooui' ) ) { mw.loader.using( 'oojs-ui-core' ).then( function () { @@ -30,11 +32,11 @@ // Show a byte-counter to users with how many bytes are left for their edit summary. // TODO: This looks a bit weird, as there is no unit in the UI, just numbers; showing // 'bytes' confused users in testing, and showing 'chars' would be a lie. See T42035. - mw.widgets.visibleByteLimit( wpSummary, 255 ); + mw.widgets.visibleByteLimit( wpSummary, summaryByteLimit ); } ); } else { // Make sure edit summary does not exceed byte limit - $( '#wpSummary' ).byteLimit( 255 ); + $( '#wpSummary' ).byteLimit( summaryByteLimit ); } // Restore the edit box scroll state following a preview operation,