X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fjquery%2Fjquery.textSelection.js;h=b90164249545338da3e4f8f0440912ed0b944448;hb=ee734d0d3c7533bd9a690dbd71f5151da55c32ad;hp=5111930517c67d11bb389f65807d0e25cec40795;hpb=28b59da2a14b7dbd41ad4693478d68543efc21d7;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/jquery/jquery.textSelection.js b/resources/src/jquery/jquery.textSelection.js index 5111930517..b901642495 100644 --- a/resources/src/jquery/jquery.textSelection.js +++ b/resources/src/jquery/jquery.textSelection.js @@ -138,7 +138,7 @@ insertText = '', selTextArr = selText.split( '\n' ); for ( i = 0; i < selTextArr.length; i++ ) { - insertText += pre + selTextArr[i] + post; + insertText += pre + selTextArr[ i ] + post; if ( i !== selTextArr.length - 1 ) { insertText += '\n'; } @@ -160,7 +160,7 @@ context.fn.restoreCursorAndScrollTop(); } if ( options.selectionStart !== undefined ) { - $( this ).textSelection( 'setSelection', { 'start': options.selectionStart, 'end': options.selectionEnd } ); + $( this ).textSelection( 'setSelection', { start: options.selectionStart, end: options.selectionEnd } ); } selText = $( this ).textSelection( 'getSelection' ); @@ -203,7 +203,7 @@ $( this ).focus(); if ( options.selectionStart !== undefined ) { - $( this ).textSelection( 'setSelection', { 'start': options.selectionStart, 'end': options.selectionEnd } ); + $( this ).textSelection( 'setSelection', { start: options.selectionStart, end: options.selectionEnd } ); } selText = $( this ).textSelection( 'getSelection' ); @@ -411,7 +411,8 @@ * * Scroll a textarea to the current cursor position. You can set the cursor * position with setSelection() - * @param options boolean Whether to force a scroll even if the caret position + * + * @param {boolean} options Whether to force a scroll even if the caret position * is already visible. Defaults to false * * @fixme document the options parameters (function body suggests options.force is a boolean, not options itself) @@ -576,7 +577,7 @@ context.fn.restoreSelection(); needSave = true; } - retval = ( alternateFn && alternateFn[command] || fn[command] ).call( this, options ); + retval = ( alternateFn && alternateFn[ command ] || fn[ command ] ).call( this, options ); if ( hasWikiEditor && needSave ) { context.fn.saveSelection(); }