aboutsummaryrefslogtreecommitdiff
path: root/sources/plugins/list
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2017-12-04 18:55:29 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2017-12-04 18:55:29 +0100
commit1794320dcfdfcd19572fb1676294f9853a6bbc20 (patch)
treea4c9e978947d6930d50391747382d7f95a5863e3 /sources/plugins/list
parent7183f6a6a21ad9124e70c997e0168459f377a9f2 (diff)
downloadludivine-ckeditor-component-master.tar.gz
ludivine-ckeditor-component-master.tar.zst
ludivine-ckeditor-component-master.zip
Update to 4.7.3HEAD4.7.3master
Diffstat (limited to 'sources/plugins/list')
-rw-r--r--sources/plugins/list/lang/es-mx.js8
-rw-r--r--sources/plugins/list/plugin.js40
2 files changed, 28 insertions, 20 deletions
diff --git a/sources/plugins/list/lang/es-mx.js b/sources/plugins/list/lang/es-mx.js
new file mode 100644
index 0000000..5e50fcb
--- /dev/null
+++ b/sources/plugins/list/lang/es-mx.js
@@ -0,0 +1,8 @@
1/*
2Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.md or http://ckeditor.com/license
4*/
5CKEDITOR.plugins.setLang( 'list', 'es-mx', {
6 bulletedlist: 'Insertar/Remover Lista con viñetas',
7 numberedlist: 'Insertar/Remover Lista numerada'
8} );
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 @@
60 for ( var i = 0, count = listNode.getChildCount(); i < count; i++ ) { 60 for ( var i = 0, count = listNode.getChildCount(); i < count; i++ ) {
61 var listItem = listNode.getChild( i ); 61 var listItem = listNode.getChild( i );
62 62
63 // Fixing malformed nested lists by moving it into a previous list item. (#6236) 63 // Fixing malformed nested lists by moving it into a previous list item. (http://dev.ckeditor.com/ticket/6236)
64 if ( listItem.type == CKEDITOR.NODE_ELEMENT && listItem.getName() in CKEDITOR.dtd.$list ) 64 if ( listItem.type == CKEDITOR.NODE_ELEMENT && listItem.getName() in CKEDITOR.dtd.$list )
65 CKEDITOR.plugins.list.listToArray( listItem, database, baseArray, baseIndentLevel + 1 ); 65 CKEDITOR.plugins.list.listToArray( listItem, database, baseArray, baseIndentLevel + 1 );
66 66
@@ -137,13 +137,13 @@
137 currentListItem.append( item.contents[ i ].clone( 1, 1 ) ); 137 currentListItem.append( item.contents[ i ].clone( 1, 1 ) );
138 currentIndex++; 138 currentIndex++;
139 } else if ( item.indent == Math.max( indentLevel, 0 ) + 1 ) { 139 } else if ( item.indent == Math.max( indentLevel, 0 ) + 1 ) {
140 // Maintain original direction (#6861). 140 // Maintain original direction (http://dev.ckeditor.com/ticket/6861).
141 var currDir = listArray[ currentIndex - 1 ].element.getDirection( 1 ), 141 var currDir = listArray[ currentIndex - 1 ].element.getDirection( 1 ),
142 listData = CKEDITOR.plugins.list.arrayToList( listArray, null, currentIndex, paragraphMode, currDir != orgDir ? orgDir : null ); 142 listData = CKEDITOR.plugins.list.arrayToList( listArray, null, currentIndex, paragraphMode, currDir != orgDir ? orgDir : null );
143 143
144 // If the next block is an <li> with another list tree as the first 144 // If the next block is an <li> with another list tree as the first
145 // child, we'll need to append a filler (<br>/NBSP) or the list item 145 // child, we'll need to append a filler (<br>/NBSP) or the list item
146 // wouldn't be editable. (#6724) 146 // wouldn't be editable. (http://dev.ckeditor.com/ticket/6724)
147 if ( !currentListItem.getChildCount() && CKEDITOR.env.needsNbspFiller && doc.$.documentMode <= 7 ) 147 if ( !currentListItem.getChildCount() && CKEDITOR.env.needsNbspFiller && doc.$.documentMode <= 7 )
148 currentListItem.append( doc.createText( '\xa0' ) ); 148 currentListItem.append( doc.createText( '\xa0' ) );
149 currentListItem.append( listData.listNode ); 149 currentListItem.append( listData.listNode );
@@ -416,7 +416,7 @@
416 contentBlock.appendTo( listItem ); 416 contentBlock.appendTo( listItem );
417 else { 417 else {
418 contentBlock.copyAttributes( listItem ); 418 contentBlock.copyAttributes( listItem );
419 // Remove direction attribute after it was merged into list root. (#7657) 419 // Remove direction attribute after it was merged into list root. (http://dev.ckeditor.com/ticket/7657)
420 if ( listDir && contentBlock.getDirection() ) { 420 if ( listDir && contentBlock.getDirection() ) {
421 listItem.removeStyle( 'direction' ); 421 listItem.removeStyle( 'direction' );
422 listItem.removeAttribute( 'dir' ); 422 listItem.removeAttribute( 'dir' );
@@ -477,7 +477,7 @@
477 477
478 var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, groupObj.root.getAttribute( 'dir' ) ); 478 var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, groupObj.root.getAttribute( 'dir' ) );
479 479
480 // Compensate <br> before/after the list node if the surrounds are non-blocks.(#3836) 480 // Compensate <br> before/after the list node if the surrounds are non-blocks.(http://dev.ckeditor.com/ticket/3836)
481 var docFragment = newList.listNode, 481 var docFragment = newList.listNode,
482 boundaryNode, siblingNode; 482 boundaryNode, siblingNode;
483 483
@@ -504,9 +504,9 @@
504 // Checks wheather this block should be element preserved (not transformed to <li>) when creating list. 504 // Checks wheather this block should be element preserved (not transformed to <li>) when creating list.
505 function shouldPreserveBlock( block ) { 505 function shouldPreserveBlock( block ) {
506 return ( 506 return (
507 // #5335 507 // http://dev.ckeditor.com/ticket/5335
508 block.is( 'pre' ) || 508 block.is( 'pre' ) ||
509 // #5271 - this is a header. 509 // http://dev.ckeditor.com/ticket/5271 - this is a header.
510 headerTagRegex.test( block.getName() ) || 510 headerTagRegex.test( block.getName() ) ||
511 // 11083 - this is a non-editable element. 511 // 11083 - this is a non-editable element.
512 block.getAttribute( 'contenteditable' ) == 'false' 512 block.getAttribute( 'contenteditable' ) == 'false'
@@ -523,7 +523,7 @@
523 523
524 var elementType = CKEDITOR.dom.walker.nodeType( CKEDITOR.NODE_ELEMENT ); 524 var elementType = CKEDITOR.dom.walker.nodeType( CKEDITOR.NODE_ELEMENT );
525 525
526 // Merge child nodes with direction preserved. (#7448) 526 // Merge child nodes with direction preserved. (http://dev.ckeditor.com/ticket/7448)
527 function mergeChildren( from, into, refNode, forward ) { 527 function mergeChildren( from, into, refNode, forward ) {
528 var child, itemDir; 528 var child, itemDir;
529 while ( ( child = from[ forward ? 'getLast' : 'getFirst' ]( elementType ) ) ) { 529 while ( ( child = from[ forward ? 'getLast' : 'getFirst' ]( elementType ) ) ) {
@@ -556,7 +556,7 @@
556 selection.selectRanges( ranges ); 556 selection.selectRanges( ranges );
557 } 557 }
558 // Maybe a single range there enclosing the whole list, 558 // Maybe a single range there enclosing the whole list,
559 // turn on the list state manually(#4129). 559 // turn on the list state manually(http://dev.ckeditor.com/ticket/4129).
560 else { 560 else {
561 var range = ranges.length == 1 && ranges[ 0 ], 561 var range = ranges.length == 1 && ranges[ 0 ],
562 enclosedNode = range && range.getEnclosedNode(); 562 enclosedNode = range && range.getEnclosedNode();
@@ -606,13 +606,13 @@
606 606
607 // First, try to group by a list ancestor. 607 // First, try to group by a list ancestor.
608 for ( var i = pathElementsCount - 1; i >= 0 && ( element = pathElements[ i ] ); i-- ) { 608 for ( var i = pathElementsCount - 1; i >= 0 && ( element = pathElements[ i ] ); i-- ) {
609 // Don't leak outside block limit (#3940). 609 // Don't leak outside block limit (http://dev.ckeditor.com/ticket/3940).
610 if ( listNodeNames[ element.getName() ] && blockLimit.contains( element ) ) { 610 if ( listNodeNames[ element.getName() ] && blockLimit.contains( element ) ) {
611 // If we've encountered a list inside a block limit 611 // If we've encountered a list inside a block limit
612 // The last group object of the block limit element should 612 // The last group object of the block limit element should
613 // no longer be valid. Since paragraphs after the list 613 // no longer be valid. Since paragraphs after the list
614 // should belong to a different group of paragraphs before 614 // should belong to a different group of paragraphs before
615 // the list. (Bug #1309) 615 // the list. (Bug http://dev.ckeditor.com/ticket/1309)
616 blockLimit.removeCustomData( 'list_group_object_' + index ); 616 blockLimit.removeCustomData( 'list_group_object_' + index );
617 617
618 var groupObj = element.getCustomData( 'list_group_object' ); 618 var groupObj = element.getCustomData( 'list_group_object' );
@@ -688,7 +688,7 @@
688 function mergeSibling( rtl ) { 688 function mergeSibling( rtl ) {
689 var sibling = listNode[ rtl ? 'getPrevious' : 'getNext' ]( nonEmpty ); 689 var sibling = listNode[ rtl ? 'getPrevious' : 'getNext' ]( nonEmpty );
690 if ( sibling && sibling.type == CKEDITOR.NODE_ELEMENT && sibling.is( listNode.getName() ) ) { 690 if ( sibling && sibling.type == CKEDITOR.NODE_ELEMENT && sibling.is( listNode.getName() ) ) {
691 // Move children order by merge direction.(#3820) 691 // Move children order by merge direction.(http://dev.ckeditor.com/ticket/3820)
692 mergeChildren( listNode, sibling, null, !rtl ); 692 mergeChildren( listNode, sibling, null, !rtl );
693 693
694 listNode.remove(); 694 listNode.remove();
@@ -770,7 +770,7 @@
770 nextPath = nextCursor.startPath(); 770 nextPath = nextCursor.startPath();
771 nextBlock = nextPath.block; 771 nextBlock = nextPath.block;
772 772
773 // Abort when nothing to be removed (#10890). 773 // Abort when nothing to be removed (http://dev.ckeditor.com/ticket/10890).
774 if ( !nextBlock ) 774 if ( !nextBlock )
775 break; 775 break;
776 776
@@ -785,7 +785,7 @@
785 nextBlock.remove(); 785 nextBlock.remove();
786 } 786 }
787 787
788 // Check if need to further merge with the list resides after the merged block. (#9080) 788 // Check if need to further merge with the list resides after the merged block. (http://dev.ckeditor.com/ticket/9080)
789 var walkerRng = nextCursor.clone(), editable = editor.editable(); 789 var walkerRng = nextCursor.clone(), editable = editor.editable();
790 walkerRng.setEndAt( editable, CKEDITOR.POSITION_BEFORE_END ); 790 walkerRng.setEndAt( editable, CKEDITOR.POSITION_BEFORE_END );
791 var walker = new CKEDITOR.dom.walker( walkerRng ); 791 var walker = new CKEDITOR.dom.walker( walkerRng );
@@ -811,7 +811,7 @@
811 811
812 CKEDITOR.plugins.add( 'list', { 812 CKEDITOR.plugins.add( 'list', {
813 // jscs:disable maximumLineLength 813 // jscs:disable maximumLineLength
814 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% 814 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%
815 // jscs:enable maximumLineLength 815 // jscs:enable maximumLineLength
816 icons: 'bulletedlist,bulletedlist-rtl,numberedlist,numberedlist-rtl', // %REMOVE_LINE_CORE% 816 icons: 'bulletedlist,bulletedlist-rtl,numberedlist,numberedlist-rtl', // %REMOVE_LINE_CORE%
817 hidpi: true, // %REMOVE_LINE_CORE% 817 hidpi: true, // %REMOVE_LINE_CORE%
@@ -840,7 +840,7 @@
840 } ); 840 } );
841 } 841 }
842 842
843 // Handled backspace/del key to join list items. (#8248,#9080) 843 // Handled backspace/del key to join list items. (http://dev.ckeditor.com/ticket/8248,http://dev.ckeditor.com/ticket/9080)
844 editor.on( 'key', function( evt ) { 844 editor.on( 'key', function( evt ) {
845 // Use getKey directly in order to ignore modifiers. 845 // Use getKey directly in order to ignore modifiers.
846 // Justification: http://dev.ckeditor.com/ticket/11861#comment:13 846 // Justification: http://dev.ckeditor.com/ticket/11861#comment:13
@@ -908,7 +908,7 @@
908 // Place cursor at the end of previous block. 908 // Place cursor at the end of previous block.
909 cursor.moveToElementEditEnd( joinWith ); 909 cursor.moveToElementEditEnd( joinWith );
910 910
911 // And then just before end of closest block element (#12729). 911 // And then just before end of closest block element (http://dev.ckeditor.com/ticket/12729).
912 cursor.moveToPosition( cursor.endPath().block, CKEDITOR.POSITION_BEFORE_END ); 912 cursor.moveToPosition( cursor.endPath().block, CKEDITOR.POSITION_BEFORE_END );
913 } 913 }
914 } 914 }
@@ -919,7 +919,7 @@
919 } 919 }
920 else { 920 else {
921 var list = path.contains( listNodeNames ); 921 var list = path.contains( listNodeNames );
922 // Backspace pressed at the start of list outdents the first list item. (#9129) 922 // Backspace pressed at the start of list outdents the first list item. (http://dev.ckeditor.com/ticket/9129)
923 if ( list && range.checkBoundaryOfElement( list, CKEDITOR.START ) ) { 923 if ( list && range.checkBoundaryOfElement( list, CKEDITOR.START ) ) {
924 li = list.getFirst( nonEmpty ); 924 li = list.getFirst( nonEmpty );
925 925
@@ -981,7 +981,7 @@
981 nextLine = range.clone(); 981 nextLine = range.clone();
982 nextLine.moveToElementEditStart( next ); 982 nextLine.moveToElementEditStart( next );
983 983
984 // #13409 984 // http://dev.ckeditor.com/ticket/13409
985 // For the following case and similar 985 // For the following case and similar
986 // 986 //
987 // <ul> 987 // <ul>
@@ -1049,7 +1049,7 @@
1049 } 1049 }
1050 } 1050 }
1051 1051
1052 // Moving `cursor` and `next line` only when at the end literally (#12729). 1052 // Moving `cursor` and `next line` only when at the end literally (http://dev.ckeditor.com/ticket/12729).
1053 if ( isAtEnd == 2 ) { 1053 if ( isAtEnd == 2 ) {
1054 cursor.moveToPosition( cursor.endPath().block, CKEDITOR.POSITION_BEFORE_END ); 1054 cursor.moveToPosition( cursor.endPath().block, CKEDITOR.POSITION_BEFORE_END );
1055 1055