From: Jason Woofenden Date: Mon, 26 Sep 2011 04:55:52 +0000 (-0400) Subject: vanilla ckeditor-3.4.3 X-Git-Tag: v3.4.3 X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=commitdiff_plain;h=614511639979907ceb0da3614122a4d8eb963ad4 vanilla ckeditor-3.4.3 --- diff --git a/CHANGES.html b/CHANGES.html index 6cb8397..f36c088 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -35,6 +35,45 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEditor Changelog

+ CKEditor 3.4.3

+

+ Fixed issues:

+ +

CKEditor 3.4.2

New features:

diff --git a/_source/adapters/jquery.js b/_source/adapters/jquery.js index e633758..3cb8bb6 100644 --- a/_source/adapters/jquery.js +++ b/_source/adapters/jquery.js @@ -97,6 +97,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license */ ckeditor: function( callback, config ) { + if ( !CKEDITOR.env.isCompatible ) + return this; + if ( !jQuery.isFunction( callback )) { var tmp = config; diff --git a/_source/core/ckeditor_base.js b/_source/core/ckeditor_base.js index ded7e9e..de403e9 100644 --- a/_source/core/ckeditor_base.js +++ b/_source/core/ckeditor_base.js @@ -12,7 +12,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Must be updated on changes in the script, as well as updated in the // ckeditor_source.js and ckeditor_basic_source.js files. -// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.4.2',rev:'6041',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})(); +// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.4.3',rev:'6236',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})(); // #### Raw code // ATTENTION: read the above "Compressed Code" notes when changing this code. @@ -42,7 +42,7 @@ if ( !window.CKEDITOR ) // The production implementation contains a fixed timestamp, unique // for each release, generated by the releaser. // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) - timestamp : 'AA4E4NT', + timestamp : 'ABH04T8', /** * Contains the CKEditor version number. @@ -50,7 +50,7 @@ if ( !window.CKEDITOR ) * @example * alert( CKEDITOR.version ); // e.g. 'CKEditor 3.4.1' */ - version : '3.4.2', + version : '3.4.3', /** * Contains the CKEditor revision number. @@ -60,7 +60,7 @@ if ( !window.CKEDITOR ) * @example * alert( CKEDITOR.revision ); // e.g. '3975' */ - revision : '6041', + revision : '6236', /** * Private object used to hold core stuff. It should not be used out of diff --git a/_source/core/config.js b/_source/core/config.js index a408d93..471ad8a 100644 --- a/_source/core/config.js +++ b/_source/core/config.js @@ -349,7 +349,7 @@ CKEDITOR.config = /** * List of regular expressions to be executed over the input HTML, - * indicating code that must stay untouched. + * indicating HTML source code that matched must not present in WYSIWYG mode for editing. * @type Array * @default [] (empty array) * @example diff --git a/_source/core/dom/document.js b/_source/core/dom/document.js index bd8c18c..a68ddf5 100644 --- a/_source/core/dom/document.js +++ b/_source/core/dom/document.js @@ -150,7 +150,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, getElementsByTag : function( tagName, namespace ) { - if ( !CKEDITOR.env.ie && namespace ) + if ( !( CKEDITOR.env.ie && ! ( document.documentMode > 8 ) ) && namespace ) tagName = namespace + ':' + tagName; return new CKEDITOR.dom.nodeList( this.$.getElementsByTagName( tagName ) ); }, diff --git a/_source/core/dom/element.js b/_source/core/dom/element.js index 6c62613..48b0d26 100644 --- a/_source/core/dom/element.js +++ b/_source/core/dom/element.js @@ -613,7 +613,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, // Cache the lowercased name inside a closure. var nodeName = this.$.nodeName.toLowerCase(); - if ( CKEDITOR.env.ie ) + if ( CKEDITOR.env.ie && ! ( document.documentMode > 8 ) ) { var scopeName = this.$.scopeName; if ( scopeName != 'HTML' ) @@ -721,9 +721,6 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, var thisLength = thisAttribs.length, otherLength = otherAttribs.length; - if ( !CKEDITOR.env.ie && thisLength != otherLength ) - return false; - for ( var i = 0 ; i < thisLength ; i++ ) { var attribute = thisAttribs[ i ]; diff --git a/_source/core/dom/node.js b/_source/core/dom/node.js index 02a726c..6611545 100644 --- a/_source/core/dom/node.js +++ b/_source/core/dom/node.js @@ -659,6 +659,24 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, } }, + /** + * Checks is this node is read-only (should not be changed). It + * additionaly returns the element, if any, which defines the read-only + * state of this node. It may be the node itself or any of its parent + * nodes. + * @returns {CKEDITOR.dom.element|Boolean} An element containing + * read-only attributes or "false" if none is found. + * @since 3.5 + * @example + * // For the following HTML: + * //
Some text
+ * + * // If "ele" is the above
+ * ele.getReadOnlyRoot(); // the
element + * + * // If "ele" is the above + * ele.getReadOnlyRoot(); // the
element + */ isReadOnly : function() { var current = this; diff --git a/_source/core/dom/range.js b/_source/core/dom/range.js index b43a82d..8f10980 100644 --- a/_source/core/dom/range.js +++ b/_source/core/dom/range.js @@ -351,7 +351,10 @@ CKEDITOR.dom.range = function( document ) this.collapsed = true; }, - // The selection may be lost when cloning (due to the splitText() call). + /** + * The content nodes of the range are cloned and added to a document fragment, which is returned. + * Note: Text selection may lost after invoking this method. (caused by text node splitting). + */ cloneContents : function() { var docFrag = new CKEDITOR.dom.documentFragment( this.document ); @@ -362,6 +365,9 @@ CKEDITOR.dom.range = function( document ) return docFrag; }, + /** + * Deletes the content nodes of the range permanently from the DOM tree. + */ deleteContents : function() { if ( this.collapsed ) @@ -370,6 +376,10 @@ CKEDITOR.dom.range = function( document ) execContentsAction( this, 0 ); }, + /** + * The content nodes of the range are cloned and added to a document fragment, + * meanwhile they're removed permanently from the DOM tree. + */ extractContents : function() { var docFrag = new CKEDITOR.dom.documentFragment( this.document ); @@ -1405,7 +1415,7 @@ CKEDITOR.dom.range = function( document ) // Fixing invalid range start inside dtd empty elements. if( startNode.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[ startNode.getName() ] ) - startNode = startNode.getParent(), startOffset = startNode.getIndex(); + startOffset = startNode.getIndex(), startNode = startNode.getParent(); this.startContainer = startNode; this.startOffset = startOffset; diff --git a/_source/core/dom/walker.js b/_source/core/dom/walker.js index ae9dfec..126f3f2 100644 --- a/_source/core/dom/walker.js +++ b/_source/core/dom/walker.js @@ -334,16 +334,15 @@ For licensing, see LICENSE.html or http://ckeditor.com/license 'table-column' : 1, 'table-cell' : 1, 'table-caption' : 1 - }, - blockBoundaryNodeNameMatch = { hr : 1 }; + }; CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames ) { - var nodeNameMatches = CKEDITOR.tools.extend( {}, - blockBoundaryNodeNameMatch, customNodeNames || {} ); + var nodeNameMatches = CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$block, customNodeNames || {} ); - return blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] || - nodeNameMatches[ this.getName() ]; + // Don't consider floated formatting as block boundary, fall back to dtd check in that case. (#6297) + return this.getComputedStyle( 'float' ) == 'none' && blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] + || nodeNameMatches[ this.getName() ]; }; CKEDITOR.dom.walker.blockBoundary = function( customNodeNames ) diff --git a/_source/core/loader.js b/_source/core/loader.js index e5c38a5..f1b2543 100644 --- a/_source/core/loader.js +++ b/_source/core/loader.js @@ -108,7 +108,7 @@ if ( !CKEDITOR.loader ) return path; })(); - var timestamp = 'AA4E4NT'; + var timestamp = 'ABH04T8'; var getUrl = function( resource ) { diff --git a/_source/lang/_translationstatus.txt b/_source/lang/_translationstatus.txt index 73dbbe1..5a707b3 100644 --- a/_source/lang/_translationstatus.txt +++ b/_source/lang/_translationstatus.txt @@ -16,7 +16,7 @@ en-au.js Found: 369 Missing: 162 en-ca.js Found: 369 Missing: 162 en-gb.js Found: 370 Missing: 161 eo.js Found: 259 Missing: 272 -es.js Found: 524 Missing: 7 +es.js Found: 531 Missing: 0 et.js Found: 301 Missing: 230 eu.js Found: 403 Missing: 128 fa.js Found: 302 Missing: 229 @@ -29,10 +29,10 @@ gu.js Found: 300 Missing: 231 he.js Found: 531 Missing: 0 hi.js Found: 302 Missing: 229 hr.js Found: 404 Missing: 127 -hu.js Found: 445 Missing: 86 +hu.js Found: 530 Missing: 1 is.js Found: 307 Missing: 224 it.js Found: 404 Missing: 127 -ja.js Found: 413 Missing: 118 +ja.js Found: 489 Missing: 42 km.js Found: 275 Missing: 256 ko.js Found: 293 Missing: 238 lt.js Found: 306 Missing: 225 diff --git a/_source/lang/de.js b/_source/lang/de.js index 2d09650..52044d2 100644 --- a/_source/lang/de.js +++ b/_source/lang/de.js @@ -721,7 +721,7 @@ CKEDITOR.lang['de'] = { title : 'Über CKEditor', dlgTitle : 'Über CKEditor', - moreInfo : 'Für Informationen Liztenzbestimmungen besuchen sie bitte unsere Webseite:', + moreInfo : 'Für Informationen über unsere Lizenzbestimmungen besuchen sie bitte unsere Webseite:', copy : 'Copyright © $1. Alle Rechte vorbehalten.' }, diff --git a/_source/lang/es.js b/_source/lang/es.js index 5df3017..bdbd9b1 100644 --- a/_source/lang/es.js +++ b/_source/lang/es.js @@ -105,10 +105,10 @@ CKEDITOR.lang['es'] = targetTop : 'Ventana principal (_top)', targetSelf : 'Misma ventana (_self)', targetParent : 'Ventana padre (_parent)', - langDirLTR : 'Left to Right (LTR)', // MISSING - langDirRTL : 'Right to Left (RTL)', // MISSING - styles : 'Style', // MISSING - cssClasses : 'Stylesheet Classes', // MISSING + langDirLTR : 'Izquierda a derecha (LTR)', + langDirRTL : 'Derecha a izquierda (RTL)', + styles : 'Estilos', + cssClasses : 'Clase de la hoja de estilos', // Put the voice-only part of the label in the span. unavailable : '%1, no disponible' @@ -200,7 +200,7 @@ CKEDITOR.lang['es'] = bulletedTitle : 'Propiedades de viñetas', type : 'Tipo', start : 'Inicio', - validateStartNumber :'List start number must be a whole number.', // MISSING + validateStartNumber :'El Inicio debe ser un número entero.', circle : 'Círculo', disc : 'Disco', square : 'Cuadrado', @@ -752,7 +752,7 @@ CKEDITOR.lang['es'] = bidi : { - ltr : 'Text direction from left to right', // MISSING - rtl : 'Text direction from right to left' // MISSING + ltr : 'Dirección del texto de izquierda a derecha', + rtl : 'Dirección del texto de derecha a izquierda' } }; diff --git a/_source/lang/hu.js b/_source/lang/hu.js index cb9f465..ea2d846 100644 --- a/_source/lang/hu.js +++ b/_source/lang/hu.js @@ -31,11 +31,11 @@ CKEDITOR.lang['hu'] = * Screenreader titles. Please note that screenreaders are not always capable * of reading non-English words. So be careful while translating it. */ - editorTitle : 'Rich text editor, %1, press ALT 0 for help.', // MISSING + editorTitle : 'HTML szerkesztő', // ARIA descriptions. - toolbar : 'Toolbar', // MISSING - editor : 'Rich Text Editor', // MISSING + toolbar : 'Eszköztár', + editor : 'HTML szerkesztő', // Toolbar buttons without dialogs. source : 'Forráskód', @@ -92,23 +92,23 @@ CKEDITOR.lang['hu'] = cssStyle : 'Stílus', ok : 'Rendben', cancel : 'Mégsem', - close : 'Close', // MISSING - preview : 'Preview', // MISSING + close : 'Bezárás', + preview : 'Előnézet', generalTab : 'Általános', advancedTab : 'További opciók', validateNumberFailed : 'A mezőbe csak számokat írhat.', confirmNewPage : 'Minden nem mentett változás el fog veszni! Biztosan be szeretné tölteni az oldalt?', confirmCancel : 'Az űrlap tartalma megváltozott, ám a változásokat nem rögzítette. Biztosan be szeretné zárni az űrlapot?', - options : 'Options', // MISSING - target : 'Target', // MISSING - targetNew : 'New Window (_blank)', // MISSING - targetTop : 'Topmost Window (_top)', // MISSING - targetSelf : 'Same Window (_self)', // MISSING - targetParent : 'Parent Window (_parent)', // MISSING - langDirLTR : 'Left to Right (LTR)', // MISSING - langDirRTL : 'Right to Left (RTL)', // MISSING - styles : 'Style', // MISSING - cssClasses : 'Stylesheet Classes', // MISSING + options : 'Beállítások', + target : 'Cél', + targetNew : 'Új ablak (_blank)', + targetTop : 'Legfelső ablak (_top)', + targetSelf : 'Aktuális ablakban (_self)', + targetParent : 'Szülő ablak (_parent)', + langDirLTR : 'Balról jobbra (LTR)', + langDirRTL : 'Jobbról balra (RTL)', + styles : 'Stílus', + cssClasses : 'Stíluslap osztály', // Put the voice-only part of the label in the span. unavailable : '%1, unavailable' // MISSING @@ -116,7 +116,7 @@ CKEDITOR.lang['hu'] = contextmenu : { - options : 'Context Menu Options' // MISSING + options : 'Helyi menü opciók' }, // Special char dialog. @@ -124,7 +124,7 @@ CKEDITOR.lang['hu'] = { toolbar : 'Speciális karakter beillesztése', title : 'Speciális karakter választása', - options : 'Special Character Options' // MISSING + options : 'Speciális karakter opciók' }, // Link dialog. @@ -139,7 +139,7 @@ CKEDITOR.lang['hu'] = upload : 'Feltöltés', advanced : 'További opciók', type : 'Hivatkozás típusa', - toUrl : 'URL', // MISSING + toUrl : 'URL', toAnchor : 'Horgony az oldalon', toEmail : 'E-Mail', targetFrame : '', @@ -196,25 +196,25 @@ CKEDITOR.lang['hu'] = // List style dialog list: { - numberedTitle : 'Numbered List Properties', // MISSING - bulletedTitle : 'Bulleted List Properties', // MISSING - type : 'Type', // MISSING - start : 'Start', // MISSING - validateStartNumber :'List start number must be a whole number.', // MISSING - circle : 'Circle', // MISSING - disc : 'Disc', // MISSING - square : 'Square', // MISSING - none : 'None', // MISSING - notset : '', // MISSING - armenian : 'Armenian numbering', // MISSING - georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING - lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING - upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING - lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING - upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING - lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING - decimal : 'Decimal (1, 2, 3, etc.)', // MISSING - decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING + numberedTitle : 'Sorszámozott lista tulajdonságai', + bulletedTitle : 'Pontozott lista tulajdonságai', + type : 'Típus', + start : 'Kezdőszám', + validateStartNumber :'A kezdőszám nem lehet tört érték.', + circle : 'Kör', + disc : 'Korong', + square : 'Négyzet', + none : 'Nincs', + notset : '', + armenian : 'Örmény számozás', + georgian : 'Grúz számozás (an, ban, gan, stb.)', + lowerRoman : 'Római kisbetűs (i, ii, iii, iv, v, stb.)', + upperRoman : 'Római nagybetűs (I, II, III, IV, V, stb.)', + lowerAlpha : 'Kisbetűs (a, b, c, d, e, stb.)', + upperAlpha : 'Nagybetűs (A, B, C, D, E, stb.)', + lowerGreek : 'Görög (alpha, beta, gamma, stb.)', + decimal : 'Arab számozás (1, 2, 3, stb.)', + decimalLeadingZero : 'Számozás bevezető nullákkal (01, 02, 03, stb.)' }, // Find And Replace Dialog @@ -250,7 +250,7 @@ CKEDITOR.lang['hu'] = width : 'Szélesség', widthPx : 'képpont', widthPc : 'százalék', - widthUnit : 'width unit', // MISSING + widthUnit : 'Szélesség egység', height : 'Magasság', cellSpace : 'Cella térköz', cellPad : 'Cella belső margó', @@ -301,7 +301,7 @@ CKEDITOR.lang['hu'] = invalidHeight : 'A magasság mezőbe csak számokat írhat.', invalidRowSpan : 'A függőleges egyesítés mezőbe csak számokat írhat.', invalidColSpan : 'A vízszintes egyesítés mezőbe csak számokat írhat.', - chooseColor : 'Choose' // MISSING + chooseColor : 'Válasszon' }, row : @@ -413,7 +413,7 @@ CKEDITOR.lang['hu'] = width : 'Szélesség', height : 'Magasság', lockRatio : 'Arány megtartása', - unlockRatio : 'Unlock Ratio', // MISSING + unlockRatio : 'Arány figyelmen kívül hagyása', resetSize : 'Eredeti méret', border : 'Keret', hSpace : 'Vízsz. táv', @@ -423,14 +423,14 @@ CKEDITOR.lang['hu'] = alignRight : 'Jobbra', alertUrl : 'Töltse ki a kép webcímét', linkTab : 'Hivatkozás', - button2Img : 'Do you want to transform the selected image button on a simple image?', // MISSING - img2Button : 'Do you want to transform the selected image on a image button?', // MISSING - urlMissing : 'Image source URL is missing.', // MISSING - validateWidth : 'Width must be a whole number.', // MISSING - validateHeight : 'Height must be a whole number.', // MISSING - validateBorder : 'Border must be a whole number.', // MISSING - validateHSpace : 'HSpace must be a whole number.', // MISSING - validateVSpace : 'VSpace must be a whole number.' // MISSING + button2Img : 'A kiválasztott képgombból sima képet szeretne csinálni?', + img2Button : 'A kiválasztott képből képgombot szeretne csinálni?', + urlMissing : 'Hiányzik a kép URL-je', + validateWidth : 'A szélességnek egész számot kell beírni!', + validateHeight : 'A magasságnak egész számot kell beírni!', + validateBorder : 'A keret méretének egész számot kell beírni!', + validateHSpace : 'Vízszintes távolságnak egész számot kell beírni!', + validateVSpace : 'Függőleges távolságnak egész számot kell beírni!' }, // Flash Dialog @@ -512,12 +512,12 @@ CKEDITOR.lang['hu'] = { toolbar : 'Hangulatjelek', title : 'Hangulatjel beszúrása', - options : 'Smiley Options' // MISSING + options : 'Hangulatjel opciók' }, elementsPath : { - eleLabel : 'Elements path', // MISSING + eleLabel : 'Elem utak', eleTitle : '%1 elem' }, @@ -543,15 +543,15 @@ CKEDITOR.lang['hu'] = copyError : 'A böngésző biztonsági beállításai nem engedélyezik a szerkesztőnek, hogy végrehajtsa a másolás műveletet. Használja az alábbi billentyűkombinációt (Ctrl/Cmd+X).', pasteMsg : 'Másolja be az alábbi mezőbe a Ctrl/Cmd+V billentyűk lenyomásával, majd nyomjon Rendben-t.', securityMsg : 'A böngésző biztonsági beállításai miatt a szerkesztő nem képes hozzáférni a vágólap adataihoz. Illeszd be újra ebben az ablakban.', - pasteArea : 'Paste Area' // MISSING + pasteArea : 'Beszúrás mező' }, pastefromword : { - confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING + confirmCleanup : 'Úgy tűnik a beillesztett szöveget Word-ből másolt át. Meg szeretné tisztítani a szöveget? (ajánlott)', toolbar : 'Beillesztés Word-ből', title : 'Beillesztés Word-ből', - error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING + error : 'Egy belső hiba miatt nem sikerült megtisztítani a szöveget' }, pasteText : @@ -564,7 +564,7 @@ CKEDITOR.lang['hu'] = { button : 'Sablonok', title : 'Elérhető sablonok', - options : 'Template Options', // MISSING + options : 'Sablon opciók', insertOption : 'Kicseréli a jelenlegi tartalmat', selectPromptMsg : 'Válassza ki melyik sablon nyíljon meg a szerkesztőben
(a jelenlegi tartalom elveszik):', emptyListMsg : '(Nincs sablon megadva)' @@ -575,7 +575,7 @@ CKEDITOR.lang['hu'] = stylesCombo : { label : 'Stílus', - panelTitle : 'Formatting Styles', // MISSING + panelTitle : 'Formázási stílusok', panelTitle1 : 'Blokk stílusok', panelTitle2 : 'Inline stílusok', panelTitle3 : 'Objektum stílusok' @@ -600,19 +600,19 @@ CKEDITOR.lang['hu'] = div : { - title : 'Create Div Container', // MISSING - toolbar : 'Create Div Container', // MISSING - cssClassInputLabel : 'Stylesheet Classes', // MISSING - styleSelectLabel : 'Style', // MISSING - IdInputLabel : 'Id', // MISSING - languageCodeInputLabel : ' Language Code', // MISSING - inlineStyleInputLabel : 'Inline Style', // MISSING - advisoryTitleInputLabel : 'Advisory Title', // MISSING - langDirLabel : 'Language Direction', // MISSING - langDirLTRLabel : 'Left to Right (LTR)', // MISSING - langDirRTLLabel : 'Right to Left (RTL)', // MISSING - edit : 'Edit Div', // MISSING - remove : 'Remove Div' // MISSING + title : 'DIV tároló létrehozása', + toolbar : 'DIV tároló létrehozása', + cssClassInputLabel : 'Stíluslap osztály', + styleSelectLabel : 'Stílus', + IdInputLabel : 'Azonosító', + languageCodeInputLabel : ' Nyelv kódja', + inlineStyleInputLabel : 'Inline stílus', + advisoryTitleInputLabel : 'Tipp szöveg', + langDirLabel : 'Nyelvi irány', + langDirLTRLabel : 'Balról jobbra (LTR)', + langDirRTLLabel : 'Jobbról balra (RTL)', + edit : 'DIV szerkesztése', + remove : 'DIV eltávolítása' }, font : @@ -633,7 +633,7 @@ CKEDITOR.lang['hu'] = { textColorTitle : 'Betűszín', bgColorTitle : 'Háttérszín', - panelTitle : 'Colors', // MISSING + panelTitle : 'Színek', auto : 'Automatikus', more : 'További színek...' }, @@ -685,7 +685,7 @@ CKEDITOR.lang['hu'] = scayt : { title : 'Helyesírás ellenőrzés gépelés közben', - opera_title : 'Not supported by Opera', // MISSING + opera_title : 'Az Opera nem támogatja', enable : 'SCAYT engedélyezése', disable : 'SCAYT letiltása', about : 'SCAYT névjegy', @@ -699,20 +699,20 @@ CKEDITOR.lang['hu'] = emptyDic : 'A szótár nevét meg kell adni.', optionsTab : 'Beállítások', - allCaps : 'Ignore All-Caps Words', // MISSING - ignoreDomainNames : 'Ignore Domain Names', // MISSING - mixedCase : 'Ignore Words with Mixed Case', // MISSING - mixedWithDigits : 'Ignore Words with Numbers', // MISSING + allCaps : 'Nagybetűs szavak kihagyása', + ignoreDomainNames : 'Domain nevek kihagyása', + mixedCase : 'Kis és nagybetűt is tartalmazó szavak kihagyása', + mixedWithDigits : 'Számokat tartalmazó szavak kihagyása', languagesTab : 'Nyelvek', dictionariesTab : 'Szótár', - dic_field_name : 'Dictionary name', // MISSING - dic_create : 'Create', // MISSING - dic_restore : 'Restore', // MISSING - dic_delete : 'Delete', // MISSING - dic_rename : 'Rename', // MISSING - dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING + dic_field_name : 'Szótár neve', + dic_create : 'Létrehozás', + dic_restore : 'Visszaállítás', + dic_delete : 'Törlés', + dic_rename : 'Átnevezés', + dic_info : 'Kezdetben a felhasználói szótár böngésző sütiben tárolódik. Azonban a sütik maximális mérete korlátozott. Amikora a szótár akkora lesz, hogy már sütiben nem lehet tárolni, akkor a szótárat tárolhatja a szerveren is. Ehhez egy nevet kell megadni a szótárhoz. Amennyiben már van szerveren tárolt szótára, adja meg a nevét és kattintson a visszaállítás gombra.', aboutTab : 'Névjegy' }, @@ -741,18 +741,18 @@ CKEDITOR.lang['hu'] = colordialog : { title : 'Válasszon színt', - options : 'Color Options', // MISSING + options : 'Szín opciók', highlight : 'Nagyítás', selected : 'Kiválasztott', clear : 'Ürítés' }, - toolbarCollapse : 'Collapse Toolbar', // MISSING - toolbarExpand : 'Expand Toolbar', // MISSING + toolbarCollapse : 'Eszköztár összecsukása', + toolbarExpand : 'Eszköztár szétnyitása', bidi : { - ltr : 'Text direction from left to right', // MISSING - rtl : 'Text direction from right to left' // MISSING + ltr : 'Szöveg iránya balról jobbra', + rtl : 'Szöveg iránya jobbról balra' } }; diff --git a/_source/lang/ja.js b/_source/lang/ja.js index a006c8b..cd435fc 100644 --- a/_source/lang/ja.js +++ b/_source/lang/ja.js @@ -31,11 +31,11 @@ CKEDITOR.lang['ja'] = * Screenreader titles. Please note that screenreaders are not always capable * of reading non-English words. So be careful while translating it. */ - editorTitle : 'Rich text editor, %1, press ALT 0 for help.', // MISSING + editorTitle : 'リッチテキストエディタ, %1, ヘルプは ALT 0 を押してください', // ARIA descriptions. - toolbar : 'Toolbar', // MISSING - editor : 'Rich Text Editor', // MISSING + toolbar : 'ツールバー', + editor : 'リッチテキストエディタ', // Toolbar buttons without dialogs. source : 'ソース', @@ -92,23 +92,23 @@ CKEDITOR.lang['ja'] = cssStyle : 'スタイルシート', ok : 'OK', cancel : 'キャンセル', - close : 'Close', // MISSING - preview : 'Preview', // MISSING + close : '閉じる', + preview : 'プレビュー', generalTab : '全般', advancedTab : '高度な設定', validateNumberFailed : '値が数ではありません', confirmNewPage : '変更内容を保存せず、 新しいページを開いてもよろしいでしょうか?', confirmCancel : 'オプション設定を変更しました。ダイアログを閉じてもよろしいでしょうか?', - options : 'Options', // MISSING - target : 'Target', // MISSING - targetNew : 'New Window (_blank)', // MISSING - targetTop : 'Topmost Window (_top)', // MISSING - targetSelf : 'Same Window (_self)', // MISSING - targetParent : 'Parent Window (_parent)', // MISSING - langDirLTR : 'Left to Right (LTR)', // MISSING - langDirRTL : 'Right to Left (RTL)', // MISSING - styles : 'Style', // MISSING - cssClasses : 'Stylesheet Classes', // MISSING + options : 'オプション', + target : 'ターゲット', + targetNew : '新しいウィンドウ (_空白)', + targetTop : '最上部ウィンドウ (_トップ)', + targetSelf : '同じウィンドウ (_同一)', + targetParent : '親ウィンドウ (_親)', + langDirLTR : '左から右 (LTR)', + langDirRTL : '右から左 (RTL)', + styles : 'スタイル', + cssClasses : 'スタイルシートクラス', // Put the voice-only part of the label in the span. unavailable : '%1, 利用不可能' @@ -116,7 +116,7 @@ CKEDITOR.lang['ja'] = contextmenu : { - options : 'Context Menu Options' // MISSING + options : 'コンテキストメニューオプション' }, // Special char dialog. @@ -124,7 +124,7 @@ CKEDITOR.lang['ja'] = { toolbar : '特殊文字挿入', title : '特殊文字選択', - options : 'Special Character Options' // MISSING + options : '特殊文字オプション' }, // Link dialog. @@ -165,7 +165,7 @@ CKEDITOR.lang['ja'] = langDirRTL : '右から左 (RTL)', acccessKey : 'アクセスキー', name : 'Name属性', - langCode : '文字表記の方向', + langCode : '言語コード', tabIndex : 'タブインデックス', advisoryTitle : 'Title属性', advisoryContentType : 'Content Type属性', @@ -196,25 +196,25 @@ CKEDITOR.lang['ja'] = // List style dialog list: { - numberedTitle : 'Numbered List Properties', // MISSING - bulletedTitle : 'Bulleted List Properties', // MISSING - type : 'Type', // MISSING - start : 'Start', // MISSING - validateStartNumber :'List start number must be a whole number.', // MISSING - circle : 'Circle', // MISSING - disc : 'Disc', // MISSING - square : 'Square', // MISSING - none : 'None', // MISSING - notset : '', // MISSING - armenian : 'Armenian numbering', // MISSING - georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING - lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING - upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING - lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING - upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING - lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING - decimal : 'Decimal (1, 2, 3, etc.)', // MISSING - decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING + numberedTitle : '段落番号 プロパティ', + bulletedTitle : '箇条書き プロパティ', + type : 'タイプ', + start : '開始', + validateStartNumber :'リスト開始番号は数値で入力してください。', + circle : '白丸', + disc : '黒丸', + square : '四角', + none : 'なし', + notset : '<なし>', + armenian : 'アルメニア数字', + georgian : 'グルジア数字 (an, ban, gan, etc.)', + lowerRoman : '小文字ローマ数字 (i, ii, iii, iv, v, etc.)', + upperRoman : '大文字ローマ数字 (I, II, III, IV, V, etc.)', + lowerAlpha : '小文字アルファベット (a, b, c, d, e, etc.)', + upperAlpha : '大文字アルファベット (A, B, C, D, E, etc.)', + lowerGreek : '小文字ギリシャ文字 (alpha, beta, gamma, etc.)', + decimal : '数字 (1, 2, 3, etc.)', + decimalLeadingZero : '上位桁に0をつけた数字 (01, 02, 03, etc.)' }, // Find And Replace Dialog @@ -250,7 +250,7 @@ CKEDITOR.lang['ja'] = width : '幅', widthPx : 'ピクセル', widthPc : 'パーセント', - widthUnit : 'width unit', // MISSING + widthUnit : 'ユニット', height : '高さ', cellSpace : 'セル内余白', cellPad : 'セル内間隔', @@ -413,7 +413,7 @@ CKEDITOR.lang['ja'] = width : '幅', height : '高さ', lockRatio : 'ロック比率', - unlockRatio : 'Unlock Ratio', // MISSING + unlockRatio : 'アンロック比率', resetSize : 'サイズリセット', border : 'ボーダー', hSpace : '横間隔', @@ -426,11 +426,11 @@ CKEDITOR.lang['ja'] = button2Img : '選択したボタンを画像に置き換えますか?', img2Button : '選択した画像をボタンに置き換えますか?', urlMissing : 'イメージのURLを入力してください。', - validateWidth : 'Width must be a whole number.', // MISSING - validateHeight : 'Height must be a whole number.', // MISSING - validateBorder : 'Border must be a whole number.', // MISSING - validateHSpace : 'HSpace must be a whole number.', // MISSING - validateVSpace : 'VSpace must be a whole number.' // MISSING + validateWidth : '幅は数値で入力してください。', + validateHeight : '高さは数値で入力してください。', + validateBorder : 'ボーダーは数値で入力してください。', + validateHSpace : '横間隔は数値で入力してください。', + validateVSpace : '縦間隔は数値で入力してください。' }, // Flash Dialog @@ -512,12 +512,12 @@ CKEDITOR.lang['ja'] = { toolbar : '絵文字', title : '顔文字挿入', - options : 'Smiley Options' // MISSING + options : '絵文字オプション' }, elementsPath : { - eleLabel : 'Elements path', // MISSING + eleLabel : 'エレメントパス', eleTitle : '%1 エレメント' }, @@ -543,7 +543,7 @@ CKEDITOR.lang['ja'] = copyError : 'ブラウザーのセキュリティ設定によりエディタのコピー操作が自動で実行することができません。実行するには手動でキーボードの(Ctrl/Cmd+C)を使用してください。', pasteMsg : 'キーボード(Ctrl/Cmd+V)を使用して、次の入力エリア内で貼って、OKを押してください。', securityMsg : 'ブラウザのセキュリティ設定により、エディタはクリップボード・データに直接アクセスすることができません。このウィンドウは貼り付け操作を行う度に表示されます。', - pasteArea : 'Paste Area' // MISSING + pasteArea : '貼り付け場所' }, pastefromword : @@ -551,7 +551,7 @@ CKEDITOR.lang['ja'] = confirmCleanup : '貼り付けを行うテキストは、ワード文章からコピーされようとしています。貼り付ける前にクリーニングを行いますか?', toolbar : 'ワード文章から貼り付け', title : 'ワード文章から貼り付け', - error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING + error : '内部エラーにより貼り付けたデータがクリアできませんでした' }, pasteText : @@ -564,7 +564,7 @@ CKEDITOR.lang['ja'] = { button : 'テンプレート(雛形)', title : 'テンプレート内容', - options : 'Template Options', // MISSING + options : 'テンプレートオプション', insertOption : '現在のエディタの内容と置換えをします', selectPromptMsg : 'エディターで使用するテンプレートを選択してください。
(現在のエディタの内容は失われます):', emptyListMsg : '(テンプレートが定義されていません)' @@ -575,7 +575,7 @@ CKEDITOR.lang['ja'] = stylesCombo : { label : 'スタイル', - panelTitle : 'Formatting Styles', // MISSING + panelTitle : 'スタイル', panelTitle1 : 'ブロックスタイル', panelTitle2 : 'インラインスタイル', panelTitle3 : 'オブジェクトスタイル' @@ -600,19 +600,19 @@ CKEDITOR.lang['ja'] = div : { - title : 'Create Div Container', // MISSING - toolbar : 'Create Div Container', // MISSING - cssClassInputLabel : 'Stylesheet Classes', // MISSING - styleSelectLabel : 'Style', // MISSING + title : 'Divコンテナ', + toolbar : 'Divコンテナ', + cssClassInputLabel : 'スタイルシートクラス', + styleSelectLabel : 'スタイル', IdInputLabel : 'Id', // MISSING - languageCodeInputLabel : ' Language Code', // MISSING - inlineStyleInputLabel : 'Inline Style', // MISSING - advisoryTitleInputLabel : 'Advisory Title', // MISSING - langDirLabel : 'Language Direction', // MISSING - langDirLTRLabel : 'Left to Right (LTR)', // MISSING - langDirRTLLabel : 'Right to Left (RTL)', // MISSING - edit : 'Edit Div', // MISSING - remove : 'Remove Div' // MISSING + languageCodeInputLabel : ' 言語コード', + inlineStyleInputLabel : 'インラインスタイル', + advisoryTitleInputLabel : 'Title属性', + langDirLabel : '文字表記の方向', + langDirLTRLabel : '左から右 (LTR)', + langDirRTLLabel : '右から左 (RTL)', + edit : 'Divコンテナ 編集', + remove : 'Divコンテナ 削除' }, font : @@ -633,7 +633,7 @@ CKEDITOR.lang['ja'] = { textColorTitle : 'テキスト色', bgColorTitle : '背景色', - panelTitle : 'Colors', // MISSING + panelTitle : '色', auto : '自動', more : 'その他の色...' }, @@ -685,7 +685,7 @@ CKEDITOR.lang['ja'] = scayt : { title : 'スペルチェック設定(SCAYT)', - opera_title : 'Not supported by Opera', // MISSING + opera_title : 'Operaではサポートされません', enable : 'SCAYT有効', disable : 'SCAYT無効', about : 'SCAYTバージョン', @@ -699,20 +699,20 @@ CKEDITOR.lang['ja'] = emptyDic : '辞書名は必ず入力してください', optionsTab : 'オプション', - allCaps : 'Ignore All-Caps Words', // MISSING - ignoreDomainNames : 'Ignore Domain Names', // MISSING - mixedCase : 'Ignore Words with Mixed Case', // MISSING - mixedWithDigits : 'Ignore Words with Numbers', // MISSING + allCaps : '全て大文字の単語を無視', + ignoreDomainNames : 'ドメイン名を無視', + mixedCase : '大文字小文字混在の単語を無視', + mixedWithDigits : '数字付き単語を無視', languagesTab : '言語', dictionariesTab : '辞書', - dic_field_name : 'Dictionary name', // MISSING - dic_create : 'Create', // MISSING - dic_restore : 'Restore', // MISSING - dic_delete : 'Delete', // MISSING - dic_rename : 'Rename', // MISSING - dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING + dic_field_name : '辞書名', + dic_create : '登録', + dic_restore : '元に戻す', + dic_delete : '削除', + dic_rename : '名前変更', + dic_info : '始めユーザーディレクトリは、Cookieに保存されます。但し Cookie はサイズに制限があります。ユーザーディレクトリがCookieに保存できないサイズに到達するとディレクトリはサーバー上に保存されます。個人のディレクトリをサーバー上に保存するには、ディレクトリ名を明示する必要があります。もし既に保存されたディレクトリがある場合、その名前を入力し、元に戻すボタンを押してください。', aboutTab : 'バージョン情報' }, @@ -741,7 +741,7 @@ CKEDITOR.lang['ja'] = colordialog : { title : '色選択', - options : 'Color Options', // MISSING + options : 'カラーオプション', highlight : 'ハイライト', selected : '選択された色', clear : 'クリア' @@ -752,7 +752,7 @@ CKEDITOR.lang['ja'] = bidi : { - ltr : 'Text direction from left to right', // MISSING - rtl : 'Text direction from right to left' // MISSING + ltr : 'テキストの向き : 左から右へ', + rtl : 'テキストの向き : 右から左へ' } }; diff --git a/_source/plugins/bidi/plugin.js b/_source/plugins/bidi/plugin.js index 761e16b..d3ef351 100644 --- a/_source/plugins/bidi/plugin.js +++ b/_source/plugins/bidi/plugin.js @@ -48,7 +48,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { var editor = evt.editor, chromeRoot = editor.container.getChild( 1 ), - directionNode = getElementForDirection( evt.data.path.lastElement ); + directionNode = evt.data.path.block || evt.data.path.blockLimit; if ( directionNode && editor.lang.dir != directionNode.getComputedStyle( 'direction' ) ) chromeRoot.addClass( 'cke_mixed_dir_content' ); @@ -123,7 +123,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // the element and all its children, so it will get really reflected // like a mirror. (#5910) if ( dir != dirBefore ) - editor.fire( 'dirChanged', element ); + { + editor.fire( 'dirChanged', + { + node : element, + dir : dir + } ); + } editor.forceNextSelectionCheck(); diff --git a/_source/plugins/button/plugin.js b/_source/plugins/button/plugin.js index 305a6f9..c0c8208 100644 --- a/_source/plugins/button/plugin.js +++ b/_source/plugins/button/plugin.js @@ -98,11 +98,22 @@ CKEDITOR.ui.button.prototype = instance.index = index = CKEDITOR.ui.button._.instances.push( instance ) - 1; + // Indicate a mode sensitive button. if ( this.modes ) { + var modeStates = {}; + editor.on( 'beforeModeUnload', function() + { + modeStates[ editor.mode ] = this._.state; + }, this ); + editor.on( 'mode', function() { - this.setState( this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); + var mode = editor.mode; + // Restore saved button state. + this.setState( this.modes[ mode ] ? + modeStates[ mode ] != undefined ? modeStates[ mode ] : + CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); }, this); } else if ( command ) diff --git a/_source/plugins/colordialog/dialogs/colordialog.js b/_source/plugins/colordialog/dialogs/colordialog.js index 4f1db21..71a23a6 100644 --- a/_source/plugins/colordialog/dialogs/colordialog.js +++ b/_source/plugins/colordialog/dialogs/colordialog.js @@ -236,6 +236,7 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) var table = new $el( 'table' ); createColorTable(); + var html = table.getHtml(); var numbering = function( id ) { @@ -270,12 +271,15 @@ CKEDITOR.dialog.add( 'colordialog', function( editor ) [ { type : 'html', - html : '' + table.getHtml() + '
' + - '' + lang.options +'', + html : '' + + ( !CKEDITOR.env.webkit ? html : '' ) + + '
' + lang.options +'', onLoad : function() { var table = CKEDITOR.document.getById( this.domId ); table.on( 'mouseover', updateHighlight ); + // In WebKit, the table content must be inserted after this event call (#6150) + CKEDITOR.env.webkit && table.setHtml( html ); }, focus: function() { diff --git a/_source/plugins/dialog/plugin.js b/_source/plugins/dialog/plugin.js index 13f6327..26d8a8d 100644 --- a/_source/plugins/dialog/plugin.js +++ b/_source/plugins/dialog/plugin.js @@ -1029,7 +1029,7 @@ CKEDITOR.DIALOG_RESIZE_BOTH = 3; hidePage : function( id ) { var tab = this._.tabs[id] && this._.tabs[id][0]; - if ( !tab || this._.pageCount == 1 ) + if ( !tab || this._.pageCount == 1 || !tab.isVisible() ) return; // Switch to other tab first when we're hiding the active tab. else if ( id == this._.currentTabId ) diff --git a/_source/plugins/dialogadvtab/plugin.js b/_source/plugins/dialogadvtab/plugin.js index 3642e5c..2dfcf56 100644 --- a/_source/plugins/dialogadvtab/plugin.js +++ b/_source/plugins/dialogadvtab/plugin.js @@ -39,9 +39,9 @@ function commitAdvParams() // Broadcast Lang Dir change if ( attrName == 'dir' ) { - var dir = element.getAttribute( attrName, value ); + var dir = element.getAttribute( attrName ); if ( dir != value && element.getParent() ) - this._.dialog._.editor.fire( 'dirChanged', element ); + this._.dialog._.editor.fire( 'dirChanged', { node : element, dir : value || element.getDirection( 1 ) } ); } if ( value ) diff --git a/_source/plugins/elementspath/plugin.js b/_source/plugins/elementspath/plugin.js index 47e7c47..58cacc3 100644 --- a/_source/plugins/elementspath/plugin.js +++ b/_source/plugins/elementspath/plugin.js @@ -155,7 +155,15 @@ CKEDITOR._.elementsPath = editor.focus(); var element = editor._.elementsPath.list[ elementIndex ]; - editor.getSelection().selectElement( element ); + + if ( element.is( 'body' ) ) + { + var range = new CKEDITOR.dom.range( editor.document ); + range.selectNodeContents( element ); + range.select(); + } + else + editor.getSelection().selectElement( element ); return false; }, diff --git a/_source/plugins/enterkey/plugin.js b/_source/plugins/enterkey/plugin.js index 5046b1d..4114516 100644 --- a/_source/plugins/enterkey/plugin.js +++ b/_source/plugins/enterkey/plugin.js @@ -98,7 +98,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } else { - var newBlock; + var newBlock, + newBlockDir; if ( previousBlock ) { @@ -115,7 +116,11 @@ For licensing, see LICENSE.html or http://ckeditor.com/license newBlock = nextBlock.clone(); if ( !newBlock ) + { newBlock = doc.createElement( blockTag ); + if ( previousBlock && ( newBlockDir = previousBlock.getDirection() ) ) + newBlock.setAttribute( 'dir', newBlockDir ); + } // Force the enter block unless we're talking of a list item. else if ( forceMode && !newBlock.is( 'li' ) ) newBlock.renameNode( blockTag ); @@ -222,15 +227,28 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // If we are at the end of a header block. if ( !forceMode && isEndOfBlock && headerTagRegex.test( startBlockTag ) ) { - // Insert a
after the current paragraph. - doc.createElement( 'br' ).insertAfter( startBlock ); + var newBlock, + newBlockDir; - // A text node is required by Gecko only to make the cursor blink. - if ( CKEDITOR.env.gecko ) - doc.createText( '' ).insertAfter( startBlock ); + if ( newBlockDir = startBlock.getDirection() ) + { + newBlock = doc.createElement( 'div' ); + newBlock.setAttribute( 'dir', newBlockDir ); + newBlock.insertAfter( startBlock ); + range.setStart( newBlock, 0 ); + } + else + { + // Insert a
after the current paragraph. + doc.createElement( 'br' ).insertAfter( startBlock ); - // IE has different behaviors regarding position. - range.setStartAt( startBlock.getNext(), CKEDITOR.env.ie ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_START ); + // A text node is required by Gecko only to make the cursor blink. + if ( CKEDITOR.env.gecko ) + doc.createText( '' ).insertAfter( startBlock ); + + // IE has different behaviors regarding position. + range.setStartAt( startBlock.getNext(), CKEDITOR.env.ie ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_START ); + } } else { diff --git a/_source/plugins/floatpanel/plugin.js b/_source/plugins/floatpanel/plugin.js index 8940192..8dc7ae2 100644 --- a/_source/plugins/floatpanel/plugin.js +++ b/_source/plugins/floatpanel/plugin.js @@ -60,6 +60,8 @@ CKEDITOR.plugins.add( 'floatpanel', children : [], dir : editor.lang.dir }; + + editor.on( 'mode', function(){ this.hide(); }, this ); }, proto : @@ -123,10 +125,11 @@ CKEDITOR.plugins.add( 'floatpanel', element.setStyles( { - top : 0, + top : top + 'px', left: 0, display : '' }); + // Don't use display or visibility style because we need to // calculate the rendering layout later and focus the element. element.setOpacity( 0 ); diff --git a/_source/plugins/htmldataprocessor/plugin.js b/_source/plugins/htmldataprocessor/plugin.js index f8cf91d..7750cfc 100644 --- a/_source/plugins/htmldataprocessor/plugin.js +++ b/_source/plugins/htmldataprocessor/plugin.js @@ -38,8 +38,17 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } } - function blockNeedsExtension( block ) + function blockNeedsExtension( block, fromSource ) { + // 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg; + // 2. For the rest, at least table cell and list item need no filler space. + // (#6248) + if ( fromSource && CKEDITOR.env.ie && + ( document.documentMode > 7 + || block.name in CKEDITOR.dtd.tr + || block.name in CKEDITOR.dtd.$listItem ) ) + return false; + var lastChild = lastNoneSpaceChild( block ); return !lastChild @@ -53,7 +62,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license { trimFillers( block, true ); - if ( blockNeedsExtension( block ) ) + if ( blockNeedsExtension( block, true ) ) { if ( CKEDITOR.env.ie ) block.add( new CKEDITOR.htmlParser.text( '\xa0' ) ); @@ -263,7 +272,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license defaultHtmlFilterRules.elements[ i ] = unprotectReadyOnly; } - var protectAttributeRegex = /<((?:a|area|img|input)[\s\S]*?\s)((href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))([^>]*)>/gi, + var protectAttributeRegex = /<((?:a|area|img|input)\b[\s\S]*?\s)((href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))([^>]*)>/gi, findSavedSrcRegex = /\s_cke_saved_src\s*=/; var protectElementsRegex = /(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, @@ -492,9 +501,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * Whether to force using "&" instead of "&amp;" in elements attributes - * values. It's not recommended to change this setting for compliance with the - * W3C XHTML 1.0 standards - * (C.12, XHTML 1.0). + * values, it's not recommended to change this setting for compliance with the + * W3C XHTML 1.0 standards (C.12, XHTML 1.0). + * @name CKEDITOR.config.forceSimpleAmpersand * @type Boolean * @default false * @example diff --git a/_source/plugins/image/dialogs/image.js b/_source/plugins/image/dialogs/image.js index b28e4e1..268185f 100644 --- a/_source/plugins/image/dialogs/image.js +++ b/_source/plugins/image/dialogs/image.js @@ -1149,7 +1149,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license setup : function( type, element ) { if ( type == LINK ) - this.setValue( element.getAttribute( 'target' ) ); + this.setValue( element.getAttribute( 'target' ) || '' ); }, commit : function( type, element ) { diff --git a/_source/plugins/indent/plugin.js b/_source/plugins/indent/plugin.js index 50b1356..c49ce88 100644 --- a/_source/plugins/indent/plugin.js +++ b/_source/plugins/indent/plugin.js @@ -78,9 +78,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } // Returns the CSS property to be used for identing a given element. - function getIndentCssProperty( element ) + function getIndentCssProperty( element, dir ) { - return element.getComputedStyle( 'direction' ) == 'ltr' ? 'margin-left' : 'margin-right'; + return ( dir || element.getComputedStyle( 'direction' ) ) == 'ltr' ? 'margin-left' : 'margin-right'; } function isListItem( node ) @@ -157,8 +157,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Convert the array back to a DOM forest (yes we might have a few subtrees now). // And replace the old list with the new forest. - var newListDir = listNode.getAttribute( 'dir' ) || listNode.getStyle( 'direction' ); - var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, newListDir ); + var newList = CKEDITOR.plugins.list.arrayToList( listArray, database, null, editor.config.enterMode, listNode.getDirection() ); // Avoid nested
  • after outdent even they're visually same, // recording them for later refactoring.(#3982) @@ -220,7 +219,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license indentElement( block ); } - function indentElement( element ) + function indentElement( element, dir ) { if ( element.getCustomData( 'indent_processed' ) ) return false; @@ -248,15 +247,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license indentStep = Math.min( indentStep, editor.config.indentClasses.length ); indentStep = Math.max( indentStep, 0 ); - var className = CKEDITOR.tools.ltrim( element.$.className.replace( self.classNameRegex, '' ) ); - if ( indentStep < 1 ) - element.$.className = className; - else + element.$.className = CKEDITOR.tools.ltrim( element.$.className.replace( self.classNameRegex, '' ) ); + if ( indentStep > 0 ) element.addClass( editor.config.indentClasses[ indentStep - 1 ] ); } else { - var indentCssProperty = getIndentCssProperty( element ), + var indentCssProperty = getIndentCssProperty( element, dir ), currentOffset = parseInt( element.getStyle( indentCssProperty ), 10 ); if ( isNaN( currentOffset ) ) currentOffset = 0; @@ -328,10 +325,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( nearestListBlock ) { - var firstListItem = nearestListBlock.getFirst( function( node ) - { - return node.type == CKEDITOR.NODE_ELEMENT && node.is( 'li' ); - }), + var firstListItem = nearestListBlock.getFirst( isListItem ), + hasMultipleItems = !!firstListItem.getNext( isListItem ), rangeStart = range.startContainer, indentWholeList = firstListItem.equals( rangeStart ) || firstListItem.contains( rangeStart ); @@ -339,7 +334,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Only do that for indenting or when using indent classes or when there is something to outdent. (#6141) if ( !( indentWholeList && ( self.name == 'indent' || self.useIndentClasses || parseInt( nearestListBlock.getStyle( getIndentCssProperty( nearestListBlock ) ), 10 ) ) && - indentElement( nearestListBlock ) ) ) + indentElement( nearestListBlock, !hasMultipleItems && firstListItem.getDirection() ) ) ) indentList( nearestListBlock ); } else @@ -395,8 +390,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license editor.on( 'dirChanged', function( e ) { var range = new CKEDITOR.dom.range( editor.document ); - range.setStartBefore( e.data ); - range.setEndAfter( e.data ); + range.setStartBefore( e.data.node ); + range.setEndAfter( e.data.node ); var walker = new CKEDITOR.dom.walker( range ), node; @@ -406,13 +401,28 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( node.type == CKEDITOR.NODE_ELEMENT ) { // A child with the defined dir is to be ignored. - if ( !node.equals( e.data ) && node.getDirection() ) + if ( !node.equals( e.data.node ) && node.getDirection() ) { range.setStartAfter( node ); walker = new CKEDITOR.dom.walker( range ); continue; } + // Switch alignment classes. + var classes = editor.config.indentClasses; + if ( classes ) + { + var suffix = ( e.data.dir == 'ltr' ) ? [ '_rtl', '' ] : [ '', '_rtl' ]; + for ( var i = 0; i < classes.length; i++ ) + { + if ( node.hasClass( classes[ i ] + suffix[ 0 ] ) ) + { + node.removeClass( classes[ i ] + suffix[ 0 ] ); + node.addClass( classes[ i ] + suffix[ 1 ] ); + } + } + } + // Switch the margins. var marginLeft = node.getStyle( 'margin-right' ), marginRight = node.getStyle( 'margin-left' ); @@ -430,6 +440,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * Size of each indentation step + * @name CKEDITOR.config.indentOffset * @type Number * @default 40 * @example @@ -438,6 +449,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * Unit for the indentation style + * @name CKEDITOR.config.indentUnit * @type String * @default 'px' * @example @@ -447,6 +459,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license /** * List of classes to use for indenting the contents. If it's null, no classes will be used * and instead the {@link #indentUnit} and {@link #indentOffset} properties will be used. + * @name CKEDITOR.config.indentClasses * @type Array * default null * @example diff --git a/_source/plugins/justify/plugin.js b/_source/plugins/justify/plugin.js index ad134c5..2de9b0b 100644 --- a/_source/plugins/justify/plugin.js +++ b/_source/plugins/justify/plugin.js @@ -87,8 +87,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var editor = e.editor; var range = new CKEDITOR.dom.range( editor.document ); - range.setStartBefore( e.data ); - range.setEndAfter( e.data ); + range.setStartBefore( e.data.node ); + range.setEndAfter( e.data.node ); var walker = new CKEDITOR.dom.walker( range ), node; @@ -98,7 +98,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( node.type == CKEDITOR.NODE_ELEMENT ) { // A child with the defined dir is to be ignored. - if ( !node.equals( e.data ) && node.getDirection() ) + if ( !node.equals( e.data.node ) && node.getDirection() ) { range.setStartAfter( node ); walker = new CKEDITOR.dom.walker( range ); @@ -106,6 +106,24 @@ For licensing, see LICENSE.html or http://ckeditor.com/license } // Switch the alignment. + var classes = editor.config.justifyClasses; + if ( classes ) + { + // The left align class. + if ( node.hasClass( classes[ 0 ] ) ) + { + node.removeClass( classes[ 0 ] ); + node.addClass( classes[ 2 ] ); + } + // The right align class. + else if ( node.hasClass( classes[ 2 ] ) ) + { + node.removeClass( classes[ 2 ] ); + node.addClass( classes[ 0 ] ); + } + } + + // Always switch CSS margins. var style = 'text-align'; var align = node.getStyle( style ); diff --git a/_source/plugins/link/plugin.js b/_source/plugins/link/plugin.js index 3cdc6fb..f0278ec 100644 --- a/_source/plugins/link/plugin.js +++ b/_source/plugins/link/plugin.js @@ -69,10 +69,13 @@ CKEDITOR.plugins.add( 'link', { var element = CKEDITOR.plugins.link.getSelectedLink( editor ) || evt.data.element; - if ( element.is( 'a' ) ) - evt.data.dialog = ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) ) ? 'anchor' : 'link'; - else if ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' ) - evt.data.dialog = 'anchor'; + if ( !element.isReadOnly() ) + { + if ( element.is( 'a' ) ) + evt.data.dialog = ( element.getAttribute( 'name' ) && !element.getAttribute( 'href' ) ) ? 'anchor' : 'link'; + else if ( element.is( 'img' ) && element.getAttribute( '_cke_real_element_type' ) == 'anchor' ) + evt.data.dialog = 'anchor'; + } }); // If the "menu" plugin is loaded, register the menu items. diff --git a/_source/plugins/list/plugin.js b/_source/plugins/list/plugin.js index 0b61c2d..3a47c55 100644 --- a/_source/plugins/list/plugin.js +++ b/_source/plugins/list/plugin.js @@ -12,6 +12,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license var listNodeNames = { ol : 1, ul : 1 }, emptyTextRegex = /^[\n\r\t ]*$/; + var whitespaces = CKEDITOR.dom.walker.whitespaces(), + bookmarks = CKEDITOR.dom.walker.bookmark(), + nonEmpty = function( node ){ return !( whitespaces( node ) || bookmarks( node ) ); }; + CKEDITOR.plugins.list = { /* * Convert a DOM list tree into a data structure that is easier to @@ -88,6 +92,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( !rootNode || listArray[ currentIndex ].parent.getName() != rootNode.getName() ) { rootNode = listArray[ currentIndex ].parent.clone( false, 1 ); + dir && rootNode.setAttribute( 'dir', dir ); retval.append( rootNode ); } currentListItem = rootNode.append( item.element.clone( 0, 1 ) ); @@ -132,11 +137,19 @@ For licensing, see LICENSE.html or http://ckeditor.com/license if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT && currentIndex != listArray.length - 1 ) { - if ( currentListItem.getLast() - && currentListItem.getLast().type == CKEDITOR.NODE_ELEMENT - && currentListItem.getLast().getAttribute( 'type' ) == '_moz' ) - currentListItem.getLast().remove(); - currentListItem.appendBogus(); + var last = currentListItem.getLast(); + if ( last && last.type == CKEDITOR.NODE_ELEMENT + && last.getAttribute( 'type' ) == '_moz' ) + { + last.remove(); + } + + if ( !( last = currentListItem.getLast( nonEmpty ) + && last.type == CKEDITOR.NODE_ELEMENT + && last.getName() in CKEDITOR.dtd.$block ) ) + { + currentListItem.append( doc.createElement( 'br' ) ); + } } if ( currentListItem.type == CKEDITOR.NODE_ELEMENT && diff --git a/_source/plugins/listblock/plugin.js b/_source/plugins/listblock/plugin.js index 5207b42..fc11e57 100644 --- a/_source/plugins/listblock/plugin.js +++ b/_source/plugins/listblock/plugin.js @@ -93,7 +93,7 @@ CKEDITOR.plugins.add( 'listblock', this._.items[ value ] = id; pendingHtml.push( - '
  • ' + + '
  • ');return B.join('');};k.dialog.labeledElement.call(this,u,v,w,A);},checkbox:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v,{'default':!!v['default']});if(v.validate)this.validate=v.validate;var y=function(){var z=e.extend({},v,{id:v.id?v.id+'_checkbox':e.getNextId()+'_checkbox'},true),A=[],B=e.getNextId()+'_label',C={'class':'cke_dialog_ui_checkbox_input',type:'checkbox','aria-labelledby':B};t(z);if(v['default'])C.checked='checked';if(typeof z.controlStyle!='undefined')z.style=z.controlStyle;x.checkbox=new k.dialog.uiElement(u,z,A,'input',null,C);A.push(' ');return A.join('');};k.dialog.uiElement.call(this,u,v,w,'span',null,null,y);},radio:function(u,v,w){if(arguments.length<3)return;m.call(this,v);if(!this._['default'])this._['default']=this._.initValue=v.items[0][1];if(v.validate)this.validate=v.valdiate;var x=[],y=this,z=function(){var A=[],B=[],C={'class':'cke_dialog_ui_radio_item','aria-labelledby':this._.labelId},D=v.id?v.id+'_radio':e.getNextId()+'_radio';for(var E=0;E'+e.htmlEncode(v.label)+'');},select:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v);if(v.validate)this.validate=v.validate;x.inputId=e.getNextId()+'_select';var y=function(){var z=e.extend({},v,{id:v.id?v.id+'_select':e.getNextId()+'_select'},true),A=[],B=[],C={id:x.inputId,'class':'cke_dialog_ui_input_select','aria-labelledby':this._.labelId};if(v.size!=undefined)C.size=v.size;if(v.multiple!=undefined)C.multiple=v.multiple;t(z);for(var D=0,E;D ',e.htmlEncode(E[0]));if(typeof z.controlStyle!='undefined')z.style=z.controlStyle;x.select=new k.dialog.uiElement(u,z,A,'select',null,C,B.join(''));return A.join('');};k.dialog.labeledElement.call(this,u,v,w,y);},file:function(u,v,w){if(arguments.length<3)return;if(v['default']===undefined)v['default']='';var x=e.extend(m.call(this,v),{definition:v,buttons:[]});if(v.validate)this.validate=v.validate;var y=function(){x.frameId=e.getNextId()+'_fileInput';var z=b.isCustomDomain(),A=['');return A.join('');};u.on('load',function(){var z=a.document.getById(x.frameId),A=z.getParent(); -A.addClass('cke_dialog_ui_input_file');});k.dialog.labeledElement.call(this,u,v,w,y);},fileButton:function(u,v,w){if(arguments.length<3)return;var x=m.call(this,v),y=this;if(v.validate)this.validate=v.validate;var z=e.extend({},v),A=z.onClick;z.className=(z.className?z.className+' ':'')+'cke_dialog_ui_button';z.onClick=function(B){var C=v['for'];if(!A||A.call(this,B)!==false){u.getContentElement(C[0],C[1]).submit();this.disable();}};u.on('load',function(){u.getContentElement(v['for'][0],v['for'][1])._.buttons.push(y);});k.dialog.button.call(this,u,z,w);},html:(function(){var u=/^\s*<[\w:]+\s+([^>]*)?>/,v=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,w=/\/$/;return function(x,y,z){if(arguments.length<3)return;var A=[],B,C=y.html,D,E;if(C.charAt(0)!='<')C=''+C+'';var F=y.focus;if(F){var G=this.focus;this.focus=function(){G.call(this);typeof F=='function'&&F.call(this);this.fire('focus');};if(y.isFocusable){var H=this.isFocusable;this.isFocusable=H;}this.keyboardFocusable=true;}k.dialog.uiElement.call(this,x,y,A,'span',null,null,'');B=A.join('');D=B.match(u);E=C.match(v)||['','',''];if(w.test(E[1])){E[1]=E[1].slice(0,-1);E[2]='/'+E[2];}z.push([E[1],' ',D[1]||'',E[2]].join(''));};})(),fieldset:function(u,v,w,x,y){var z=y.label,A=function(){var B=[];z&&B.push(''+z+'');for(var C=0;C0)u.remove(0);return this;},keyboardFocusable:true},q,true);k.dialog.checkbox.prototype=e.extend(new k.dialog.uiElement(),{getInputElement:function(){return this._.checkbox.getElement();},setValue:function(u,v){this.getInputElement().$.checked=u;!v&&this.fire('change',{value:u});},getValue:function(){return this.getInputElement().$.checked;},accessKeyUp:function(){this.setValue(!this.getValue());},eventProcessors:{onChange:function(u,v){if(!c)return r.onChange.apply(this,arguments);else{u.on('load',function(){var w=this._.checkbox.getElement();w.on('propertychange',function(x){x=x.data.$;if(x.propertyName=='checked')this.fire('change',{value:w.$.checked});},this);},this);this.on('change',v);}return null;}},keyboardFocusable:true},q,true);k.dialog.radio.prototype=e.extend(new k.dialog.uiElement(),{setValue:function(u,v){var w=this._.children,x;for(var y=0;y0?new h(u.$.forms[0].elements[0]):this.getElement();},submit:function(){this.getInputElement().getParent().$.submit();return this;},getAction:function(){return this.getInputElement().getParent().$.action;},registerEvents:function(u){var v=/^on([A-Z]\w+)/,w,x=function(z,A,B,C){z.on('formLoaded',function(){z.getInputElement().on(B,C,z);});};for(var y in u){if(!(w=y.match(v)))continue;if(this.eventProcessors[y])this.eventProcessors[y].call(this,this._.dialog,u[y]);else x(this,this._.dialog,w[1].toLowerCase(),u[y]);}return this;},reset:function(){var u=this._,v=a.document.getById(u.frameId),w=v.getFrameDocument(),x=u.definition,y=u.buttons,z=this.formLoadedNumber,A=this.formUnloadNumber,B=u.dialog._.editor.lang.dir,C=u.dialog._.editor.langCode;if(!z){z=this.formLoadedNumber=e.addFunction(function(){this.fire('formLoaded');},this);A=this.formUnloadNumber=e.addFunction(function(){this.getInputElement().clearCustomData();},this);this.getDialog()._.editor.on('destroy',function(){e.removeFunction(z);e.removeFunction(A);});}function D(){w.$.open();if(b.isCustomDomain())w.$.domain=document.domain;var E='';if(x.size)E=x.size-(c?7:0);w.$.write(['','
    ','','
    ','',''].join(''));w.$.close();for(var F=0;F
    ');return o;},getHolderElement:function(){var m=this._.holder;if(!m){if(this.forceIFrame||this.css.length){var n=this.document.getById(this.id+'_frame'),o=n.getParent(),p=o.getAttribute('dir'),q=o.getParent().getAttribute('class'),r=o.getParent().getAttribute('lang'),s=n.getFrameDocument();s.$.open();if(b.isCustomDomain())s.$.domain=document.domain;var t=e.addFunction(e.bind(function(v){this.isLoaded=true;if(this.onLoad)this.onLoad();},this));s.$.write(''+''+''+''+''+e.buildStyleHtml(this.css)+''); -s.$.close();var u=s.getWindow();u.$.CKEDITOR=a;s.on('key'+(b.opera?'press':'down'),function(v){var y=this;var w=v.data.getKeystroke(),x=y.document.getById(y.id).getAttribute('dir');if(y._.onKeyDown&&y._.onKeyDown(w)===false){v.data.preventDefault();return;}if(w==27||w==(x=='rtl'?39:37))if(y.onEscape&&y.onEscape(w)===false)v.data.preventDefault();},this);m=s.getBody();m.unselectable();}else m=this.document.getById(this.id);this._.holder=m;}return m;},addBlock:function(m,n){var o=this;n=o._.blocks[m]=n instanceof k.panel.block?n:new k.panel.block(o.getHolderElement(),n);if(!o._.currentBlock)o.showBlock(m);return n;},getBlock:function(m){return this._.blocks[m];},showBlock:function(m){var n=this._.blocks,o=n[m],p=this._.currentBlock,q=this.forceIFrame?this.document.getById(this.id+'_frame'):this._.holder;q.getParent().getParent().disableContextMenu();if(p){q.removeAttributes(p.attributes);p.hide();}this._.currentBlock=o;q.setAttributes(o.attributes);a.fire('ariaWidget',q);o._.focusIndex=-1;this._.onKeyDown=o.onKeyDown&&e.bind(o.onKeyDown,o);o.onMark=function(r){q.setAttribute('aria-activedescendant',r.getId()+'_option');};o.onUnmark=function(){q.removeAttribute('aria-activedescendant');};o.show();return o;},destroy:function(){this.element&&this.element.remove();}};k.panel.block=e.createClass({$:function(m,n){var o=this;o.element=m.append(m.getDocument().createElement('div',{attributes:{tabIndex:-1,'class':'cke_panel_block',role:'presentation'},styles:{display:'none'}}));if(n)e.extend(o,n);if(!o.attributes.title)o.attributes.title=o.attributes['aria-label'];o.keys={};o._.focusIndex=-1;o.element.disableContextMenu();},_:{markItem:function(m){var p=this;if(m==-1)return;var n=p.element.getElementsByTag('a'),o=n.getItem(p._.focusIndex=m);if(b.webkit||b.opera)o.getDocument().getWindow().focus();o.focus();p.onMark&&p.onMark(o);}},proto:{show:function(){this.element.setStyle('display','');},hide:function(){var m=this;if(!m.onHide||m.onHide.call(m)!==true)m.element.setStyle('display','none');},onKeyDown:function(m){var r=this;var n=r.keys[m];switch(n){case 'next':var o=r._.focusIndex,p=r.element.getElementsByTag('a'),q;while(q=p.getItem(++o)){if(q.getAttribute('_cke_focus')&&q.$.offsetWidth){r._.focusIndex=o;q.focus();break;}}return false;case 'prev':o=r._.focusIndex;p=r.element.getElementsByTag('a');while(o>0&&(q=p.getItem(--o))){if(q.getAttribute('_cke_focus')&&q.$.offsetWidth){r._.focusIndex=o;q.focus();break;}}return false;case 'click':o=r._.focusIndex;q=o>=0&&r.element.getElementsByTag('a').getItem(o); -if(q)q.$.click?q.$.click():q.$.onclick();return false;}return true;}}});j.add('listblock',{requires:['panel'],onLoad:function(){k.panel.prototype.addListBlock=function(m,n){return this.addBlock(m,new k.listBlock(this.getHolderElement(),n));};k.listBlock=e.createClass({base:k.panel.block,$:function(m,n){var q=this;n=n||{};var o=n.attributes||(n.attributes={});(q.multiSelect=!!n.multiSelect)&&(o['aria-multiselectable']=true);!o.role&&(o.role='listbox');q.base.apply(q,arguments);var p=q.keys;p[40]='next';p[9]='next';p[38]='prev';p[2000+9]='prev';p[32]='click';q._.pendingHtml=[];q._.items={};q._.groups={};},_:{close:function(){if(this._.started){this._.pendingHtml.push('');delete this._.started;}},getClick:function(){if(!this._.click)this._.click=e.addFunction(function(m){var o=this;var n=true;if(o.multiSelect)n=o.toggle(m);else o.mark(m);if(o.onClick)o.onClick(m,n);},this);return this._.click;}},proto:{add:function(m,n,o){var r=this;var p=r._.pendingHtml,q=e.getNextId();if(!r._.started){p.push('');delete this._.started;}},getClick:function(){if(!this._.click)this._.click=e.addFunction(function(m){var o=this;var n=true;if(o.multiSelect)n=o.toggle(m);else o.mark(m);if(o.onClick)o.onClick(m,n);},this);return this._.click;}},proto:{add:function(m,n,o){var r=this;var p=r._.pendingHtml,q=e.getNextId();if(!r._.started){p.push('