X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2Fpackagist%2Fludivine-ckeditor-component.git;a=blobdiff_plain;f=sources%2Fplugins%2Flist%2Fplugin.js;h=73f5d0b5af5292134df3ce74ebaa84d8bf27ec69;hp=7280cc2ecdef55d0373c8114872d074ce9a2a488;hb=1794320dcfdfcd19572fb1676294f9853a6bbc20;hpb=7183f6a6a21ad9124e70c997e0168459f377a9f2 diff --git a/sources/plugins/list/plugin.js b/sources/plugins/list/plugin.js index 7280cc2..73f5d0b 100644 --- a/sources/plugins/list/plugin.js +++ b/sources/plugins/list/plugin.js @@ -60,7 +60,7 @@ for ( var i = 0, count = listNode.getChildCount(); i < count; i++ ) { var listItem = listNode.getChild( i ); - // Fixing malformed nested lists by moving it into a previous list item. (#6236) + // Fixing malformed nested lists by moving it into a previous list item. (http://dev.ckeditor.com/ticket/6236) if ( listItem.type == CKEDITOR.NODE_ELEMENT && listItem.getName() in CKEDITOR.dtd.$list ) CKEDITOR.plugins.list.listToArray( listItem, database, baseArray, baseIndentLevel + 1 ); @@ -137,13 +137,13 @@ currentListItem.append( item.contents[ i ].clone( 1, 1 ) ); currentIndex++; } else if ( item.indent == Math.max( indentLevel, 0 ) + 1 ) { - // Maintain original direction (#6861). + // Maintain original direction (http://dev.ckeditor.com/ticket/6861). var currDir = listArray[ currentIndex - 1 ].element.getDirection( 1 ), listData = CKEDITOR.plugins.list.arrayToList( listArray, null, currentIndex, paragraphMode, currDir != orgDir ? orgDir : null ); // If the next block is an
  • with another list tree as the first // child, we'll need to append a filler (
    /NBSP) or the list item - // wouldn't be editable. (#6724) + // wouldn't be editable. (http://dev.ckeditor.com/ticket/6724) if ( !currentListItem.getChildCount() && CKEDITOR.env.needsNbspFiller && doc.$.documentMode <= 7 ) currentListItem.append( doc.createText( '\xa0' ) ); currentListItem.append( listData.listNode ); @@ -416,7 +416,7 @@ contentBlock.appendTo( listItem ); else { contentBlock.copyAttributes( listItem ); - // Remove direction attribute after it was merged into list root. (#7657) + // Remove direction attribute after it was merged into list root. (http://dev.ckeditor.com/ticket/7657) if ( listDir && contentBlock.getDirection() ) { listItem.removeStyle( 'direction' ); listItem.removeAttribute( 'dir' ); @@ -477,7 +477,7 @@ var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, groupObj.root.getAttribute( 'dir' ) ); - // Compensate
    before/after the list node if the surrounds are non-blocks.(#3836) + // Compensate
    before/after the list node if the surrounds are non-blocks.(http://dev.ckeditor.com/ticket/3836) var docFragment = newList.listNode, boundaryNode, siblingNode; @@ -504,9 +504,9 @@ // Checks wheather this block should be element preserved (not transformed to
  • ) when creating list. function shouldPreserveBlock( block ) { return ( - // #5335 + // http://dev.ckeditor.com/ticket/5335 block.is( 'pre' ) || - // #5271 - this is a header. + // http://dev.ckeditor.com/ticket/5271 - this is a header. headerTagRegex.test( block.getName() ) || // 11083 - this is a non-editable element. block.getAttribute( 'contenteditable' ) == 'false' @@ -523,7 +523,7 @@ var elementType = CKEDITOR.dom.walker.nodeType( CKEDITOR.NODE_ELEMENT ); - // Merge child nodes with direction preserved. (#7448) + // Merge child nodes with direction preserved. (http://dev.ckeditor.com/ticket/7448) function mergeChildren( from, into, refNode, forward ) { var child, itemDir; while ( ( child = from[ forward ? 'getLast' : 'getFirst' ]( elementType ) ) ) { @@ -556,7 +556,7 @@ selection.selectRanges( ranges ); } // Maybe a single range there enclosing the whole list, - // turn on the list state manually(#4129). + // turn on the list state manually(http://dev.ckeditor.com/ticket/4129). else { var range = ranges.length == 1 && ranges[ 0 ], enclosedNode = range && range.getEnclosedNode(); @@ -606,13 +606,13 @@ // First, try to group by a list ancestor. for ( var i = pathElementsCount - 1; i >= 0 && ( element = pathElements[ i ] ); i-- ) { - // Don't leak outside block limit (#3940). + // Don't leak outside block limit (http://dev.ckeditor.com/ticket/3940). if ( listNodeNames[ element.getName() ] && blockLimit.contains( element ) ) { // If we've encountered a list inside a block limit // The last group object of the block limit element should // no longer be valid. Since paragraphs after the list // should belong to a different group of paragraphs before - // the list. (Bug #1309) + // the list. (Bug http://dev.ckeditor.com/ticket/1309) blockLimit.removeCustomData( 'list_group_object_' + index ); var groupObj = element.getCustomData( 'list_group_object' ); @@ -688,7 +688,7 @@ function mergeSibling( rtl ) { var sibling = listNode[ rtl ? 'getPrevious' : 'getNext' ]( nonEmpty ); if ( sibling && sibling.type == CKEDITOR.NODE_ELEMENT && sibling.is( listNode.getName() ) ) { - // Move children order by merge direction.(#3820) + // Move children order by merge direction.(http://dev.ckeditor.com/ticket/3820) mergeChildren( listNode, sibling, null, !rtl ); listNode.remove(); @@ -770,7 +770,7 @@ nextPath = nextCursor.startPath(); nextBlock = nextPath.block; - // Abort when nothing to be removed (#10890). + // Abort when nothing to be removed (http://dev.ckeditor.com/ticket/10890). if ( !nextBlock ) break; @@ -785,7 +785,7 @@ nextBlock.remove(); } - // Check if need to further merge with the list resides after the merged block. (#9080) + // Check if need to further merge with the list resides after the merged block. (http://dev.ckeditor.com/ticket/9080) var walkerRng = nextCursor.clone(), editable = editor.editable(); walkerRng.setEndAt( editable, CKEDITOR.POSITION_BEFORE_END ); var walker = new CKEDITOR.dom.walker( walkerRng ); @@ -811,7 +811,7 @@ CKEDITOR.plugins.add( 'list', { // jscs:disable maximumLineLength - lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% + lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% // jscs:enable maximumLineLength icons: 'bulletedlist,bulletedlist-rtl,numberedlist,numberedlist-rtl', // %REMOVE_LINE_CORE% hidpi: true, // %REMOVE_LINE_CORE% @@ -840,7 +840,7 @@ } ); } - // Handled backspace/del key to join list items. (#8248,#9080) + // Handled backspace/del key to join list items. (http://dev.ckeditor.com/ticket/8248,http://dev.ckeditor.com/ticket/9080) editor.on( 'key', function( evt ) { // Use getKey directly in order to ignore modifiers. // Justification: http://dev.ckeditor.com/ticket/11861#comment:13 @@ -908,7 +908,7 @@ // Place cursor at the end of previous block. cursor.moveToElementEditEnd( joinWith ); - // And then just before end of closest block element (#12729). + // And then just before end of closest block element (http://dev.ckeditor.com/ticket/12729). cursor.moveToPosition( cursor.endPath().block, CKEDITOR.POSITION_BEFORE_END ); } } @@ -919,7 +919,7 @@ } else { var list = path.contains( listNodeNames ); - // Backspace pressed at the start of list outdents the first list item. (#9129) + // Backspace pressed at the start of list outdents the first list item. (http://dev.ckeditor.com/ticket/9129) if ( list && range.checkBoundaryOfElement( list, CKEDITOR.START ) ) { li = list.getFirst( nonEmpty ); @@ -981,7 +981,7 @@ nextLine = range.clone(); nextLine.moveToElementEditStart( next ); - // #13409 + // http://dev.ckeditor.com/ticket/13409 // For the following case and similar // //