Ticket #6189: 6189_2.patch

File 6189_2.patch, 114.7 KB (added by Sa'ar Zac Elias, 14 years ago)
  • _source/plugins/a11yhelp/dialogs/a11yhelp.js

     
    66CKEDITOR.dialog.add( 'a11yHelp', function( editor )
    77{
    88        var lang = editor.lang.accessibilityHelp,
    9                 id = CKEDITOR.tools.getNextNumber();
     9                id = CKEDITOR.tools.getNextId();
    1010
    1111        // CharCode <-> KeyChar.
    1212        var keyMap =
     
    125125        // Create the help list directly from lang file entries.
    126126        function buildHelpContents()
    127127        {
    128                 var pageTpl = '<div class="cke_accessibility_legend" role="document" aria-labelledby="cke_' + id + '_arialbl" tabIndex="-1">%1</div>' +
    129                                 '<span id="cke_' + id + '_arialbl" class="cke_voice_label">' + lang.contents + ' </span>',
     128                var pageTpl = '<div class="cke_accessibility_legend" role="document" aria-labelledby="' + id + '_arialbl" tabIndex="-1">%1</div>' +
     129                                '<span id="' + id + '_arialbl" class="cke_voice_label">' + lang.contents + ' </span>',
    130130                        sectionTpl = '<h1>%1</h1><dl>%2</dl>',
    131131                        itemTpl = '<dt>%1</dt><dd>%2</dd>';
    132132
  • _source/plugins/basicstyles/plugin.js

     
    2929                                });
    3030                };
    3131
    32                 var config = editor.config;
    33                 var lang = editor.lang;
     32                var config = editor.config,
     33                        lang = editor.lang;
    3434
    35                 addButtonCommand( 'Bold'                , lang.bold                     , 'bold'                , config.coreStyles_bold );
     35                addButtonCommand( 'Bold'                , lang.bold             , 'bold'                , config.coreStyles_bold );
    3636                addButtonCommand( 'Italic'              , lang.italic           , 'italic'              , config.coreStyles_italic );
    37                 addButtonCommand( 'Underline'   , lang.underline        , 'underline'   , config.coreStyles_underline );
     37                addButtonCommand( 'Underline'   , lang.underline                , 'underline'   , config.coreStyles_underline );
    3838                addButtonCommand( 'Strike'              , lang.strike           , 'strike'              , config.coreStyles_strike );
    39                 addButtonCommand( 'Subscript'   , lang.subscript        , 'subscript'   , config.coreStyles_subscript );
    40                 addButtonCommand( 'Superscript' , lang.superscript      , 'superscript' , config.coreStyles_superscript );
     39                addButtonCommand( 'Subscript'   , lang.subscript                , 'subscript'   , config.coreStyles_subscript );
     40                addButtonCommand( 'Superscript' , lang.superscript              , 'superscript' , config.coreStyles_superscript );
    4141        }
    4242});
    4343
  • _source/plugins/bidi/plugin.js

     
    55
    66(function()
    77{
    8         var guardElements = { table:1, ul:1, ol:1, blockquote:1, div:1 };
    9         var directSelectionGuardElements = {};
     8        var guardElements = { table:1, ul:1, ol:1, blockquote:1, div:1 },
     9                directSelectionGuardElements = {};
    1010        CKEDITOR.tools.extend( directSelectionGuardElements, guardElements, { tr:1, p:1, div:1, li:1 } );
    1111
    1212        function onSelectionChange( evt )
  • _source/plugins/button/plugin.js

     
    7070        render : function( editor, output )
    7171        {
    7272                var env = CKEDITOR.env,
    73                         id = this._.id = 'cke_' + CKEDITOR.tools.getNextNumber(),
     73                        id = this._.id = CKEDITOR.tools.getNextId(),
    7474                        classes = '',
    7575                        command = this.command, // Get the command name.
    7676                        clickFn,
  • _source/plugins/clipboard/dialogs/paste.js

     
    1010
    1111        function onPasteFrameLoad( win )
    1212        {
    13                 var doc =  new CKEDITOR.dom.document( win.document ),
     13                var doc = new CKEDITOR.dom.document( win.document ),
    1414                        docElement = doc.$;
    1515
    16                 doc.getById( "cke_actscrpt" ).remove();
     16                doc.getById( 'cke_actscrpt' ).remove();
    1717
    1818                CKEDITOR.env.ie ?
    1919                        docElement.body.contentEditable = "true" :
  • _source/plugins/clipboard/plugin.js

     
    1616                var doc = editor.document,
    1717                        body = doc.getBody();
    1818
    19                 var     enabled = false;
     19                var enabled = 0;
    2020                var onExec = function()
    2121                {
    22                         enabled = true;
     22                        enabled = 1;
    2323                };
    2424
    2525                // The following seems to be the only reliable way to detect that
     
    168168                        return;
    169169
    170170                // If the browser supports it, get the data directly
    171                 if (mode == 'text' && evt.data && evt.data.$.clipboardData)
     171                if ( mode == 'text' && evt.data && evt.data.$.clipboardData )
    172172                {
    173173                        // evt.data.$.clipboardData.types contains all the flavours in Mac's Safari, but not on windows.
    174174                        var plain = evt.data.$.clipboardData.getData( 'text/plain' );
    175                         if (plain)
     175                        if ( plain )
    176176                        {
    177177                                evt.data.preventDefault();
    178178                                callback( plain );
     
    254254        // Cutting off control type element in IE standards breaks the selection entirely. (#4881)
    255255        function fixCut( editor )
    256256        {
    257                 if ( !CKEDITOR.env.ie || editor.document.$.compatMode == 'BackCompat' )
     257                if ( !CKEDITOR.env.ie || CKEDITOR.env.quirks )
    258258                        return;
    259259
    260260                var sel = editor.getSelection();
     
    348348                                editor.on( 'contentDom', function()
    349349                                {
    350350                                        var body = editor.document.getBody();
    351                                         body.on( ( (mode == 'text' && CKEDITOR.env.ie) || CKEDITOR.env.webkit ) ? 'paste' : 'beforepaste',
     351                                        body.on( ( (mode == 'text' && CKEDITOR.env.ie ) || CKEDITOR.env.webkit ) ? 'paste' : 'beforepaste',
    352352                                                function( evt )
    353353                                                {
    354354                                                        if ( depressBeforeEvent )
  • _source/plugins/colorbutton/plugin.js

     
    161161                        }
    162162
    163163                        // Render the "More Colors" button.
    164                         if ( config.colorButton_enableMore )
     164                        if ( config.colorButton_enableMore === undefined || config.colorButton_enableMore )
    165165                        {
    166166                                output.push(
    167167                                        '</tr>' +
     
    174174                                                                ' role="option" aria-posinset="', total, '" aria-setsize="', total, '">',
    175175                                                                lang.more,
    176176                                                        '</a>' +
    177                                                 '</td>' );      // It is later in the code.
     177                                                '</td>' );      // tr is later in the code.
    178178                        }
    179179
    180180                        output.push( '</tr></table>' );
     
    191191 * @example
    192192 * config.colorButton_enableMore = false;
    193193 */
    194 CKEDITOR.config.colorButton_enableMore = true;
    195194
    196195/**
    197196 * Defines the colors to be displayed in the color selectors. It's a string
  • _source/plugins/colordialog/dialogs/colordialog.js

     
    1414                // Reference the dialog.
    1515                var dialog;
    1616
    17                 function spacer()
     17                var spacer =
    1818                {
    19                         return {
    20                                 type : 'html',
    21                                 html : '&nbsp;'
    22                         };
    23                 }
     19                        type : 'html',
     20                        html : '&nbsp;'
     21                };
    2422
    2523                function clearSelected()
    2624                {
     
    3028
    3129                function updateSelected( evt )
    3230                {
    33                         if ( ! (evt instanceof CKEDITOR.dom.event ) )
     31                        if ( ! ( evt instanceof CKEDITOR.dom.event ) )
    3432                                evt = new CKEDITOR.dom.event( evt );
    3533
    3634                        var target = evt.getTarget(),
    37                                         color;
     35                                color;
    3836
    3937                        if ( target.getName() == 'a' && ( color = target.getChild( 0 ).getHtml() ) )
    4038                                dialog.getContentElement( 'picker', 'selectedColor' ).setValue( color );
     
    4240
    4341                function updateHighlight( event )
    4442                {
    45                         if ( ! (event instanceof CKEDITOR.dom.event ) )
     43                        if ( ! ( event instanceof CKEDITOR.dom.event ) )
    4644                                event = event.data;
    4745
    4846                        var target = event.getTarget(),
     
    6159                        $doc.getById( hicolorTextId ).setHtml( '&nbsp;' );
    6260                }
    6361
    64                 var onMouseout = $tools.addFunction( clearHighlight );
     62                var onMouseout = $tools.addFunction( clearHighlight ),
     63                        onClick = updateSelected,
     64                        onClickHandler = CKEDITOR.tools.addFunction( onClick ),
     65                        onFocus = updateHighlight,
     66                        onBlur = clearHighlight;
    6567
    66                 var onClick = updateSelected,
    67                                 onClickHandler = CKEDITOR.tools.addFunction( onClick );
    68 
    69                 var onFocus = updateHighlight,
    70                                 onBlur = clearHighlight;
    71 
    7268                var onKeydownHandler = CKEDITOR.tools.addFunction( function( ev )
    7369                {
    7470                        ev = new CKEDITOR.dom.event( ev );
    7571                        var element = ev.getTarget();
    7672                        var relative, nodeToMove;
    77                         var keystroke = ev.getKeystroke();
    78                         var rtl = editor.lang.dir == 'rtl';
     73                        var keystroke = ev.getKeystroke(),
     74                                rtl = editor.lang.dir == 'rtl';
    7975
    8076                        switch ( keystroke )
    8177                        {
     
    177173                function createColorTable()
    178174                {
    179175                        // Create the base colors array.
    180                         var aColors = ['00','33','66','99','cc','ff'];
     176                        var aColors = [ '00', '33', '66', '99', 'cc', 'ff' ];
    181177
    182178                        // This function combines two ranges of three values from the color array into a row.
    183179                        function appendColorRow( rangeA, rangeB )
    184180                        {
    185181                                for ( var i = rangeA ; i < rangeA + 3 ; i++ )
    186182                                {
    187                                         var row = table.$.insertRow(-1);
     183                                        var row = table.$.insertRow( -1 );
    188184
    189185                                        for ( var j = rangeB ; j < rangeB + 3 ; j++ )
    190186                                        {
     
    287283                                                                                firstColor.focus();
    288284                                                                        }
    289285                                                                },
    290                                                                 spacer(),
     286                                                                spacer,
    291287                                                                {
    292288                                                                        type : 'vbox',
    293289                                                                        padding : 0,
     
    320316                                                                                                }
    321317                                                                                        }
    322318                                                                                },
    323                                                                                 spacer(),
     319                                                                                spacer,
    324320                                                                                {
    325321                                                                                        type : 'button',
    326322                                                                                        id : 'clear',
  • _source/plugins/contextmenu/plugin.js

     
    2525{
    2626        $ : function( editor )
    2727        {
    28                 this.id = 'cke_' + CKEDITOR.tools.getNextNumber();
     28                this.id = CKEDITOR.tools.getNextId();
    2929                this.editor = editor;
    3030                this._.listeners = [];
    3131                this._.functionId = CKEDITOR.tools.addFunction( function( commandName )
  • _source/plugins/dialog/plugin.js

     
    3333
    3434(function()
    3535{
     36        var cssLength = CKEDITOR.tools.cssLength;
    3637        function isTabVisible( tabId )
    3738        {
    3839                return !!this._.tabs[ tabId ][ 0 ].$.offsetHeight;
     
    501502                        page && this.addPage( page );
    502503                }
    503504
    504                 this.parts['tabs'].on( 'click', function( evt )
     505                this.parts[ 'tabs' ].on( 'click', function( evt )
    505506                                {
    506507                                        var target = evt.data.getTarget();
    507508                                        // If we aren't inside a tab, bail out.
     
    990991                                page.setAttribute( 'aria-hidden', i != id );
    991992                        }
    992993
    993                         var selected = this._.tabs[id];
    994                         selected[0].addClass( 'cke_dialog_tab_selected' );
    995 
    996                         // [IE] a unvisible input[type='text'] will enlarge it's width
    997                         // if it's value is long when it show( #5649 )
    998                         // so we clear it's value before it shows and then recover it
     994                        var selected = this._.tabs[ id ];
     995                        selected[ 0 ].addClass( 'cke_dialog_tab_selected' );
     996                       
     997                        // [IE] an invisible input[type='text'] will enlarge it's width
     998                        // if it's value is long when it shows, so we clear it's value
     999                        // before it shows and then recover it (#5649)
    9991000                        if ( CKEDITOR.env.ie6Compat || CKEDITOR.env.ie7Compat )
    10001001                        {
    1001                                 clearOrRecoverTextInputValue( selected[1] );
    1002                                 selected[1].show();
     1002                                clearOrRecoverTextInputValue( selected[ 1 ] );
     1003                                selected[ 1 ].show();
    10031004                                setTimeout( function()
    10041005                                {
    1005                                         clearOrRecoverTextInputValue( selected[1], true );
     1006                                        clearOrRecoverTextInputValue( selected[ 1 ], 1 );
    10061007                                }, 0 );
    10071008                        }
    10081009                        else
    1009                         {
    1010                                 selected[1].show();
    1011                         }
     1010                                selected[ 1 ].show();
    10121011
    1013 
    10141012                        this._.currentTabId = id;
    10151013                        this._.currentTabIndex = CKEDITOR.tools.indexOf( this._.tabIdList, id );
    10161014                },
     
    18171815        function showCover( editor )
    18181816        {
    18191817                var win = CKEDITOR.document.getWindow();
    1820                 var backgroundColorStyle = editor.config.dialog_backgroundCoverColor || 'white',
    1821                         backgroundCoverOpacity = editor.config.dialog_backgroundCoverOpacity,
    1822                         baseFloatZIndex = editor.config.baseFloatZIndex,
     1818                var config = editor.config,
     1819                        backgroundColorStyle = config.dialog_backgroundCoverColor || 'white',
     1820                        backgroundCoverOpacity = config.dialog_backgroundCoverOpacity,
     1821                        baseFloatZIndex = config.baseFloatZIndex,
    18231822                        coverKey = CKEDITOR.tools.genKey(
    18241823                                        backgroundColorStyle,
    18251824                                        backgroundCoverOpacity,
     
    22502249                                                if ( widths )
    22512250                                                {
    22522251                                                        if ( widths[i] )
    2253                                                                 styles.push( 'width:' + CKEDITOR.tools.cssLength( widths[i] ) );
     2252                                                                styles.push( 'width:' + cssLength( widths[i] ) );
    22542253                                                }
    22552254                                                else
    22562255                                                        styles.push( 'width:' + Math.floor( 100 / childHtmlList.length ) + '%' );
    22572256                                                if ( height )
    2258                                                         styles.push( 'height:' + CKEDITOR.tools.cssLength( height ) );
     2257                                                        styles.push( 'height:' + cssLength( height ) );
    22592258                                                if ( elementDefinition && elementDefinition.padding != undefined )
    2260                                                         styles.push( 'padding:' + CKEDITOR.tools.cssLength( elementDefinition.padding ) );
     2259                                                        styles.push( 'padding:' + cssLength( elementDefinition.padding ) );
    22612260                                                if ( styles.length > 0 )
    22622261                                                        html.push( 'style="' + styles.join('; ') + '" ' );
    22632262                                                html.push( '>', childHtmlList[i], '</td>' );
     
    23102309                         */
    23112310                        vbox : function( dialog, childObjList, childHtmlList, htmlList, elementDefinition )
    23122311                        {
    2313                                 if (arguments.length < 3 )
     2312                                if ( arguments.length < 3 )
    23142313                                        return;
    23152314
    23162315                                this._ || ( this._ = {} );
     
    23252324                                        html.push( 'style="' );
    23262325                                        if ( elementDefinition && elementDefinition.expand )
    23272326                                                html.push( 'height:100%;' );
    2328                                         html.push( 'width:' + CKEDITOR.tools.cssLength( width || '100%' ), ';' );
     2327                                        html.push( 'width:' + cssLength( width || '100%' ), ';' );
    23292328                                        html.push( '"' );
    23302329                                        html.push( 'align="', CKEDITOR.tools.htmlEncode(
    23312330                                                ( elementDefinition && elementDefinition.align ) || ( dialog.getParentEditor().lang.dir == 'ltr' ? 'left' : 'right' ) ), '" ' );
     
    23362335                                                var styles = [];
    23372336                                                html.push( '<tr><td role="presentation" ' );
    23382337                                                if ( width )
    2339                                                         styles.push( 'width:' + CKEDITOR.tools.cssLength( width || '100%' ) );
     2338                                                        styles.push( 'width:' + cssLength( width || '100%' ) );
    23402339                                                if ( heights )
    2341                                                         styles.push( 'height:' + CKEDITOR.tools.cssLength( heights[i] ) );
     2340                                                        styles.push( 'height:' + cssLength( heights[i] ) );
    23422341                                                else if ( elementDefinition && elementDefinition.expand )
    23432342                                                        styles.push( 'height:' + Math.floor( 100 / childHtmlList.length ) + '%' );
    23442343                                                if ( elementDefinition && elementDefinition.padding != undefined )
    2345                                                         styles.push( 'padding:' + CKEDITOR.tools.cssLength( elementDefinition.padding ) );
     2344                                                        styles.push( 'padding:' + cssLength( elementDefinition.padding ) );
    23462345                                                if ( styles.length > 0 )
    23472346                                                        html.push( 'style="', styles.join( '; ' ), '" ' );
    23482347                                                html.push( ' class="cke_dialog_ui_vbox_child">', childHtmlList[i], '</td></tr>' );
  • _source/plugins/dialogadvtab/plugin.js

     
    132132                                                label : lang.styles,
    133133                                                'default' : '',
    134134
    135                                                 onChange : function(){},
    136 
    137135                                                getStyle : function( name, defaultValue )
    138136                                                {
    139137                                                        var match = this.getValue().match( new RegExp( name + '\\s*:\s*([^;]*)', 'i') );
     
    159157                                                                styles += name + ': ' + value;
    160158                                                        }
    161159
    162                                                         this.setValue( styles, true );
     160                                                        this.setValue( styles, 1 );
    163161
    164162                                                },
    165163
  • _source/plugins/dialogui/plugin.js

     
    380380                                        if ( elementDefinition[ 'default' ] )
    381381                                                attributes.checked = 'checked';
    382382
    383                                         if (typeof myDefinition.controlStyle != 'undefined')
     383                                        if ( typeof myDefinition.controlStyle != 'undefined' )
    384384                                                myDefinition.style = myDefinition.controlStyle;
    385385
    386386                                        _.checkbox = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'input', null, attributes );
     
    462462                                                cleanInnerDefinition( inputDefinition );
    463463                                                cleanInnerDefinition( labelDefinition );
    464464
    465                                                 if (typeof inputDefinition.controlStyle != 'undefined')
     465                                                if ( typeof inputDefinition.controlStyle != 'undefined' )
    466466                                                        inputDefinition.style = inputDefinition.controlStyle;
    467467
    468468                                                children.push( new CKEDITOR.ui.dialog.uiElement( dialog, inputDefinition, inputHtml, 'input', null, inputAttributes ) );
     
    622622                                                        CKEDITOR.tools.htmlEncode( item[0] ) );
    623623                                        }
    624624
    625                                         if (typeof myDefinition.controlStyle != 'undefined')
     625                                        if ( typeof myDefinition.controlStyle != 'undefined' )
    626626                                                myDefinition.style = myDefinition.controlStyle;
    627627
    628628                                        _.select = new CKEDITOR.ui.dialog.uiElement( dialog, myDefinition, html, 'select', null, attributes, innerHTML.join( '' ) );
     
    931931                                {
    932932                                        this._.disabled = false;
    933933                                        var element = this.getElement();
    934                                         element && element.removeClass( 'disabled' );
     934                                        element && element.removeClass( 'cke_disabled' );
    935935                                },
    936936
    937937                                /**
     
    941941                                disable : function()
    942942                                {
    943943                                        this._.disabled = true;
    944                                         this.getElement().addClass( 'disabled' );
     944                                        this.getElement().addClass( 'cke_disabled' );
    945945                                },
    946946
    947947                                isVisible : function()
     
    13841384                                 */
    13851385                                reset : function()
    13861386                                {
    1387                                         var frameElement = CKEDITOR.document.getById( this._.frameId ),
     1387                                        var _ = this._,
     1388                                                frameElement = CKEDITOR.document.getById( _.frameId ),
    13881389                                                frameDocument = frameElement.getFrameDocument(),
    1389                                                 elementDefinition = this._.definition,
    1390                                                 buttons = this._.buttons,
     1390                                                elementDefinition = _.definition,
     1391                                                buttons = _.buttons,
    13911392                                                callNumber = this.formLoadedNumber,
    13921393                                                unloadNumber = this.formUnloadNumber,
    1393                                                 langDir = this._.dialog._.editor.lang.dir,
    1394                                                 langCode = this._.dialog._.editor.langCode;
     1394                                                langDir = _.dialog._.editor.lang.dir,
     1395                                                langCode = _.dialog._.editor.langCode;
    13951396
    13961397                                        // The callback function for the iframe, but we must call tools.addFunction only once
    13971398                                        // so we store the function number in this.formLoadedNumber
    1398                                         if (!callNumber)
     1399                                        if ( !callNumber )
    13991400                                        {
    14001401                                                callNumber = this.formLoadedNumber = CKEDITOR.tools.addFunction(
    14011402                                                        function()
  • _source/plugins/div/dialogs/div.js

     
    140140                        var containedBlocks = [], block;
    141141
    142142                        // Get all ranges from the selection.
    143                         var selection = editor.document.getSelection();
    144                         var ranges = selection.getRanges();
     143                        var selection = editor.document.getSelection(),
     144                                ranges = selection.getRanges();
    145145                        var bookmarks = selection.createBookmarks();
    146146                        var i, iterator;
    147147
     
    437437                        ],
    438438                        onLoad : function()
    439439                        {
    440                                 setupFields.call(this);
     440                                setupFields.call( this );
    441441
    442442                                // Preparing for the 'elementStyle' field.
    443443                                var dialog = this,
  • _source/plugins/div/plugin.js

     
    9595                                {
    9696                                        editor.contextMenu.addListener( function( element, selection )
    9797                                                {
    98                                                         if ( !element || element.isReadOnly())
     98                                                        if ( !element || element.isReadOnly() )
    9999                                                                return null;
    100100
    101101                                                        var elementPath = new CKEDITOR.dom.elementPath( element ),
  • _source/plugins/domiterator/plugin.js

     
    2020                        return;
    2121
    2222                this.range = range;
    23                 this.forceBrBreak = false;
     23                this.forceBrBreak = 0;
    2424
    2525                // Whether include <br>s into the enlarged range.(#3730).
    26                 this.enlargeBr = true;
    27                 this.enforceRealBlocks = false;
     26                this.enlargeBr = 1;
     27                this.enforceRealBlocks = 0;
    2828
    2929                this._ || ( this._ = {} );
    3030        }
     
    8080                                // next block.(#3887)
    8181                                if ( this._.lastNode &&
    8282                                                this._.lastNode.type == CKEDITOR.NODE_TEXT &&
    83                                                 !CKEDITOR.tools.trim( this._.lastNode.getText( ) ) &&
     83                                                !CKEDITOR.tools.trim( this._.lastNode.getText() ) &&
    8484                                                this._.lastNode.getParent().isBlockBoundary() )
    8585                                {
    8686                                        var testRange = new CKEDITOR.dom.range( range.document );
     
    112112                        {
    113113                                // closeRange indicates that a paragraph boundary has been found,
    114114                                // so the range can be closed.
    115                                 var closeRange = false,
    116                                                 parentPre = currentNode.hasAscendant( 'pre' );
     115                                var closeRange = 0,
     116                                        parentPre = currentNode.hasAscendant( 'pre' );
    117117
    118118                                // includeNode indicates that the current node is good to be part
    119119                                // of the range. By default, any non-element node is ok for it.
    120120                                var includeNode = ( currentNode.type != CKEDITOR.NODE_ELEMENT ),
    121                                         continueFromSibling = false;
     121                                        continueFromSibling = 0;
    122122
    123123                                // If it is an element node, let's check if it can be part of the
    124124                                // range.
     
    132132                                                // <br> boundaries must be part of the range. It will
    133133                                                // happen only if ForceBrBreak.
    134134                                                if ( nodeName == 'br' )
    135                                                         includeNode = true;
     135                                                        includeNode = 1;
    136136                                                else if ( !range && !currentNode.getChildCount() && nodeName != 'hr' )
    137137                                                {
    138138                                                        // If we have found an empty block, and haven't started
     
    154154                                                                this._.nextNode = currentNode;
    155155                                                }
    156156
    157                                                 closeRange = true;
     157                                                closeRange = 1;
    158158                                        }
    159159                                        else
    160160                                        {
     
    171171                                                        currentNode = currentNode.getFirst();
    172172                                                        continue;
    173173                                                }
    174                                                 includeNode = true;
     174                                                includeNode = 1;
    175175                                        }
    176176                                }
    177177                                else if ( currentNode.type == CKEDITOR.NODE_TEXT )
     
    179179                                        // Ignore normal whitespaces (i.e. not including &nbsp; or
    180180                                        // other unicode whitespaces) before/after a block node.
    181181                                        if ( beginWhitespaceRegex.test( currentNode.getText() ) )
    182                                                 includeNode = false;
     182                                                includeNode = 0;
    183183                                }
    184184
    185185                                // The current node is good to be part of the range and we are
     
    204204                                                if ( parentNode.isBlockBoundary( this.forceBrBreak
    205205                                                                && !parentPre && { br : 1 } ) )
    206206                                                {
    207                                                         closeRange = true;
     207                                                        closeRange = 1;
    208208                                                        isLast = isLast || ( parentNode.equals( lastNode) );
    209209                                                        break;
    210210                                                }
    211211
    212212                                                currentNode = parentNode;
    213                                                 includeNode = true;
     213                                                includeNode = 1;
    214214                                                isLast = ( currentNode.equals( lastNode ) );
    215                                                 continueFromSibling = true;
     215                                                continueFromSibling = 1;
    216216                                        }
    217217                                }
    218218
  • _source/plugins/editingblock/plugin.js

     
    211211 * @example
    212212 * config.startupFocus = true;
    213213 */
    214 CKEDITOR.config.startupFocus = false;
    215214
    216215/**
    217216 * Whether to render or not the editing block area in the editor interface.
  • _source/plugins/enterkey/plugin.js

     
    6969                                if ( node.is( 'li' ) )
    7070                                {
    7171                                        nextBlock.breakParent( node );
    72                                         nextBlock.move( nextBlock.getNext(), true );
     72                                        nextBlock.move( nextBlock.getNext(), 1 );
    7373                                }
    7474                        }
    7575                        else if ( previousBlock && ( node = previousBlock.getParent() ) && node.is( 'li' ) )
     
    317317                        return true;
    318318                }
    319319                else
    320                         return enter( editor, editor.config.shiftEnterMode, true );
     320                        return enter( editor, editor.config.shiftEnterMode, 1 );
    321321        }
    322322
    323323        function enter( editor, mode, forceMode )
     
    335335                setTimeout( function()
    336336                        {
    337337                                editor.fire( 'saveSnapshot' );  // Save undo step.
    338                                 if ( mode == CKEDITOR.ENTER_BR || editor.getSelection().getStartElement().hasAscendant( 'pre', true ) )
     338                                if ( mode == CKEDITOR.ENTER_BR || editor.getSelection().getStartElement().hasAscendant( 'pre', 1 ) )
    339339                                        enterBr( editor, mode, null, forceMode );
    340340                                else
    341341                                        enterBlock( editor, mode, null, forceMode );
  • _source/plugins/entities/plugin.js

     
    214214 * config.entities_processNumerical = true;
    215215 * config.entities_processNumerical = 'force';          //Convert from "&nbsp;" into "&#160;";
    216216 */
    217 CKEDITOR.config.entities_processNumerical = false;
    218217
    219218/**
    220219 * An additional list of entities to be used. It's a string containing each
  • _source/plugins/filebrowser/plugin.js

     
    340340                        var ids = elementId.split( ";" );
    341341                        for ( var i = 0 ; i < ids.length ; i++ )
    342342                        {
    343                                 if ( isConfigured( definition, tabId, ids[i]) )
     343                                if ( isConfigured( definition, tabId, ids[i] ) )
    344344                                        return true;
    345345                        }
    346346                        return false;
  • _source/plugins/find/dialogs/find.js

     
    7171                // Style object for highlights: (#5018)
    7272                // 1. Defined as full match style to avoid compromising ordinary text color styles.
    7373                // 2. Must be apply onto inner-most text to avoid conflicting with ordinary text color styles visually.
    74                 var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { fullMatch : true, childRule : function(){ return false; } },
     74                var highlightStyle = new CKEDITOR.style( CKEDITOR.tools.extend( { fullMatch : true, childRule : function(){ return 0; } },
    7575                        editor.config.find_highlight ) );
    7676
    7777                /**
     
    8787                                new CKEDITOR.dom.walker( range );
    8888                        walker.guard = matchWord ? nonCharactersBoundary : null;
    8989                        walker[ 'evaluator' ] = findEvaluator;
    90                         walker.breakOnFalse = true;
     90                        walker.breakOnFalse = 1;
    9191
    9292                        this._ = {
    9393                                matchWord : matchWord,
     
    111111                        {
    112112                                var currentTextNode = this.textNode;
    113113                                // Already at the end of document, no more character available.
    114                                 if (  currentTextNode === null )
     114                                if ( currentTextNode === null )
    115115                                        return cursorStep.call( this );
    116116
    117117                                this._.matchBoundary = false;
     
    142142                                                // Stop searching if we're need full word match OR
    143143                                                // already reach document end.
    144144                                                if ( this._.matchWord && !currentTextNode
    145                                                          ||this._.walker._.end )
     145                                                         || this._.walker._.end )
    146146                                                        break;
    147147
    148148                                                // Marking as match character boundaries.
     
    175175                                cursors : [],
    176176                                rangeLength : rangeLength,
    177177                                highlightRange : null,
    178                                 isMatched : false
     178                                isMatched : 0
    179179                        };
    180180                };
    181181
     
    511511                                // Re-run the finding once for cyclic.(#3517)
    512512                                if ( matchCyclic && !cyclicRerun )
    513513                                {
    514                                         this.searchRange = getSearchRange( true );
     514                                        this.searchRange = getSearchRange( 1 );
    515515                                        this.matchRange = null;
    516516                                        return arguments.callee.apply( this,
    517517                                                Array.prototype.slice.call( arguments ).concat( [ true ] ) );
     
    531531                                isReplace = 1;
    532532
    533533                                // Successiveness of current replace/find.
    534                                 var result = false;
     534                                var result = 0;
    535535
    536536                                // 1. Perform the replace when there's already a match here.
    537537                                // 2. Otherwise perform the find but don't replace it immediately.
     
    561561                                                this.matchRange.highlight();
    562562                                        this.matchRange._.isReplaced = true;
    563563                                        this.replaceCounter++;
    564                                         result = true;
     564                                        result = 1;
    565565                                }
    566566                                else
    567567                                        result = this.find( pattern, matchCase, matchWord, matchCyclic, !isReplaceAll );
     
    595595                        return searchRange;
    596596                }
    597597
     598                var lang = editor.lang.findAndReplace;
    598599                return {
    599                         title : editor.lang.findAndReplace.title,
     600                        title : lang.title,
    600601                        resizable : CKEDITOR.DIALOG_RESIZE_NONE,
    601602                        minWidth : 350,
    602603                        minHeight : 165,
    603                         buttons : [ CKEDITOR.dialog.cancelButton ],             //Cancel button only.
     604                        buttons : [ CKEDITOR.dialog.cancelButton ],             // Cancel button only.
    604605                        contents : [
    605606                                {
    606607                                        id : 'find',
    607                                         label : editor.lang.findAndReplace.find,
    608                                         title : editor.lang.findAndReplace.find,
     608                                        label : lang.find,
     609                                        title : lang.find,
    609610                                        accessKey : '',
    610611                                        elements : [
    611612                                                {
     
    616617                                                                {
    617618                                                                        type : 'text',
    618619                                                                        id : 'txtFindFind',
    619                                                                         label : editor.lang.findAndReplace.findWhat,
     620                                                                        label : lang.findWhat,
    620621                                                                        isChanged : false,
    621622                                                                        labelLayout : 'horizontal',
    622623                                                                        accessKey : 'F'
     
    625626                                                                        type : 'button',
    626627                                                                        align : 'left',
    627628                                                                        style : 'width:100%',
    628                                                                         label : editor.lang.findAndReplace.find,
     629                                                                        label : lang.find,
    629630                                                                        onClick : function()
    630631                                                                        {
    631632                                                                                var dialog = this.getDialog();
     
    633634                                                                                                        dialog.getValueOf( 'find', 'txtFindCaseChk' ),
    634635                                                                                                        dialog.getValueOf( 'find', 'txtFindWordChk' ),
    635636                                                                                                        dialog.getValueOf( 'find', 'txtFindCyclic' ) ) )
    636                                                                                         alert( editor.lang.findAndReplace
     637                                                                                        alert( lang
    637638                                                                                                .notFoundMsg );
    638639                                                                        }
    639640                                                                }
     
    649650                                                                        id : 'txtFindCaseChk',
    650651                                                                        isChanged : false,
    651652                                                                        style : 'margin-top:28px',
    652                                                                         label : editor.lang.findAndReplace.matchCase
     653                                                                        label : lang.matchCase
    653654                                                                },
    654655                                                                {
    655656                                                                        type : 'checkbox',
    656657                                                                        id : 'txtFindWordChk',
    657658                                                                        isChanged : false,
    658                                                                         label : editor.lang.findAndReplace.matchWord
     659                                                                        label : lang.matchWord
    659660                                                                },
    660661                                                                {
    661662                                                                        type : 'checkbox',
    662663                                                                        id : 'txtFindCyclic',
    663664                                                                        isChanged : false,
    664665                                                                        'default' : true,
    665                                                                         label : editor.lang.findAndReplace.matchCyclic
     666                                                                        label : lang.matchCyclic
    666667                                                                }
    667668                                                        ]
    668669                                                }
     
    670671                                },
    671672                                {
    672673                                        id : 'replace',
    673                                         label : editor.lang.findAndReplace.replace,
     674                                        label : lang.replace,
    674675                                        accessKey : 'M',
    675676                                        elements : [
    676677                                                {
     
    681682                                                                {
    682683                                                                        type : 'text',
    683684                                                                        id : 'txtFindReplace',
    684                                                                         label : editor.lang.findAndReplace.findWhat,
     685                                                                        label : lang.findWhat,
    685686                                                                        isChanged : false,
    686687                                                                        labelLayout : 'horizontal',
    687688                                                                        accessKey : 'F'
     
    690691                                                                        type : 'button',
    691692                                                                        align : 'left',
    692693                                                                        style : 'width:100%',
    693                                                                         label : editor.lang.findAndReplace.replace,
     694                                                                        label : lang.replace,
    694695                                                                        onClick : function()
    695696                                                                        {
    696697                                                                                var dialog = this.getDialog();
     
    700701                                                                                                        dialog.getValueOf( 'replace', 'txtReplaceCaseChk' ),
    701702                                                                                                        dialog.getValueOf( 'replace', 'txtReplaceWordChk' ),
    702703                                                                                                        dialog.getValueOf( 'replace', 'txtReplaceCyclic' ) ) )
    703                                                                                         alert( editor.lang.findAndReplace
     704                                                                                        alert( lang
    704705                                                                                                .notFoundMsg );
    705706                                                                        }
    706707                                                                }
     
    714715                                                                {
    715716                                                                        type : 'text',
    716717                                                                        id : 'txtReplace',
    717                                                                         label : editor.lang.findAndReplace.replaceWith,
     718                                                                        label : lang.replaceWith,
    718719                                                                        isChanged : false,
    719720                                                                        labelLayout : 'horizontal',
    720721                                                                        accessKey : 'R'
     
    723724                                                                        type : 'button',
    724725                                                                        align : 'left',
    725726                                                                        style : 'width:100%',
    726                                                                         label : editor.lang.findAndReplace.replaceAll,
     727                                                                        label : lang.replaceAll,
    727728                                                                        isChanged : false,
    728729                                                                        onClick : function()
    729730                                                                        {
     
    733734                                                                                finder.replaceCounter = 0;
    734735
    735736                                                                                // Scope to full document.
    736                                                                                 finder.searchRange = getSearchRange( true );
     737                                                                                finder.searchRange = getSearchRange( 1 );
    737738                                                                                if ( finder.matchRange )
    738739                                                                                {
    739740                                                                                        finder.matchRange.removeHighlight();
     
    750751
    751752                                                                                if ( finder.replaceCounter )
    752753                                                                                {
    753                                                                                         alert( editor.lang.findAndReplace.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) );
     754                                                                                        alert( lang.replaceSuccessMsg.replace( /%1/, finder.replaceCounter ) );
    754755                                                                                        editor.fire( 'saveSnapshot' );
    755756                                                                                }
    756757                                                                                else
    757                                                                                         alert( editor.lang.findAndReplace.notFoundMsg );
     758                                                                                        alert( lang.notFoundMsg );
    758759                                                                        }
    759760                                                                }
    760761                                                        ]
     
    768769                                                                        type : 'checkbox',
    769770                                                                        id : 'txtReplaceCaseChk',
    770771                                                                        isChanged : false,
    771                                                                         label : editor.lang.findAndReplace
     772                                                                        label : lang
    772773                                                                                .matchCase
    773774                                                                },
    774775                                                                {
    775776                                                                        type : 'checkbox',
    776777                                                                        id : 'txtReplaceWordChk',
    777778                                                                        isChanged : false,
    778                                                                         label : editor.lang.findAndReplace
     779                                                                        label : lang
    779780                                                                                .matchWord
    780781                                                                },
    781782                                                                {
     
    783784                                                                        id : 'txtReplaceCyclic',
    784785                                                                        isChanged : false,
    785786                                                                        'default' : true,
    786                                                                         label : editor.lang.findAndReplace
     787                                                                        label : lang
    787788                                                                                .matchCyclic
    788789                                                                }
    789790                                                        ]
     
    795796                        {
    796797                                var dialog = this;
    797798
    798                                 //keep track of the current pattern field in use.
     799                                // Keep track of the current pattern field in use.
    799800                                var patternField, wholeWordChkField;
    800801
    801                                 //Ignore initial page select on dialog show
    802                                 var isUserSelect = false;
    803                                 this.on('hide', function()
     802                                // Ignore initial page select on dialog show
     803                                var isUserSelect = 0;
     804                                this.on( 'hide', function()
    804805                                                {
    805                                                         isUserSelect = false;
    806                                                 } );
    807                                 this.on('show', function()
     806                                                        isUserSelect = 0;
     807                                                });
     808                                this.on( 'show', function()
    808809                                                {
    809                                                         isUserSelect = true;
    810                                                 } );
     810                                                        isUserSelect = 1;
     811                                                });
    811812
    812813                                this.selectPage = CKEDITOR.tools.override( this.selectPage, function( originalFunc )
    813814                                        {
     
    825826                                                        wholeWordChkField = dialog.getContentElement( pageId,
    826827                                                                wholeWordChkFieldId );
    827828
    828                                                         // prepare for check pattern text filed 'keyup' event
     829                                                        // Prepare for check pattern text filed 'keyup' event
    829830                                                        if ( !currPage.initialized )
    830831                                                        {
    831832                                                                patternFieldInput = CKEDITOR.document
     
    833834                                                                currPage.initialized = true;
    834835                                                        }
    835836
     837                                                        // Synchronize fields on tab switch.
    836838                                                        if ( isUserSelect )
    837                                                                 // synchronize fields on tab switch.
    838839                                                                syncFieldsBetweenTabs.call( this, pageId );
    839840                                                };
    840841                                        } );
  • _source/plugins/flash/plugin.js

     
    55
    66(function()
    77{
    8         var flashFilenameRegex = /\.swf(?:$|\?)/i,
    9                 numberRegex = /^\d+(?:\.\d+)?$/;
     8        var flashFilenameRegex = /\.swf(?:$|\?)/i;
    109
    11         function cssifyLength( length )
    12         {
    13                 if ( numberRegex.test( length ) )
    14                         return length + 'px';
    15                 return length;
    16         }
     10        var cssifyLength = CKEDITOR.tools.cssLength;
    1711
    1812        function isFlashEmbed( element )
    1913        {
  • _source/plugins/floatpanel/plugin.js

     
    1616        function getPanel( editor, doc, parentElement, definition, level )
    1717        {
    1818                // Generates the panel key: docId-eleId-skinName-langDir[-uiColor][-CSSs][-level]
    19                 var key =
    20                         doc.getUniqueId() +
    21                         '-' + parentElement.getUniqueId() +
    22                         '-' + editor.skinName +
    23                         '-' + editor.lang.dir +
    24                         ( ( editor.uiColor && ( '-' + editor.uiColor ) ) || '' ) +
    25                         ( ( definition.css && ( '-' + definition.css ) ) || '' ) +
    26                         ( ( level && ( '-' + level ) ) || '' );
     19                var key = CKEDITOR.tools.genKey( doc.getUniqueId(), parentElement.getUniqueId(), editor.skinName, editor.lang.dir,
     20                        editor.uiColor || '', definition.css || '', level || '' );
    2721
    2822                var panel = panels[ key ];
    2923
     
    4640        {
    4741                $ : function( editor, parentElement, definition, level )
    4842                {
    49                         definition.forceIFrame = true;
     43                        definition.forceIFrame = 1;
    5044
    5145                        var doc = parentElement.getDocument(),
    5246                                panel = getPanel( editor, doc, parentElement, definition, level || 0 ),
     
    10498                                        block = panel.showBlock( name );
    10599
    106100                                this.allowBlur( false );
    107                                 isShowing = true;
     101                                isShowing = 1;
    108102
    109103                                var element = this.element,
    110104                                        iframe = this._.iframe,
     
    313307                                if ( this.onShow )
    314308                                        this.onShow.call( this );
    315309
    316                                 isShowing = false;
     310                                isShowing = 0;
    317311                        },
    318312
    319313                        hide : function()
  • _source/plugins/forms/dialogs/button.js

     
    1212                {
    1313                        delete this.button;
    1414                        var element = this.getParentEditor().getSelection().getSelectedElement();
    15                         if ( element && element.getName() == "input" )
     15                        if ( element && element.is( 'input' ) )
    1616                        {
    1717                                var type = element.getAttribute( 'type' );
    18                                 if ( type == "button" || type == "reset" || type == "submit" )
     18                                if ( type in { button:1, reset:1, submit:1 } )
    1919                                {
    2020                                        this.button = element;
    2121                                        this.setupContent( element );
  • _source/plugins/forms/dialogs/checkbox.js

     
    1414
    1515                        var element = this.getParentEditor().getSelection().getSelectedElement();
    1616
    17                         if ( element && element.getAttribute( 'type' ) == "checkbox" )
     17                        if ( element && element.getAttribute( 'type' ) == 'checkbox' )
    1818                        {
    1919                                this.checkbox = element;
    2020                                this.setupContent( element );
     
    3131                                editor = this.getParentEditor();
    3232                                element = editor.document.createElement( 'input' );
    3333                                element.setAttribute( 'type', 'checkbox' );
    34                         }
    35 
    36                         if ( isInsertMode )
    3734                                editor.insertElement( element );
     35                        }
    3836                        this.commitContent( { element : element } );
    3937                },
    4038                contents : [
     
    9492                                                        {
    9593                                                                if ( CKEDITOR.env.ie )
    9694                                                                {
    97                                                                         // Remove attribute 'value' of checkbox #4721.
     95                                                                        // Remove attribute 'value' of checkbox (#4721).
    9896                                                                        var checkbox = new CKEDITOR.dom.element( 'input', element.getDocument() );
    9997                                                                        element.copyAttributes( checkbox, { value: 1 } );
    10098                                                                        checkbox.replace( element );
     
    123121
    124122                                                        if ( CKEDITOR.env.ie )
    125123                                                        {
    126                                                                 var isElementChecked = !!element.getAttribute( 'checked' );
    127                                                                 var isChecked = !!this.getValue();
     124                                                                var isElementChecked = !!element.getAttribute( 'checked' ),
     125                                                                        isChecked = !!this.getValue();
    128126
    129127                                                                if ( isElementChecked != isChecked )
    130128                                                                {
  • _source/plugins/forms/dialogs/radio.js

     
    1313                        delete this.radioButton;
    1414
    1515                        var element = this.getParentEditor().getSelection().getSelectedElement();
    16                         if ( element && element.getName() == "input" && element.getAttribute( 'type' ) == "radio" )
     16                        if ( element && element.getName() == 'input' && element.getAttribute( 'type' ) == 'radio' )
    1717                        {
    1818                                this.radioButton = element;
    1919                                this.setupContent( element );
  • _source/plugins/forms/plugin.js

     
    191191
    192192                                        switch ( type )
    193193                                        {
    194                                                 case 'text' : case 'password':
     194                                                case 'text' :
     195                                                case 'password' :
    195196                                                        evt.data.dialog = 'textfield';
    196197                                                        break;
    197                                                 case 'button' : case 'submit' : case 'reset' :
     198                                                case 'button' :
     199                                                case 'submit' :
     200                                                case 'reset' :
    198201                                                        evt.data.dialog = 'button';
    199202                                                        break;
    200203                                                case 'checkbox' :
  • _source/plugins/htmlwriter/plugin.js

     
    5757                 */
    5858                this.lineBreakChars = '\n';
    5959
    60                 this.forceSimpleAmpersand = false;
     60                this.forceSimpleAmpersand = 0;
    6161
    62                 this.sortAttributes = true;
     62                this.sortAttributes = 1;
    6363
    64                 this._.indent = false;
     64                this._.indent = 0;
    6565                this._.indentation = '';
    6666                this._.rules = {};
    6767
     
    254254                {
    255255                        if ( this._.output.length > 0 )
    256256                                this._.output.push( this.lineBreakChars );
    257                         this._.indent = true;
     257                        this._.indent = 1;
    258258                },
    259259
    260260                /**
     
    268268                indentation : function()
    269269                {
    270270                        this._.output.push( this._.indentation );
    271                         this._.indent = false;
     271                        this._.indent = 0;
    272272                },
    273273
    274274                /**
  • _source/plugins/iframedialog/plugin.js

     
    7474                                        contentLoad = elementDefinition.onContentLoad && CKEDITOR.tools.bind( elementDefinition.onContentLoad, this ),
    7575                                        cssWidth = CKEDITOR.tools.cssLength( elementDefinition.width ),
    7676                                        cssHeight = CKEDITOR.tools.cssLength( elementDefinition.height );
    77                                 _.frameId = CKEDITOR.tools.getNextNumber() + '_iframe';
     77                                _.frameId = CKEDITOR.tools.getNextId() + '_iframe';
    7878
    7979                                // IE BUG: Parent container does not resize to contain the iframe automatically.
    8080                                dialog.on( 'load', function()
  • _source/plugins/indent/plugin.js

     
    267267
    268268                                        currentOffset = Math.max( currentOffset, 0 );
    269269                                        currentOffset = Math.ceil( currentOffset / editor.config.indentOffset ) * editor.config.indentOffset;
    270                                         element.setStyle( indentCssProperty, currentOffset ? currentOffset + editor.config.indentUnit : '' );
     270                                        element.setStyle( indentCssProperty, currentOffset ? currentOffset + ( editor.config.indentUnit || 'px' ) : '' );
    271271                                        if ( element.getAttribute( 'style' ) === '' )
    272272                                                element.removeAttribute( 'style' );
    273273                                }
     
    393393
    394394CKEDITOR.tools.extend( CKEDITOR.config,
    395395        {
    396                 indentOffset : 40,
    397                 indentUnit : 'px',
    398                 indentClasses : null
     396                indentOffset : 40
    399397        });
    400398
    401399/**
    402400 * Size of each indentation step
    403401 * @type Number
    404  * @example
    405  * config.indentOffset = 40;
    406  */
    407 
    408  /**
    409  * Unit for the indentation style
    410  * @type String
    411  * @example
    412  * config.indentUnit = 'px';
    413  */
    414 
    415  /**
    416  * List of classes to use for indenting the contents.
    417  * @type Array
    418  * @example
    419  * // Don't use classes for indenting. (this is the default value)
    420  * config.indentClasses = null;
    421  * @example
    422  * // Use the classes 'Indent1', 'Indent2', 'Indent3'
    423  * config.indentClasses = ['Indent1', 'Indent2', 'Indent3'];
    424  */
    425 
    426 /**
    427  * Size of each indentation step
    428  * @type Number
    429402 * @default 40
    430403 * @example
    431404 * config.indentOffset = 4;
  • _source/plugins/justify/plugin.js

     
    183183                requires : [ 'domiterator' ]
    184184        });
    185185})();
    186 
    187 CKEDITOR.tools.extend( CKEDITOR.config,
    188         {
    189                 justifyClasses : null
    190         } );
  • _source/plugins/keystrokes/plugin.js

     
    2828                        blockedKeystrokes       = editor.keystrokeHandler.blockedKeystrokes;
    2929
    3030                for ( var i = 0 ; i < keystrokesConfig.length ; i++ )
    31                 {
    3231                        keystrokes[ keystrokesConfig[i][0] ] = keystrokesConfig[i][1];
    33                 }
    3432
    3533                for ( i = 0 ; i < blockedConfig.length ; i++ )
    36                 {
    3734                        blockedKeystrokes[ blockedConfig[i] ] = 1;
    38                 }
    3935        }
    4036});
    4137
  • _source/plugins/link/dialogs/link.js

     
    243243                {
    244244                        var item = elements.getItem( i );
    245245                        if ( item.getAttribute( '_cke_realelement' ) && item.getAttribute( '_cke_real_element_type' ) == 'anchor' )
    246                         {
    247246                                anchors.push( editor.restoreRealElement( item ) );
    248                         }
    249247                }
    250248
    251249                for ( i = 0 ; i < realAnchors.count() ; i++ )
     
    363361                return 'String.fromCharCode(' + encodedChars.join( ',' ) + ')';
    364362        }
    365363
     364        var commonLang = editor.lang.common,
     365                linkLang = editor.lang.link;
     366
    366367        return {
    367                 title : editor.lang.link.title,
     368                title : linkLang.title,
    368369                minWidth : 350,
    369370                minHeight : 230,
    370371                contents : [
    371372                        {
    372373                                id : 'info',
    373                                 label : editor.lang.link.info,
    374                                 title : editor.lang.link.info,
     374                                label : linkLang.info,
     375                                title : linkLang.info,
    375376                                elements :
    376377                                [
    377378                                        {
    378379                                                id : 'linkType',
    379380                                                type : 'select',
    380                                                 label : editor.lang.link.type,
     381                                                label : linkLang.type,
    381382                                                'default' : 'url',
    382383                                                items :
    383384                                                [
    384                                                         [ editor.lang.link.toUrl, 'url' ],
    385                                                         [ editor.lang.link.toAnchor, 'anchor' ],
    386                                                         [ editor.lang.link.toEmail, 'email' ]
     385                                                        [ linkLang.toUrl, 'url' ],
     386                                                        [ linkLang.toAnchor, 'anchor' ],
     387                                                        [ linkLang.toEmail, 'email' ]
    387388                                                ],
    388389                                                onChange : linkTypeChanged,
    389390                                                setup : function( data )
     
    409410                                                                        {
    410411                                                                                id : 'protocol',
    411412                                                                                type : 'select',
    412                                                                                 label : editor.lang.common.protocol,
     413                                                                                label : commonLang.protocol,
    413414                                                                                'default' : 'http://',
    414415                                                                                items :
    415416                                                                                [
     
    418419                                                                                        [ 'https://\u200E', 'https://' ],
    419420                                                                                        [ 'ftp://\u200E', 'ftp://' ],
    420421                                                                                        [ 'news://\u200E', 'news://' ],
    421                                                                                         [ editor.lang.link.other , '' ]
     422                                                                                        [ linkLang.other , '' ]
    422423                                                                                ],
    423424                                                                                setup : function( data )
    424425                                                                                {
     
    436437                                                                        {
    437438                                                                                type : 'text',
    438439                                                                                id : 'url',
    439                                                                                 label : editor.lang.common.url,
     440                                                                                label : commonLang.url,
    440441                                                                                required: true,
    441442                                                                                onLoad : function ()
    442443                                                                                {
     
    477478                                                                                        if ( this.getDialog().fakeObj ) // Edit Anchor.
    478479                                                                                                return true;
    479480
    480                                                                                         var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noUrl );
     481                                                                                        var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noUrl );
    481482                                                                                        return func.apply( this );
    482483                                                                                },
    483484                                                                                setup : function( data )
     
    513514                                                                id : 'browse',
    514515                                                                hidden : 'true',
    515516                                                                filebrowser : 'info:url',
    516                                                                 label : editor.lang.common.browseServer
     517                                                                label : commonLang.browseServer
    517518                                                        }
    518519                                                ]
    519520                                        },
     
    528529                                                        {
    529530                                                                type : 'fieldset',
    530531                                                                id : 'selectAnchorText',
    531                                                                 label : editor.lang.link.selectAnchor,
     532                                                                label : linkLang.selectAnchor,
    532533                                                                setup : function( data )
    533534                                                                {
    534535                                                                        if ( data.anchors.length > 0 )
     
    547548                                                                                                type : 'select',
    548549                                                                                                id : 'anchorName',
    549550                                                                                                'default' : '',
    550                                                                                                 label : editor.lang.link.anchorName,
     551                                                                                                label : linkLang.anchorName,
    551552                                                                                                style : 'width: 100%;',
    552553                                                                                                items :
    553554                                                                                                [
     
    582583                                                                                                type : 'select',
    583584                                                                                                id : 'anchorId',
    584585                                                                                                'default' : '',
    585                                                                                                 label : editor.lang.link.anchorId,
     586                                                                                                label : linkLang.anchorId,
    586587                                                                                                style : 'width: 100%;',
    587588                                                                                                items :
    588589                                                                                                [
     
    624625                                                                type : 'html',
    625626                                                                id : 'noAnchors',
    626627                                                                style : 'text-align: center;',
    627                                                                 html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( editor.lang.link.noAnchors ) + '</div>',
     628                                                                html : '<div role="label" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( linkLang.noAnchors ) + '</div>',
    628629                                                                // Focus the first element defined in above html.
    629630                                                                focus : true,
    630631                                                                setup : function( data )
     
    651652                                                        {
    652653                                                                type : 'text',
    653654                                                                id : 'emailAddress',
    654                                                                 label : editor.lang.link.emailAddress,
     655                                                                label : linkLang.emailAddress,
    655656                                                                required : true,
    656657                                                                validate : function()
    657658                                                                {
     
    661662                                                                                        dialog.getValueOf( 'info', 'linkType' ) != 'email' )
    662663                                                                                return true;
    663664
    664                                                                         var func = CKEDITOR.dialog.validate.notEmpty( editor.lang.link.noEmail );
     665                                                                        var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noEmail );
    665666                                                                        return func.apply( this );
    666667                                                                },
    667668                                                                setup : function( data )
     
    684685                                                        {
    685686                                                                type : 'text',
    686687                                                                id : 'emailSubject',
    687                                                                 label : editor.lang.link.emailSubject,
     688                                                                label : linkLang.emailSubject,
    688689                                                                setup : function( data )
    689690                                                                {
    690691                                                                        if ( data.email )
     
    701702                                                        {
    702703                                                                type : 'textarea',
    703704                                                                id : 'emailBody',
    704                                                                 label : editor.lang.link.emailBody,
     705                                                                label : linkLang.emailBody,
    705706                                                                rows : 3,
    706707                                                                'default' : '',
    707708                                                                setup : function( data )
     
    728729                        },
    729730                        {
    730731                                id : 'target',
    731                                 label : editor.lang.link.target,
    732                                 title : editor.lang.link.target,
     732                                label : linkLang.target,
     733                                title : linkLang.target,
    733734                                elements :
    734735                                [
    735736                                        {
     
    740741                                                        {
    741742                                                                type : 'select',
    742743                                                                id : 'linkTargetType',
    743                                                                 label : editor.lang.common.target,
     744                                                                label : commonLang.target,
    744745                                                                'default' : 'notSet',
    745746                                                                style : 'width : 100%;',
    746747                                                                'items' :
    747748                                                                [
    748                                                                         [ editor.lang.common.notSet, 'notSet' ],
    749                                                                         [ editor.lang.link.targetFrame, 'frame' ],
    750                                                                         [ editor.lang.link.targetPopup, 'popup' ],
    751                                                                         [ editor.lang.common.targetNew, '_blank' ],
    752                                                                         [ editor.lang.common.targetTop, '_top' ],
    753                                                                         [ editor.lang.common.targetSelf, '_self' ],
    754                                                                         [ editor.lang.common.targetParent, '_parent' ]
     749                                                                        [ commonLang.notSet, 'notSet' ],
     750                                                                        [ linkLang.targetFrame, 'frame' ],
     751                                                                        [ linkLang.targetPopup, 'popup' ],
     752                                                                        [ commonLang.targetNew, '_blank' ],
     753                                                                        [ commonLang.targetTop, '_top' ],
     754                                                                        [ commonLang.targetSelf, '_self' ],
     755                                                                        [ commonLang.targetParent, '_parent' ]
    755756                                                                ],
    756757                                                                onChange : targetChanged,
    757758                                                                setup : function( data )
     
    771772                                                        {
    772773                                                                type : 'text',
    773774                                                                id : 'linkTargetName',
    774                                                                 label : editor.lang.link.targetFrameName,
     775                                                                label : linkLang.targetFrameName,
    775776                                                                'default' : '',
    776777                                                                setup : function( data )
    777778                                                                {
     
    798799                                                [
    799800                                                        {
    800801                                                                type : 'fieldset',
    801                                                                 label : editor.lang.link.popupFeatures,
     802                                                                label : linkLang.popupFeatures,
    802803                                                                children :
    803804                                                                [
    804805                                                                        {
     
    808809                                                                                        {
    809810                                                                                                type : 'checkbox',
    810811                                                                                                id : 'resizable',
    811                                                                                                 label : editor.lang.link.popupResizable,
     812                                                                                                label : linkLang.popupResizable,
    812813                                                                                                setup : setupPopupParams,
    813814                                                                                                commit : commitPopupParams
    814815                                                                                        },
    815816                                                                                        {
    816817                                                                                                type : 'checkbox',
    817818                                                                                                id : 'status',
    818                                                                                                 label : editor.lang.link.popupStatusBar,
     819                                                                                                label : linkLang.popupStatusBar,
    819820                                                                                                setup : setupPopupParams,
    820821                                                                                                commit : commitPopupParams
    821822
     
    829830                                                                                        {
    830831                                                                                                type : 'checkbox',
    831832                                                                                                id : 'location',
    832                                                                                                 label : editor.lang.link.popupLocationBar,
     833                                                                                                label : linkLang.popupLocationBar,
    833834                                                                                                setup : setupPopupParams,
    834835                                                                                                commit : commitPopupParams
    835836
     
    837838                                                                                        {
    838839                                                                                                type : 'checkbox',
    839840                                                                                                id : 'toolbar',
    840                                                                                                 label : editor.lang.link.popupToolbar,
     841                                                                                                label : linkLang.popupToolbar,
    841842                                                                                                setup : setupPopupParams,
    842843                                                                                                commit : commitPopupParams
    843844
     
    851852                                                                                        {
    852853                                                                                                type : 'checkbox',
    853854                                                                                                id : 'menubar',
    854                                                                                                 label : editor.lang.link.popupMenuBar,
     855                                                                                                label : linkLang.popupMenuBar,
    855856                                                                                                setup : setupPopupParams,
    856857                                                                                                commit : commitPopupParams
    857858
     
    859860                                                                                        {
    860861                                                                                                type : 'checkbox',
    861862                                                                                                id : 'fullscreen',
    862                                                                                                 label : editor.lang.link.popupFullScreen,
     863                                                                                                label : linkLang.popupFullScreen,
    863864                                                                                                setup : setupPopupParams,
    864865                                                                                                commit : commitPopupParams
    865866
     
    873874                                                                                        {
    874875                                                                                                type : 'checkbox',
    875876                                                                                                id : 'scrollbars',
    876                                                                                                 label : editor.lang.link.popupScrollBars,
     877                                                                                                label : linkLang.popupScrollBars,
    877878                                                                                                setup : setupPopupParams,
    878879                                                                                                commit : commitPopupParams
    879880
     
    881882                                                                                        {
    882883                                                                                                type : 'checkbox',
    883884                                                                                                id : 'dependent',
    884                                                                                                 label : editor.lang.link.popupDependent,
     885                                                                                                label : linkLang.popupDependent,
    885886                                                                                                setup : setupPopupParams,
    886887                                                                                                commit : commitPopupParams
    887888
     
    896897                                                                                                type :  'text',
    897898                                                                                                widths : [ '30%', '70%' ],
    898899                                                                                                labelLayout : 'horizontal',
    899                                                                                                 label : editor.lang.link.popupWidth,
     900                                                                                                label : linkLang.popupWidth,
    900901                                                                                                id : 'width',
    901902                                                                                                setup : setupPopupParams,
    902903                                                                                                commit : commitPopupParams
     
    906907                                                                                                type :  'text',
    907908                                                                                                labelLayout : 'horizontal',
    908909                                                                                                widths : [ '55%', '45%' ],
    909                                                                                                 label : editor.lang.link.popupLeft,
     910                                                                                                label : linkLang.popupLeft,
    910911                                                                                                id : 'left',
    911912                                                                                                setup : setupPopupParams,
    912913                                                                                                commit : commitPopupParams
     
    922923                                                                                                type :  'text',
    923924                                                                                                labelLayout : 'horizontal',
    924925                                                                                                widths : [ '30%', '70%' ],
    925                                                                                                 label : editor.lang.link.popupHeight,
     926                                                                                                label : linkLang.popupHeight,
    926927                                                                                                id : 'height',
    927928                                                                                                setup : setupPopupParams,
    928929                                                                                                commit : commitPopupParams
     
    931932                                                                                        {
    932933                                                                                                type :  'text',
    933934                                                                                                labelLayout : 'horizontal',
    934                                                                                                 label : editor.lang.link.popupTop,
     935                                                                                                label : linkLang.popupTop,
    935936                                                                                                widths : [ '55%', '45%' ],
    936937                                                                                                id : 'top',
    937938                                                                                                setup : setupPopupParams,
     
    948949                        },
    949950                        {
    950951                                id : 'upload',
    951                                 label : editor.lang.link.upload,
    952                                 title : editor.lang.link.upload,
     952                                label : linkLang.upload,
     953                                title : linkLang.upload,
    953954                                hidden : true,
    954955                                filebrowser : 'uploadButton',
    955956                                elements :
     
    957958                                        {
    958959                                                type : 'file',
    959960                                                id : 'upload',
    960                                                 label : editor.lang.common.upload,
     961                                                label : commonLang.upload,
    961962                                                style: 'height:40px',
    962963                                                size : 29
    963964                                        },
    964965                                        {
    965966                                                type : 'fileButton',
    966967                                                id : 'uploadButton',
    967                                                 label : editor.lang.common.uploadSubmit,
     968                                                label : commonLang.uploadSubmit,
    968969                                                filebrowser : 'info:url',
    969970                                                'for' : [ 'upload', 'upload' ]
    970971                                        }
     
    972973                        },
    973974                        {
    974975                                id : 'advanced',
    975                                 label : editor.lang.link.advanced,
    976                                 title : editor.lang.link.advanced,
     976                                label : linkLang.advanced,
     977                                title : linkLang.advanced,
    977978                                elements :
    978979                                [
    979980                                        {
     
    989990                                                                        {
    990991                                                                                type : 'text',
    991992                                                                                id : 'advId',
    992                                                                                 label : editor.lang.link.id,
     993                                                                                label : linkLang.id,
    993994                                                                                setup : setupAdvParams,
    994995                                                                                commit : commitAdvParams
    995996                                                                        },
    996997                                                                        {
    997998                                                                                type : 'select',
    998999                                                                                id : 'advLangDir',
    999                                                                                 label : editor.lang.link.langDir,
     1000                                                                                label : linkLang.langDir,
    10001001                                                                                'default' : '',
    10011002                                                                                style : 'width:110px',
    10021003                                                                                items :
    10031004                                                                                [
    1004                                                                                         [ editor.lang.common.notSet, '' ],
    1005                                                                                         [ editor.lang.link.langDirLTR, 'ltr' ],
    1006                                                                                         [ editor.lang.link.langDirRTL, 'rtl' ]
     1005                                                                                        [ commonLang.notSet, '' ],
     1006                                                                                        [ linkLang.langDirLTR, 'ltr' ],
     1007                                                                                        [ linkLang.langDirRTL, 'rtl' ]
    10071008                                                                                ],
    10081009                                                                                setup : setupAdvParams,
    10091010                                                                                commit : commitAdvParams
     
    10121013                                                                                type : 'text',
    10131014                                                                                id : 'advAccessKey',
    10141015                                                                                width : '80px',
    1015                                                                                 label : editor.lang.link.acccessKey,
     1016                                                                                label : linkLang.acccessKey,
    10161017                                                                                maxLength : 1,
    10171018                                                                                setup : setupAdvParams,
    10181019                                                                                commit : commitAdvParams
     
    10271028                                                                [
    10281029                                                                        {
    10291030                                                                                type : 'text',
    1030                                                                                 label : editor.lang.link.name,
     1031                                                                                label : linkLang.name,
    10311032                                                                                id : 'advName',
    10321033                                                                                setup : setupAdvParams,
    10331034                                                                                commit : commitAdvParams
     
    10351036                                                                        },
    10361037                                                                        {
    10371038                                                                                type : 'text',
    1038                                                                                 label : editor.lang.link.langCode,
     1039                                                                                label : linkLang.langCode,
    10391040                                                                                id : 'advLangCode',
    10401041                                                                                width : '110px',
    10411042                                                                                'default' : '',
     
    10451046                                                                        },
    10461047                                                                        {
    10471048                                                                                type : 'text',
    1048                                                                                 label : editor.lang.link.tabIndex,
     1049                                                                                label : linkLang.tabIndex,
    10491050                                                                                id : 'advTabIndex',
    10501051                                                                                width : '80px',
    10511052                                                                                maxLength : 5,
     
    10691070                                                                [
    10701071                                                                        {
    10711072                                                                                type : 'text',
    1072                                                                                 label : editor.lang.link.advisoryTitle,
     1073                                                                                label : linkLang.advisoryTitle,
    10731074                                                                                'default' : '',
    10741075                                                                                id : 'advTitle',
    10751076                                                                                setup : setupAdvParams,
     
    10781079                                                                        },
    10791080                                                                        {
    10801081                                                                                type : 'text',
    1081                                                                                 label : editor.lang.link.advisoryContentType,
     1082                                                                                label : linkLang.advisoryContentType,
    10821083                                                                                'default' : '',
    10831084                                                                                id : 'advContentType',
    10841085                                                                                setup : setupAdvParams,
     
    10941095                                                                [
    10951096                                                                        {
    10961097                                                                                type : 'text',
    1097                                                                                 label : editor.lang.link.cssClasses,
     1098                                                                                label : linkLang.cssClasses,
    10981099                                                                                'default' : '',
    10991100                                                                                id : 'advCSSClasses',
    11001101                                                                                setup : setupAdvParams,
     
    11031104                                                                        },
    11041105                                                                        {
    11051106                                                                                type : 'text',
    1106                                                                                 label : editor.lang.link.charset,
     1107                                                                                label : linkLang.charset,
    11071108                                                                                'default' : '',
    11081109                                                                                id : 'advCharset',
    11091110                                                                                setup : setupAdvParams,
     
    11181119                                                                [
    11191120                                                                        {
    11201121                                                                                type : 'text',
    1121                                                                                 label : editor.lang.link.styles,
     1122                                                                                label : linkLang.styles,
    11221123                                                                                'default' : '',
    11231124                                                                                id : 'advStyles',
    11241125                                                                                setup : setupAdvParams,
     
    13871388                {
    13881389                        var linkType = this.getContentElement( 'info', 'linkType' ),
    13891390                                        urlField;
    1390                         if ( linkType && linkType.getValue( ) == 'url' )
     1391                        if ( linkType && linkType.getValue() == 'url' )
    13911392                        {
    13921393                                urlField = this.getContentElement( 'info', 'url' );
    13931394                                urlField.select();
  • _source/plugins/list/plugin.js

     
    8080                                indentLevel = Math.max( listArray[ baseIndex ].indent, 0 ),
    8181                                currentListItem = null,
    8282                                paragraphName = ( paragraphMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
    83                         while ( true )
     83                        while ( 1 )
    8484                        {
    8585                                var item = listArray[ currentIndex ];
    8686                                if ( item.indent == indentLevel )
    8787                                {
    8888                                        if ( !rootNode || listArray[ currentIndex ].parent.getName() != rootNode.getName() )
    8989                                        {
    90                                                 rootNode = listArray[ currentIndex ].parent.clone( false, true );
     90                                                rootNode = listArray[ currentIndex ].parent.clone( false, 1 );
    9191                                                retval.append( rootNode );
    9292                                        }
    93                                         currentListItem = rootNode.append( item.element.clone( false, true ) );
     93                                        currentListItem = rootNode.append( item.element.clone( 0, 1 ) );
    9494                                        for ( var i = 0 ; i < item.contents.length ; i++ )
    95                                                 currentListItem.append( item.contents[i].clone( true, true ) );
     95                                                currentListItem.append( item.contents[i].clone( 1, 1 ) );
    9696                                        currentIndex++;
    9797                                }
    9898                                else if ( item.indent == Math.max( indentLevel, 0 ) + 1 )
     
    127127                                        }
    128128
    129129                                        for ( i = 0 ; i < item.contents.length ; i++ )
    130                                                 currentListItem.append( item.contents[i].clone( true, true ) );
     130                                                currentListItem.append( item.contents[i].clone( 1, 1 ) );
    131131
    132132                                        if ( currentListItem.type == CKEDITOR.NODE_DOCUMENT_FRAGMENT
    133133                                                 && currentIndex != listArray.length - 1 )
     
    446446                                                enclosedNode = range && range.getEnclosedNode();
    447447                                        if ( enclosedNode && enclosedNode.is
    448448                                                && this.type == enclosedNode.getName() )
    449                                         {
    450                                                 setState.call( this, editor, CKEDITOR.TRISTATE_ON );
    451                                         }
     449                                                        setState.call( this, editor, CKEDITOR.TRISTATE_ON );
    452450                                }
    453451                        }
    454452
     
    490488                                                pathElements = path.elements,
    491489                                                pathElementsCount = pathElements.length,
    492490                                                listNode = null,
    493                                                 processedFlag = false,
     491                                                processedFlag = 0,
    494492                                                blockLimit = path.blockLimit,
    495493                                                element;
    496494
     
    516514                                                                listGroups.push( groupObj );
    517515                                                                CKEDITOR.dom.element.setMarker( database, element, 'list_group_object', groupObj );
    518516                                                        }
    519                                                         processedFlag = true;
     517                                                        processedFlag = 1;
    520518                                                        break;
    521519                                                }
    522520                                        }
     
    569567                                        {
    570568                                                sibling.remove();
    571569                                                // Move children order by merge direction.(#3820)
    572                                                 sibling.moveChildren( listNode, rtl ? true : false );
     570                                                sibling.moveChildren( listNode, rtl );
    573571                                        }
    574572                                } )();
    575                                 mergeSibling( true );
     573                                mergeSibling( 1 );
    576574                        }
    577575
    578576                        // Clean up, restore selection and update toolbar button states.
  • _source/plugins/listblock/plugin.js

     
    8181                                        add : function( value, html, title )
    8282                                        {
    8383                                                var pendingHtml = this._.pendingHtml,
    84                                                         id = 'cke_' + CKEDITOR.tools.getNextNumber();
     84                                                        id = CKEDITOR.tools.getNextId();
    8585
    8686                                                if ( !this._.started )
    8787                                                {
     
    109109                                        {
    110110                                                this._.close();
    111111
    112                                                 var id = 'cke_' + CKEDITOR.tools.getNextNumber();
     112                                                var id = CKEDITOR.tools.getNextId();
    113113
    114114                                                this._.groups[ title ] = id;
    115115
  • _source/plugins/liststyle/dialogs/liststyle.js

     
    1212                catch( e ) { return null; }
    1313
    1414                range.shrink( CKEDITOR.SHRINK_TEXT );
    15                 return range.getCommonAncestor().getAscendant( listTag, true );
     15                return range.getCommonAncestor().getAscendant( listTag, 1 );
    1616        }
    1717
    1818        var mapListStyle = {
     
    2828
    2929        function listStyle( editor, startupPage )
    3030        {
     31                var lang = editor.lang.list;
    3132                if ( startupPage == 'bulletedListStyle' )
    3233                {
    3334                        return {
    34                                 title : editor.lang.list.bulletedTitle,
     35                                title : lang.bulletedTitle,
    3536                                minWidth : 300,
    3637                                minHeight : 50,
    3738                                contents :
     
    4344                                                [
    4445                                                        {
    4546                                                                type : 'select',
    46                                                                 label : editor.lang.list.type,
     47                                                                label : lang.type,
    4748                                                                id : 'type',
    4849                                                                style : 'width: 150px; margin: auto;',
    4950                                                                items :
    5051                                                                [
    51                                                                         [ editor.lang.list.notset, '' ],
    52                                                                         [ editor.lang.list.circle, 'circle' ],
    53                                                                         [ editor.lang.list.disc,  'disc' ],
    54                                                                         [ editor.lang.list.square, 'square' ]
     52                                                                        [ lang.notset, '' ],
     53                                                                        [ lang.circle, 'circle' ],
     54                                                                        [ lang.disc,  'disc' ],
     55                                                                        [ lang.square, 'square' ]
    5556                                                                ],
    5657                                                                setup : function( element )
    5758                                                                {
     
    9596
    9697                        var listStyleOptions =
    9798                        [
    98                                 [ editor.lang.list.notset, '' ],
    99                                 [ editor.lang.list.lowerRoman, 'lower-roman' ],
    100                                 [ editor.lang.list.upperRoman, 'upper-roman' ],
    101                                 [ editor.lang.list.lowerAlpha, 'lower-alpha' ],
    102                                 [ editor.lang.list.upperAlpha, 'upper-alpha' ],
    103                                 [ editor.lang.list.decimal, 'decimal' ]
     99                                [ lang.notset, '' ],
     100                                [ lang.lowerRoman, 'lower-roman' ],
     101                                [ lang.upperRoman, 'upper-roman' ],
     102                                [ lang.lowerAlpha, 'lower-alpha' ],
     103                                [ lang.upperAlpha, 'upper-alpha' ],
     104                                [ lang.decimal, 'decimal' ]
    104105                        ];
    105106
    106107                        if ( !CKEDITOR.env.ie || CKEDITOR.env.version > 7 )
    107108                        {
    108109                                listStyleOptions.concat( [
    109                                         [ editor.lang.list.armenian, 'armenian' ],
    110                                         [ editor.lang.list.decimalLeadingZero, 'decimal-leading-zero' ],
    111                                         [ editor.lang.list.georgian, 'georgian' ],
    112                                         [ editor.lang.list.lowerGreek, 'lower-greek' ]
     110                                        [ lang.armenian, 'armenian' ],
     111                                        [ lang.decimalLeadingZero, 'decimal-leading-zero' ],
     112                                        [ lang.georgian, 'georgian' ],
     113                                        [ lang.lowerGreek, 'lower-greek' ]
    113114                                ]);
    114115                        }
    115116
    116117                        return {
    117                                 title : editor.lang.list.numberedTitle,
     118                                title : lang.numberedTitle,
    118119                                minWidth : 300,
    119120                                minHeight : 50,
    120121                                contents :
     
    130131                                                                children :
    131132                                                                [
    132133                                                                        {
    133                                                                                 label : editor.lang.list.start,
     134                                                                                label : lang.start,
    134135                                                                                type : 'text',
    135136                                                                                id : 'start',
    136                                                                                 validate : CKEDITOR.dialog.validate.integer( editor.lang.list.validateStartNumber ),
     137                                                                                validate : CKEDITOR.dialog.validate.integer( lang.validateStartNumber ),
    137138                                                                                setup : function( element )
    138139                                                                                {
    139140                                                                                        var value = element.getAttribute( 'start' ) || 1;
     
    146147                                                                        },
    147148                                                                        {
    148149                                                                                type : 'select',
    149                                                                                 label : editor.lang.list.type,
     150                                                                                label : lang.type,
    150151                                                                                id : 'type',
    151152                                                                                style : 'width: 100%;',
    152153                                                                                items : listStyleOptions,
  • _source/plugins/maximize/plugin.js

     
    1010                if ( !formElement || formElement.type != CKEDITOR.NODE_ELEMENT || formElement.getName() != 'form' )
    1111                        return [];
    1212
    13                 var hijackRecord = [];
    14                 var hijackNames = [ 'style', 'className' ];
     13                var hijackRecord = [],
     14                        hijackNames = [ 'style', 'className' ];
    1515                for ( var i = 0 ; i < hijackNames.length ; i++ )
    1616                {
    1717                        var name = hijackNames[i];
     
    129129                init : function( editor )
    130130                {
    131131                        var lang = editor.lang;
    132                         var mainDocument = CKEDITOR.document;
    133                         var mainWindow = mainDocument.getWindow();
     132                        var mainDocument = CKEDITOR.document,
     133                                mainWindow = mainDocument.getWindow();
    134134
    135135                        // Saved selection and scroll position for the editing area.
    136                         var savedSelection;
    137                         var savedScroll;
     136                        var savedSelection,
     137                                savedScroll;
    138138
    139139                        // Saved scroll position for the outer window.
    140140                        var outerScroll;
  • _source/plugins/menu/plugin.js

     
    190190                                        this._.itemOverFn = CKEDITOR.tools.addFunction( function( index )
    191191                                                {
    192192                                                        clearTimeout( this._.showSubTimeout );
    193                                                         this._.showSubTimeout = CKEDITOR.tools.setTimeout( this._.showSubMenu, editor.config.menu_subMenuDelay, this, [ index ] );
     193                                                        this._.showSubTimeout = CKEDITOR.tools.setTimeout( this._.showSubMenu, editor.config.menu_subMenuDelay || 400, this, [ index ] );
    194194                                                },
    195                                                 this);
     195                                                this );
    196196
    197197                                        this._.itemOutFn = CKEDITOR.tools.addFunction( function( index )
    198198                                                {
    199199                                                        clearTimeout( this._.showSubTimeout );
    200200                                                },
    201                                                 this);
     201                                                this );
    202202
    203203                                        this._.itemClickFn = CKEDITOR.tools.addFunction( function( index )
    204204                                                {
     
    215215                                                        else
    216216                                                                this.onClick && this.onClick( item );
    217217                                                },
    218                                                 this);
     218                                                this );
    219219                                }
    220220
    221221                                // Put the items in the right order.
    222222                                sortItems( items );
    223223
    224                                 var chromeRoot = editor.container.getChild( 1 );
    225                                 var mixedContentClass = chromeRoot.hasClass( 'cke_mixed_dir_content' ) ? ' cke_mixed_dir_content' : '';
     224                                var chromeRoot = editor.container.getChild( 1 ),
     225                                        mixedContentClass = chromeRoot.hasClass( 'cke_mixed_dir_content' ) ? ' cke_mixed_dir_content' : '';
    226226
    227227                                // Build the HTML that composes the menu and its items.
    228228                                var output = [ '<div class="cke_menu' + mixedContentClass + '" role="presentation">' ];
     
    390390 * // Remove the submenu delay.
    391391 * config.menu_subMenuDelay = 0;
    392392 */
    393 CKEDITOR.config.menu_subMenuDelay = 400;
    394393
    395394/**
    396395 * A comma separated list of items group names to be displayed in the context
  • _source/plugins/newpage/plugin.js

     
    1919                                exec : function( editor )
    2020                                {
    2121                                        var command = this;
    22                                         editor.setData( editor.config.newpage_html, function()
     22                                        editor.setData( editor.config.newpage_html || '', function()
    2323                                        {
    2424                                                // Save the undo snapshot after all document changes are affected. (#4889)
    2525                                                setTimeout( function ()
     
    5151 * @example
    5252 * config.newpage_html = '&lt;p&gt;Type your text here.&lt;/p&gt;';
    5353 */
    54 CKEDITOR.config.newpage_html = '';
  • _source/plugins/panel/plugin.js

     
    3131                        css : []
    3232                });
    3333
    34         this.id = CKEDITOR.tools.getNextNumber();
     34        this.id = CKEDITOR.tools.getNextId();
    3535        this.document = document;
    3636
    3737        this._ =
     
    7373         */
    7474        render : function( editor, output )
    7575        {
    76                 var id = 'cke_' + this.id;
     76                var id = this.id;
    7777
    7878                output.push(
    7979                        '<div class="', editor.skinClass ,'"' +
     
    130130                {
    131131                        if ( this.forceIFrame || this.css.length )
    132132                        {
    133                                 var iframe = this.document.getById( 'cke_' + this.id + '_frame' ),
     133                                var iframe = this.document.getById( this.id + '_frame' ),
    134134                                        parentDiv = iframe.getParent(),
    135135                                        dir = parentDiv.getAttribute( 'dir' ),
    136136                                        className = parentDiv.getParent().getAttribute( 'class' ),
     
    173173                                doc.on( 'keydown', function( evt )
    174174                                        {
    175175                                                var keystroke = evt.data.getKeystroke(),
    176                                                         dir = this.document.getById( 'cke_' + this.id ).getAttribute( 'dir' );
     176                                                        dir = this.document.getById( this.id ).getAttribute( 'dir' );
    177177
    178178                                                // Delegate key processing to block.
    179179                                                if ( this._.onKeyDown && this._.onKeyDown( keystroke ) === false )
     
    186186                                                if ( keystroke == 27 || keystroke == ( dir == 'rtl' ? 39 : 37 ) )
    187187                                                {
    188188                                                        if ( this.onEscape && this.onEscape( keystroke ) === false )
    189                                                                 evt.data.preventDefault( );
     189                                                                evt.data.preventDefault();
    190190                                                }
    191191                                        },
    192192                                        this );
     
    195195                                holder.unselectable();
    196196                        }
    197197                        else
    198                                 holder = this.document.getById( 'cke_' + this.id );
     198                                holder = this.document.getById( this.id );
    199199
    200200                        this._.holder = holder;
    201201                }
     
    225225                        block = blocks[ name ],
    226226                        current = this._.currentBlock,
    227227                        holder = this.forceIFrame ?
    228                                 this.document.getById( 'cke_' + this.id + '_frame' )
     228                                this.document.getById( this.id + '_frame' )
    229229                                : this._.holder;
    230230
    231231                // Disable context menu for block panel.
  • _source/plugins/popup/plugin.js

     
    5454                        popupWindow.focus();
    5555                        popupWindow.location.href = url;
    5656                }
    57                 catch (e)
     57                catch ( e )
    5858                {
    5959                        popupWindow = window.open( url, null, options, true );
    6060                }
  • _source/plugins/removeformat/plugin.js

     
    3535                                        ( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) );
    3636
    3737                                var filter = CKEDITOR.plugins.removeformat.filter;
    38                                 var ranges = editor.getSelection().getRanges( true ),
     38                                var ranges = editor.getSelection().getRanges( 1 ),
    3939                                        iterator = ranges.createIterator(),
    4040                                        range;
    4141
     
    5050                                        var bookmark = range.createBookmark();
    5151
    5252                                        // The style will be applied within the bookmark boundaries.
    53                                         var startNode   = bookmark.startNode;
    54                                         var endNode             = bookmark.endNode;
     53                                        var startNode   = bookmark.startNode,
     54                                                endNode         = bookmark.endNode;
    5555
    5656                                        // We need to check the selection boundaries (bookmark spans) to break
    5757                                        // the code in a way that we can properly remove partially selected nodes.
     
    6666                                        var breakParent = function( node )
    6767                                        {
    6868                                                // Let's start checking the start boundary.
    69                                                 var path = new CKEDITOR.dom.elementPath( node );
    70                                                 var pathElements = path.elements;
     69                                                var path = new CKEDITOR.dom.elementPath( node ),
     70                                                        pathElements = path.elements;
    7171
    7272                                                for ( var i = 1, pathElement ; pathElement = pathElements[ i ] ; i++ )
    7373                                                {
     
    103103                                                {
    104104                                                        // Remove elements nodes that match with this style rules.
    105105                                                        if ( tagsRegex.test( currentNode.getName() ) )
    106                                                                 currentNode.remove( true );
     106                                                                currentNode.remove( 1 );
    107107                                                        else
    108108                                                        {
    109109                                                                currentNode.removeAttributes( removeAttributes );
  • _source/plugins/resize/plugin.js

     
    8383                                        if ( event.data.space == 'bottom' )
    8484                                        {
    8585                                                var direction = '';
    86                                                 if ( resizeHorizontal && !resizeVertical)
     86                                                if ( resizeHorizontal && !resizeVertical )
    8787                                                        direction = ' cke_resizer_horizontal';
    88                                                 if ( !resizeHorizontal && resizeVertical)
     88                                                if ( !resizeHorizontal && resizeVertical )
    8989                                                        direction = ' cke_resizer_vertical';
    9090
    9191                                                event.data.html += '<div class="cke_resizer' + direction + '"' +
  • _source/plugins/scayt/dialogs/options.js

     
    1111                tags = [],
    1212                i,
    1313                contents = [],
    14                 userDicActive = false,
     14                userDicActive = 0,
    1515                dic_buttons = [
    1616                        // [0] contains buttons for creating
    1717                        "dic_create,dic_restore",
    1818                        // [1] contains buton for manipulation
    1919                        "dic_rename,dic_delete"
    2020                ],
    21                 optionsIds= [ 'mixedCase','mixedWithDigits','allCaps','ignoreDomainNames' ];
     21                optionsIds = [ 'mixedCase', 'mixedWithDigits', 'allCaps', 'ignoreDomainNames' ];
    2222
    2323        // common operations
    2424
    25         function getBOMAllOptions () {
     25        function getBOMAllOptions()
     26        {
    2627                 return document.forms.optionsbar["options"];
    2728        }
    28         function getBOMAllLangs () {
     29        function getBOMAllLangs()
     30        {
    2931                 return document.forms.languagesbar["scayt_lang"];
    3032        }
    3133
    32         function setCheckedValue(radioObj, newValue) {
    33                 if (!radioObj)
     34        function setCheckedValue( radioObj, newValue )
     35        {
     36                if ( !radioObj )
    3437                        return;
    3538                var radioLength = radioObj.length;
    36                 if (radioLength == undefined) {
    37                         radioObj.checked = (radioObj.value == newValue.toString());
     39                if ( radioLength == undefined )
     40                {
     41                        radioObj.checked = radioObj.value == newValue.toString();
    3842                        return;
    3943                }
    40                 for (var i = 0; i < radioLength; i++) {
     44                for ( var i = 0; i < radioLength; i++ )
     45                {
    4146                        radioObj[i].checked = false;
    42                         if (radioObj[i].value == newValue.toString()) {
     47                        if ( radioObj[i].value == newValue.toString() )
    4348                                radioObj[i].checked = true;
    44                         }
    4549                }
    4650        }
    4751
     52        var lang = editor.lang.scayt;
    4853        var tags_contents =  [
    4954                                {
    5055                                        id : 'options',
    51                                         label : editor.lang.scayt.optionsTab,
     56                                        label : lang.optionsTab,
    5257                                        elements : [
    5358                                                {
    5459                                                        type : 'html',
     
    7782                                },
    7883                                {
    7984                                        id : 'langs',
    80                                         label : editor.lang.scayt.languagesTab,
     85                                        label : lang.languagesTab,
    8186                                        elements : [
    8287                                                {
    8388                                                        type : 'html',
     
    9297                                },
    9398                                {
    9499                                        id : 'dictionaries',
    95                                         label : editor.lang.scayt.dictionariesTab,
     100                                        label : lang.dictionariesTab,
    96101                                        elements : [
    97102                                                {
    98103                                                        type : 'html',
     
    123128                                },
    124129                                {
    125130                                        id : 'about',
    126                                         label : editor.lang.scayt.aboutTab,
     131                                        label : lang.aboutTab,
    127132                                        elements : [
    128133                                                {
    129134                                                        type : 'html',
     
    136141                        ];
    137142
    138143        var dialogDefiniton = {
    139                 title : editor.lang.scayt.title,
     144                title : lang.title,
    140145                minWidth : 360,
    141146                minHeight : 220,
    142147                onShow : function()
     
    183188                onCancel: function()
    184189                {
    185190                        var o = getBOMAllOptions();
    186                         for (i in o)
     191                        for ( var i in o )
    187192                                o[i].checked = false;
    188193
    189                         setCheckedValue(getBOMAllLangs(),"");
     194                        setCheckedValue( getBOMAllLangs(), "" );
    190195                },
    191196                contents : contents
    192197        };
     
    195200
    196201        tags = CKEDITOR.plugins.scayt.uiTabs;
    197202
    198         for ( i in tags )
     203        for ( var i in tags )
    199204        {
    200205                if ( tags[ i ] == 1 )
    201206                        contents[ contents.length ] = tags_contents[ i ];
    202207        }
    203208        if ( tags[2] == 1 )
    204                 userDicActive = true;
     209                userDicActive = 1;
    205210
    206211
    207212        var init_with_captions = function()
    208213        {
    209214                var dialog = this,
    210215                        lang_list = dialog.data.scayt.getLangList(),
    211                         buttons = [ 'dic_create','dic_delete','dic_rename','dic_restore' ],
     216                        buttons = [ 'dic_create', 'dic_delete', 'dic_rename', 'dic_restore' ],
    212217                        labels = optionsIds,
    213218                        i;
    214219
     
    282287                };
    283288
    284289                var langList = [];
    285                 if (tags[1] ==1 )
     290                if ( tags[1] ==1 )
    286291                {
    287                         for ( i in lang_list.rtl )
     292                        for ( var i in lang_list.rtl )
    288293                                langList[ langList.length ] = createOption( i, lang_list.ltr );
    289294
    290295                        for ( i in lang_list.ltr )
     
    314319                        var err_massage = captions["err_dic_create"];
    315320                        var suc_massage = captions["succ_dic_create"];
    316321
    317                         window.scayt.createUserDictionary(dic_name,
    318                                 function(arg)
     322                        window.scayt.createUserDictionary( dic_name,
     323                                function( arg )
    319324                                {
    320325                                        hide_dic_buttons ( all_buttons );
    321326                                        display_dic_buttons ( dic_buttons[1] );
    322327                                        suc_massage = suc_massage.replace("%s" , arg.dname );
    323328                                        dic_success_message (suc_massage);
    324329                                },
    325                                 function(arg)
     330                                function( arg )
    326331                                {
    327332                                        err_massage = err_massage.replace("%s" ,arg.dname );
    328333                                        dic_error_message ( err_massage + "( "+ (arg.message || "") +")");
     
    336341                        // try to rename dictionary
    337342                        var err_massage = captions["err_dic_rename"] || "";
    338343                        var suc_massage = captions["succ_dic_rename"] || "";
    339                         window.scayt.renameUserDictionary(dic_name,
    340                                 function(arg)
     344                        window.scayt.renameUserDictionary( dic_name,
     345                                function( arg )
    341346                                        {
    342347                                                suc_massage = suc_massage.replace("%s" , arg.dname );
    343348                                                set_dic_name( dic_name );
    344349                                                dic_success_message ( suc_massage );
    345350                                        },
    346                                 function(arg)
     351                                function( arg )
    347352                                        {
    348353                                                err_massage = err_massage.replace("%s" , arg.dname  );
    349354                                                set_dic_name( dic_name );
     
    351356                                        });
    352357                };
    353358
    354                 dic.dic_delete = function ( el, dic_name , dic_buttons )
     359                dic.dic_delete = function( el, dic_name , dic_buttons )
    355360                {
    356361                        var all_buttons = dic_buttons[0] + ',' + dic_buttons[1];
    357362                        var err_massage = captions["err_dic_delete"];
     
    359364
    360365                        // try to delete dictionary
    361366                        window.scayt.deleteUserDictionary(
    362                                 function(arg)
     367                                function( arg )
    363368                                {
    364369                                        suc_massage = suc_massage.replace("%s" , arg.dname );
    365370                                        hide_dic_buttons ( all_buttons );
     
    367372                                        set_dic_name( "" ); // empty input field
    368373                                        dic_success_message( suc_massage );
    369374                                },
    370                                 function(arg)
     375                                function( arg )
    371376                                {
    372377                                        err_massage = err_massage.replace("%s" , arg.dname );
    373378                                        dic_error_message(err_massage);
    374379                                });
    375380                };
    376381
    377                 dic.dic_restore = dialog.dic_restore || function ( el, dic_name , dic_buttons )
     382                dic.dic_restore = dialog.dic_restore || function( el, dic_name , dic_buttons )
    378383                        {
    379384                                // try to restore existing dictionary
    380385                                var all_buttons = dic_buttons[0] + ',' + dic_buttons[1];
     
    382387                                var suc_massage = captions["succ_dic_restore"];
    383388
    384389                                window.scayt.restoreUserDictionary(dic_name,
    385                                         function(arg)
     390                                        function( arg )
    386391                                        {
    387392                                                suc_massage = suc_massage.replace("%s" , arg.dname );
    388393                                                hide_dic_buttons ( all_buttons );
    389394                                                display_dic_buttons(dic_buttons[1]);
    390395                                                dic_success_message( suc_massage );
    391396                                        },
    392                                         function(arg)
     397                                        function( arg )
    393398                                        {
    394399                                                err_massage = err_massage.replace("%s" , arg.dname );
    395400                                                dic_error_message( err_massage );
     
    408413                                var el = id = ev.data.getTarget().getParent();
    409414                                var id = el.getId();
    410415                                dic[ id ].apply( null, [ el, dic_name, dic_buttons ] );
    411                         }catch(err){
     416                        }
     417                        catch(err)
     418                        {
    412419                                dic_error_message(" Dictionary error. ");
    413420                        }
    414421
     
    431438        {
    432439                var dialog = this;
    433440                // for enabled options tab
    434                 if (tags[0] == 1){
     441                if ( tags[0] == 1 ){
    435442                        var opto = getBOMAllOptions();
    436443
    437444                        // Animate options.
     
    466473                //for enabled languages tab
    467474                if ( tags[1] == 1 )
    468475                {
    469                         var domLang = doc.getById("cke_option"+dialog.sLang);
    470                         setCheckedValue(domLang.$,dialog.sLang);
     476                        var domLang = doc.getById("cke_option" + dialog.sLang);
     477                        setCheckedValue( domLang.$,dialog.sLang );
    471478                }
    472479
    473480                // * user dictionary
     
    487494                                                display_dic_buttons( dic_buttons[0] );
    488495
    489496                                },
    490                                 function ()
     497                                function()
    491498                                {
    492499                                        doc.getById( 'dic_name' ).setValue("");
    493500                                });
     
    496503
    497504        };
    498505
    499         function dic_error_message ( m )
     506        function dic_error_message( m )
    500507        {
    501508                doc.getById('dic_message').setHtml('<span style="color:red;">' + m + '</span>' );
    502509        }
    503         function dic_success_message ( m )
     510        function dic_success_message( m )
    504511        {
    505512                doc.getById('dic_message').setHtml('<span style="color:blue;">' + m + '</span>') ;
    506513        }
    507         function display_dic_buttons ( sIds )
     514        function display_dic_buttons( sIds )
    508515        {
    509 
    510516                sIds = String( sIds );
    511517                var aIds = sIds.split(',');
    512518                for ( var i=0, l = aIds.length; i < l ; i+=1)
    513                 {
    514519                        doc.getById( aIds[i] ).$.style.display = "inline";
    515                 }
    516 
    517520        }
    518         function hide_dic_buttons ( sIds )
     521        function hide_dic_buttons( sIds )
    519522        {
    520523                sIds = String( sIds );
    521524                var aIds = sIds.split(',');
    522525                for ( var i = 0, l = aIds.length; i < l ; i += 1 )
    523                 {
    524526                        doc.getById( aIds[i] ).$.style.display = "none";
    525                 }
    526527        }
    527         function set_dic_name ( dic_name )
     528        function set_dic_name( dic_name )
    528529        {
    529530                doc.getById('dic_name').$.value= dic_name;
    530531        }
  • _source/plugins/scayt/plugin.js

     
    1010
    1111(function()
    1212{
    13         var commandName         = 'scaytcheck',
    14                 openPage                = '';
     13        var commandName  = 'scaytcheck',
     14                openPage = '';
    1515
    1616        // Checks if a value exists in an array
    17         function in_array(needle, haystack)
     17        function in_array( needle, haystack )
    1818        {
    19                 var found = false, key;
    20                 for (key in haystack)
     19                var found = 0,
     20                        key;
     21                for ( key in haystack )
    2122                {
    22                         if ((haystack[key] === needle) || ( haystack[key] == needle))
     23                        if ( haystack[ key ] == needle )
    2324                        {
    24                                 found = true;
     25                                found = 1;
    2526                                break;
    2627                        }
    2728                }
     
    3435
    3536                var createInstance = function() // Create new instance every time Document is created.
    3637                {
     38                        var config = editor.config;
    3739                        // Initialise Scayt instance.
    3840                        var oParams = {};
    3941                        // Get the iframe.
    4042                        oParams.srcNodeRef = editor.document.getWindow().$.frameElement;
    4143                        // syntax : AppName.AppVersion@AppRevision
    4244                        oParams.assocApp  = 'CKEDITOR.' + CKEDITOR.version + '@' + CKEDITOR.revision;
    43                         oParams.customerid = editor.config.scayt_customerid  || '1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';
    44                         oParams.customDictionaryIds = editor.config.scayt_customDictionaryIds || '';
    45                         oParams.userDictionaryName = editor.config.scayt_userDictionaryName || '';
    46                         oParams.sLang = editor.config.scayt_sLang || 'en_US';
     45                        oParams.customerid = config.scayt_customerid  || '1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';
     46                        oParams.customDictionaryIds = config.scayt_customDictionaryIds || '';
     47                        oParams.userDictionaryName = config.scayt_userDictionaryName || '';
     48                        oParams.sLang = config.scayt_sLang || 'en_US';
    4749
    4850                        // Introduce SCAYT onLoad callback. (#5632)
    4951                        oParams.onLoad = function()
     
    6668                        };
    6769
    6870                        var scayt_custom_params = window.scayt_custom_params;
    69                         if ( typeof scayt_custom_params == 'object')
     71                        if ( typeof scayt_custom_params == 'object' )
    7072                        {
    7173                                for ( var k in scayt_custom_params )
    72                                 {
    7374                                        oParams[ k ] = scayt_custom_params[ k ];
    74                                 }
    7575                        }
    7676                        // needs for restoring a specific scayt control settings
    77                         if ( plugin.getControlId(editor) )
    78                                 oParams.id = plugin.getControlId(editor);
     77                        if ( plugin.getControlId( editor ) )
     78                                oParams.id = plugin.getControlId( editor );
    7979
    8080                        var scayt_control = new window.scayt( oParams );
    8181
     
    8585                        } );
    8686
    8787                        // Copy config.
    88                         var     lastInstance = plugin.instances[ editor.name ];
     88                        var lastInstance = plugin.instances[ editor.name ];
    8989                        if ( lastInstance )
    9090                        {
    9191                                scayt_control.sLang = lastInstance.sLang;
     
    100100                        var uiTabs = window.scayt.uiTags;
    101101                        var fTabs  = [];
    102102
    103                         for (var i = 0,l=4; i<l; i++)
     103                        for ( var i = 0, l=4; i < l; i++ )
    104104                            fTabs.push( uiTabs[i] && plugin.uiTabs[i] );
    105105
    106106                        plugin.uiTabs = fTabs;
     
    132132
    133133                editor.on( 'beforeCommandExec', function( ev )          // Disable SCAYT before Source command execution.
    134134                        {
    135                                 if ( (ev.data.name == 'source' ||  ev.data.name == 'newpage') && editor.mode == 'wysiwyg' )
     135                                if ( ( ev.data.name == 'source' || ev.data.name == 'newpage' ) && editor.mode == 'wysiwyg' )
    136136                                {
    137137                                        var scayt_instance = plugin.getScayt( editor );
    138138                                        if ( scayt_instance )
     
    257257
    258258                // Override Image.equals method avoid CK snapshot module to add SCAYT markup to snapshots. (#5546)
    259259                var undoImagePrototype = CKEDITOR.plugins.undo.Image.prototype;
    260                 undoImagePrototype.equals =      CKEDITOR.tools.override( undoImagePrototype.equals, function( org )
     260                undoImagePrototype.equals = CKEDITOR.tools.override( undoImagePrototype.equals, function( org )
    261261                {
    262262                        return function( otherImage )
    263263                        {
     
    298298                        for ( var infoOpt in o )
    299299                                this.controlInfo[ editor.name ][ infoOpt ] = o[ infoOpt ];
    300300                },
    301                 isControlRestored : function ( editor )
     301                isControlRestored : function( editor )
    302302                {
    303303                        if ( editor &&
    304304                                        editor.name &&
     
    308308                        }
    309309                        return false;
    310310                },
    311                 markControlRestore : function ( editor )
     311                markControlRestore : function( editor )
    312312                {
    313                         this.setControlInfo( editor,{ restored:true } );
     313                        this.setControlInfo( editor, { restored:true } );
    314314                },
    315                 setControlId: function (editor, id)
     315                setControlId: function( editor, id )
    316316                {
    317                         this.setControlInfo( editor,{ id:id } );
     317                        this.setControlInfo( editor, { id:id } );
    318318                },
    319                 getControlId: function (editor)
     319                getControlId: function( editor )
    320320                {
    321321                        if ( editor &&
    322322                                        editor.name &&
     
    327327                        }
    328328                        return null;
    329329                },
    330                 setPaused: function ( editor , bool )
     330                setPaused: function( editor , bool )
    331331                {
    332                         this.setControlInfo( editor,{ paused:bool } );
     332                        this.setControlInfo( editor, { paused:bool } );
    333333                },
    334                 isPaused: function (editor)
     334                isPaused: function( editor )
    335335                {
    336336                        if ( editor &&
    337337                                        editor.name &&
    338338                                        this.controlInfo[editor.name] )
    339339                        {
    340                                 return this.controlInfo[editor.name].paused ;
     340                                return this.controlInfo[editor.name].paused;
    341341                        }
    342342                        return undefined;
    343343                },
     
    466466                                //   scayt_control.focus();
    467467                                //
    468468                                // now focus is set certainly
    469                                 scayt_control.focus( );
     469                                scayt_control.focus();
    470470                                scayt_control.setDisabled( isEnabled );
    471471                        }
    472472                        else if ( !editor.config.scayt_autoStartup && plugin.engineLoaded >= 0 )        // Load first time
     
    502502
    503503                init : function( editor )
    504504                {
    505                         var moreSuggestions = {};
    506                         var mainSuggestions = {};
     505                        var moreSuggestions = {},
     506                                mainSuggestions = {};
    507507
    508508                        // Scayt command.
    509509                        var command = editor.addCommand( commandName, commandDefinition );
     
    516516                        // string to array convert
    517517                        confuiTabs = confuiTabs.split( ',' );
    518518                        // check array length ! always must be 3 filled with 1 or 0
    519                         for (var i=0,l=3; i<l; i++)
     519                        for ( var i=0, l=3; i < l; i++ )
    520520                        {
    521                                 var flag = parseInt(confuiTabs[i] || '1' ,10);
     521                                var flag = parseInt( confuiTabs[i] || '1', 10 );
    522522                                uiTabs.push( flag );
    523523                        }
    524524
     
    527527                        // combine menu items to render
    528528                        var uiMuneItems = {};
    529529
     530                        var lang = editor.lang.scayt;
     531
    530532                        // always added
    531533                        uiMuneItems.scaytToggle =
    532534                                {
    533                                         label : editor.lang.scayt.enable,
     535                                        label : lang.enable,
    534536                                        command : commandName,
    535537                                        group : menuGroup
    536538                                };
    537539
    538                         if (uiTabs[0] == 1)
     540                        if ( uiTabs[0] == 1 )
    539541                                uiMuneItems.scaytOptions =
    540542                                {
    541                                         label : editor.lang.scayt.options,
     543                                        label : lang.options,
    542544                                        group : menuGroup,
    543545                                        onClick : function()
    544546                                        {
     
    547549                                        }
    548550                                };
    549551
    550                         if (uiTabs[1] == 1)
     552                        if ( uiTabs[1] == 1 )
    551553                                uiMuneItems.scaytLangs =
    552554                                {
    553                                         label : editor.lang.scayt.langs,
     555                                        label : lang.langs,
    554556                                        group : menuGroup,
    555557                                        onClick : function()
    556558                                        {
     
    558560                                                editor.openDialog( commandName );
    559561                                        }
    560562                                };
    561                         if (uiTabs[2] == 1)
     563                        if ( uiTabs[2] == 1 )
    562564                                uiMuneItems.scaytDict =
    563565                                {
    564                                         label : editor.lang.scayt.dictionariesTab,
     566                                        label : lang.dictionariesTab,
    565567                                        group : menuGroup,
    566568                                        onClick : function()
    567569                                        {
     
    579581                                                openPage = 'about';
    580582                                                editor.openDialog( commandName );
    581583                                        }
    582                                 }
    583                         ;
     584                                };
    584585
    585586                        uiTabs[3] = 1; // about us tab is always on
    586587                        plugin.uiTabs = uiTabs;
     
    589590
    590591                                editor.ui.add( 'Scayt', CKEDITOR.UI_MENUBUTTON,
    591592                                        {
    592                                                 label : editor.lang.scayt.title,
    593                                                 title : CKEDITOR.env.opera ? editor.lang.scayt.opera_title : editor.lang.scayt.title,
     593                                                label : lang.title,
     594                                                title : CKEDITOR.env.opera ? lang.opera_title : lang.title,
    594595                                                className : 'cke_button_scayt',
    595596                                                onRender: function()
    596597                                                {
     
    604605                                                {
    605606                                                        var isEnabled = plugin.isScaytEnabled( editor );
    606607
    607                                                         editor.getMenuItem( 'scaytToggle' ).label = editor.lang.scayt[ isEnabled ? 'disable' : 'enable' ];
     608                                                        editor.getMenuItem( 'scaytToggle' ).label = lang[ isEnabled ? 'disable' : 'enable' ];
    608609
    609610                                                        return {
    610611                                                                scaytToggle  : CKEDITOR.TRISTATE_OFF,
     
    673674                                                                        return {
    674675                                                                                exec: function()
    675676                                                                                {
    676                                                                                         scayt_control.replace(el, s);
     677                                                                                        scayt_control.replace( el, s );
    677678                                                                                }
    678679                                                                        };
    679680                                                                })( node, items_suggestion[i] );
     
    699700                                                        // Register the More suggestions group;
    700701                                                        editor.addMenuItem( 'scayt_moresuggest',
    701702                                                        {
    702                                                                 label : editor.lang.scayt.moreSuggestions,
     703                                                                label : lang.moreSuggestions,
    703704                                                                group : 'scayt_moresuggest',
    704705                                                                order : 10,
    705706                                                                getItems : function()
     
    717718                                                                        scayt_control.ignore( node );
    718719                                                                }
    719720                                                        };
    720                                                         addButtonCommand( editor, 'ignore', editor.lang.scayt.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1 );
     721                                                        addButtonCommand( editor, 'ignore', lang.ignore, 'scayt_ignore', ignore_command, 'scayt_control', 1 );
    721722                                                        mainSuggestions[ 'scayt_ignore' ] = CKEDITOR.TRISTATE_OFF;
    722723                                                }
    723724
     
    728729                                                                        scayt_control.ignoreAll( node );
    729730                                                                }
    730731                                                        };
    731                                                         addButtonCommand(editor, 'ignore_all', editor.lang.scayt.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2);
     732                                                        addButtonCommand(editor, 'ignore_all', lang.ignoreAll, 'scayt_ignore_all', ignore_all_command, 'scayt_control', 2);
    732733                                                        mainSuggestions['scayt_ignore_all'] = CKEDITOR.TRISTATE_OFF;
    733734                                                }
    734735
     
    739740                                                                        window.scayt.addWordToUserDictionary( node );
    740741                                                                }
    741742                                                        };
    742                                                         addButtonCommand(editor, 'add_word', editor.lang.scayt.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3);
     743                                                        addButtonCommand(editor, 'add_word', lang.addWord, 'scayt_add_word', addword_command, 'scayt_control', 3);
    743744                                                        mainSuggestions['scayt_add_word'] = CKEDITOR.TRISTATE_OFF;
    744745                                                }
    745746
  • _source/plugins/selection/plugin.js

     
    151151                                                body.on( 'focus', function()
    152152                                                        {
    153153                                                                // Enable selections to be saved.
    154                                                                 saveEnabled = true;
     154                                                                saveEnabled = 1;
    155155
    156156                                                                saveSelection();
    157157                                                        });
     
    164164                                                                        return;
    165165
    166166                                                                // Disable selections from being saved.
    167                                                                 saveEnabled = false;
     167                                                                saveEnabled = 0;
    168168                                                                restoreEnabled = 1;
    169169                                                        });
    170170
     
    185185
    186186                                                // Listening on document element ensures that
    187187                                                // scrollbar is included. (#5280)
    188                                                 html.on( 'mousedown', function ()
     188                                                html.on( 'mousedown', function()
    189189                                                {
    190190                                                        // Lock restore selection now, as we have
    191191                                                        // a followed 'click' event which introduce
     
    193193                                                        restoreEnabled = 0;
    194194                                                });
    195195
    196                                                 html.on( 'mouseup', function ()
     196                                                html.on( 'mouseup', function()
    197197                                                {
    198198                                                        restoreEnabled = 1;
    199199                                                });
     
    240240                                                                }
    241241                                                                scroll = null;
    242242
    243                                                                 saveEnabled = true;
     243                                                                saveEnabled = 1;
    244244                                                                setTimeout( function()
    245245                                                                        {
    246246                                                                                saveSelection( true );
     
    252252                                                body.on( 'keyup',
    253253                                                        function()
    254254                                                        {
    255                                                                 saveEnabled = true;
     255                                                                saveEnabled = 1;
    256256                                                                saveSelection();
    257257                                                        });
    258258
     
    263263
    264264                                                function disableSave()
    265265                                                {
    266                                                         saveEnabled = false;
     266                                                        saveEnabled = 0;
    267267                                                }
    268268
    269269                                                function saveSelection( testIt )
     
    405405                        return lockedSelection;
    406406
    407407                this.document = document;
    408                 this.isLocked = false;
     408                this.isLocked = 0;
    409409                this._ =
    410410                {
    411411                        cache : {}
     
    745745
    746746                                                // Drop range spans inside one ready-only node.
    747747                                                var parent = range.getCommonAncestor();
    748                                                 if ( parent.isReadOnly())
     748                                                if ( parent.isReadOnly() )
    749749                                                        ranges.splice( i, 1 );
    750750
    751751                                                if ( range.collapsed )
     
    855855                                                        // Decrease the range content to exclude particial
    856856                                                        // selected node on the start which doesn't have
    857857                                                        // visual impact. ( #3231 )
    858                                                         while ( true )
     858                                                        while ( 1 )
    859859                                                        {
    860860                                                                var startContainer = range.startContainer,
    861861                                                                        startOffset = range.startOffset;
     
    891891                                        if ( CKEDITOR.env.ie )
    892892                                        {
    893893                                                range = sel.createRange();
    894                                                 range.collapse( true );
     894                                                range.collapse( 1 );
    895895
    896896                                                node = range.parentElement();
    897897                                        }
     
    964964                        // The native selection is not available when locked.
    965965                        this._.cache.nativeSel = {};
    966966
    967                         this.isLocked = true;
     967                        this.isLocked = 1;
    968968
    969969                        // Save this selection inside the DOM document.
    970970                        this.document.setCustomData( 'cke_locked_selection', this );
     
    984984                                        var selectedElement = lockedSelection.getSelectedElement(),
    985985                                                ranges = !selectedElement && lockedSelection.getRanges();
    986986
    987                                         this.isLocked = false;
     987                                        this.isLocked = 0;
    988988                                        this.reset();
    989989
    990990                                        doc.getBody().focus();
     
    998998
    999999                        if  ( !lockedSelection || !restore )
    10001000                        {
    1001                                 this.isLocked = false;
     1001                                this.isLocked = 0;
    10021002                                this.reset();
    10031003                        }
    10041004                },
     
    10391039                                        range.addElement( element.$ );
    10401040                                        range.select();
    10411041                                }
    1042                                 catch(e)
     1042                                catch( e )
    10431043                                {
    10441044                                        // If failed, select it as a text range.
    10451045                                        range = this.document.$.body.createTextRange();
  • _source/plugins/showblocks/plugin.js

     
    153153 * @example
    154154 * config.startupOutlineBlocks = true;
    155155 */
    156 CKEDITOR.config.startupOutlineBlocks = false;
  • _source/plugins/smiley/dialogs/smiley.js

     
    5454                element = new CKEDITOR.dom.element( element );
    5555                var relative, nodeToMove;
    5656
    57                 var keystroke = ev.getKeystroke();
    58                 var rtl = editor.lang.dir == 'rtl';
     57                var keystroke = ev.getKeystroke(),
     58                        rtl = editor.lang.dir == 'rtl';
    5959                switch ( keystroke )
    6060                {
    6161                        // UP-ARROW
  • _source/plugins/specialchar/dialogs/specialchar.js

     
    112112                // Get an Anchor element.
    113113                var element = ev.getTarget();
    114114                var relative, nodeToMove;
    115                 var keystroke = ev.getKeystroke();
    116                 var rtl = editor.lang.dir == 'rtl';
     115                var keystroke = ev.getKeystroke(),
     116                        rtl = editor.lang.dir == 'rtl';
    117117
    118118                switch ( keystroke )
    119119                {
     
    347347                                                                focus : function()
    348348                                                                {
    349349                                                                        var firstChar = this.getElement().getElementsByTag( 'a' ).getItem( 0 );
    350                                                                         setTimeout(function()
     350                                                                        setTimeout( function()
    351351                                                                        {
    352352                                                                                firstChar.focus();
    353353                                                                                onFocus( null, firstChar );
  • _source/plugins/styles/plugin.js

     
    13211321                var selection = document.getSelection(),
    13221322                        // Bookmark the range so we can re-select it after processing.
    13231323                        bookmarks = selection.createBookmarks(),
    1324                         ranges = selection.getRanges( true ),
     1324                        ranges = selection.getRanges( 1 ),
    13251325                        func = remove ? this.removeFromRange : this.applyToRange,
    13261326                        range;
    13271327
  • _source/plugins/stylescombo/plugin.js

     
    2626                                                        styleName;
    2727
    2828                                                // Put all styles into an Array.
    29                                                 for ( var i = 0 ; i < stylesDefinitions.length ; i++ )
     29                                                for ( var i = 0, count = stylesDefinitions.length ; i < count ; i++ )
    3030                                                {
    3131                                                        var styleDefinition = stylesDefinitions[ i ];
    3232
     
    7171                                                                // Loop over the Array, adding all items to the
    7272                                                                // combo.
    7373                                                                var lastType;
    74                                                                 for ( var i = 0 ; i < stylesList.length ; i++ )
     74                                                                for ( var i = 0, count = stylesList.length ; i < count ; i++ )
    7575                                                                {
    7676                                                                        style = stylesList[ i ];
    7777                                                                        styleName = style._name;
     
    126126                                                                        elements = elementPath.elements;
    127127
    128128                                                                // For each element into the elements path.
    129                                                                 for ( var i = 0, element ; i < elements.length ; i++ )
     129                                                                for ( var i = 0, count = elements.length, element ; i < count ; i++ )
    130130                                                                {
    131131                                                                        element = elements[i];
    132132
     
    154154                                                if ( CKEDITOR.env.ie || CKEDITOR.env.webkit )
    155155                                                        editor.focus();
    156156
    157                                                 var selection = editor.getSelection();
    158 
    159                                                 var element = selection.getSelectedElement(),
     157                                                var selection = editor.getSelection(),
     158                                                        element = selection.getSelectedElement(),
    160159                                                        elementPath = new CKEDITOR.dom.elementPath( element || selection.getStartElement() );
    161160
    162161                                                var counter = [ 0, 0, 0, 0 ];
  • _source/plugins/tab/plugin.js

     
    3838                                if ( editor.focusManager.hasFocus )
    3939                                {
    4040                                        var sel = editor.getSelection(),
    41                                                         ancestor = sel.getCommonAncestor(),
    42                                                         cell;
     41                                                ancestor = sel.getCommonAncestor(),
     42                                                cell;
    4343
    4444                                        if ( ( cell = ( ancestor.getAscendant( 'td', true ) || ancestor.getAscendant( 'th', true ) ) ) )
    4545                                        {
  • _source/plugins/table/plugin.js

     
    5858                {
    5959                        editor.contextMenu.addListener( function( element, selection )
    6060                                {
    61                                         if ( !element || element.isReadOnly())
     61                                        if ( !element || element.isReadOnly() )
    6262                                                return null;
    6363
    64                                         var isTable     = element.is( 'table' ) || element.hasAscendant( 'table' );
     64                                        var isTable = element.hasAscendant( 'table', 1 );
    6565
    6666                                        if ( isTable )
    6767                                        {
  • _source/plugins/tableresize/plugin.js

     
    393393                                return;
    394394                }
    395395
    396                 target.getAscendant( 'table', true ).removeCustomData( '_cke_table_pillars' );
     396                target.getAscendant( 'table', 1 ).removeCustomData( '_cke_table_pillars' );
    397397                evt.removeListener();
    398398        }
    399399
     
    423423                                                        table,
    424424                                                        pillars;
    425425
    426                                                 if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', true ) )
     426                                                if ( !target.is( 'table' ) && !target.getAscendant( 'tbody', 1 ) )
    427427                                                        return;
    428428
    429                                                 table = target.getAscendant( 'table', true );
     429                                                table = target.getAscendant( 'table', 1 );
    430430
    431431                                                if ( !( pillars = table.getCustomData( '_cke_table_pillars' ) ) )
    432432                                                {
  • _source/plugins/tabletools/plugin.js

     
    146146                        return;
    147147
    148148                // Create a clone of the row.
    149                 var newRow = row.clone( true );
     149                var newRow = row.clone( 1 );
    150150
    151151                insertBefore ?
    152152                        newRow.insertBefore( row ) :
     
    216216        {
    217217                // Get the cell where the selection is placed in.
    218218                var startElement = selection.getStartElement();
    219                 var cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
     219                var cell = startElement.getAscendant( 'td', 1 ) || startElement.getAscendant( 'th', 1 );
    220220
    221221                if ( !cell )
    222222                        return;
     
    234234                        if ( $row.cells.length < ( cellIndex + 1 ) )
    235235                                continue;
    236236
    237                         cell = ( new CKEDITOR.dom.element( $row.cells[ cellIndex ] ) ).clone( false );
     237                        cell = ( new CKEDITOR.dom.element( $row.cells[ cellIndex ] ) ).clone( 0 );
    238238
    239239                        if ( !CKEDITOR.env.ie )
    240240                                cell.appendBogus();
     
    339339        function insertCell( selection, insertBefore )
    340340        {
    341341                var startElement = selection.getStartElement();
    342                 var cell = startElement.getAscendant( 'td', true ) || startElement.getAscendant( 'th', true );
     342                var cell = startElement.getAscendant( 'td', 1 ) || startElement.getAscendant( 'th', 1 );
    343343
    344344                if ( !cell )
    345345                        return;
  • _source/plugins/templates/dialogs/templates.js

     
    1515                                // clear loading wait text.
    1616                                container.setHtml( '' );
    1717
    18                                 for ( var i = 0 ; i < templatesDefinitions.length ; i++ )
     18                                for ( var i = 0, totalDefs = templatesDefinitions.length ; i < totalDefs ; i++ )
    1919                                {
    2020                                        var definition = CKEDITOR.getTemplates( templatesDefinitions[ i ] ),
    2121                                                imagesPath = definition.imagesPath,
     
    4444                                var html = '<table style="width:350px;" class="cke_tpl_preview" role="presentation"><tr>';
    4545
    4646                                if ( template.image && imagesPath )
    47                                         html += '<td class="cke_tpl_preview_img"><img src="' + CKEDITOR.getUrl( imagesPath + template.image ) + '"' + ( CKEDITOR.env.ie6Compat? ' onload="this.width=this.width"' : '' ) + ' alt="" title=""></td>';
     47                                        html += '<td class="cke_tpl_preview_img"><img src="' + CKEDITOR.getUrl( imagesPath + template.image ) + '"' + ( CKEDITOR.env.ie6Compat ? ' onload="this.width=this.width"' : '' ) + ' alt="" title=""></td>';
    4848
    4949                                html += '<td style="white-space:normal;"><span class="cke_tpl_title">' + template.title + '</span><br/>';
    5050
     
    8080                                                // Place the cursor at the first editable place.
    8181                                                var range = new CKEDITOR.dom.range( editor.document );
    8282                                                range.moveToElementEditStart( editor.document.getBody() );
    83                                                 range.select( true );
    84                                                 setTimeout( function ()
     83                                                range.select( 1 );
     84                                                setTimeout( function()
    8585                                                {
    8686                                                        editor.fire( 'saveSnapshot' );
    8787                                                }, 0 );
    88                                         } );
     88                                        });
    8989
    9090                                        editor.fire( 'saveSnapshot' );
    9191                                        editor.setData( html );
     
    146146
    147147                        var listContainer;
    148148
    149                         var templateListLabelId = 'cke_tpl_list_label_' + CKEDITOR.tools.getNextNumber();
     149                        var templateListLabelId = 'cke_tpl_list_label_' + CKEDITOR.tools.getNextNumber(),
     150                                lang = editor.lang.templates,
     151                                config = editor.config;
    150152                        return {
    151153                                title :editor.lang.templates.title,
    152154
     
    157159                                [
    158160                                        {
    159161                                                id :'selectTpl',
    160                                                 label : editor.lang.templates.title,
     162                                                label : lang.title,
    161163                                                elements :
    162164                                                [
    163165                                                        {
     
    169171                                                                                type : 'html',
    170172                                                                                html :
    171173                                                                                        '<span>'  +
    172                                                                                                 editor.lang.templates.selectPromptMsg +
     174                                                                                                lang.selectPromptMsg +
    173175                                                                                        '</span>'
    174176                                                                        },
    175177                                                                        {
    176                                                                                 id : "templatesList",
     178                                                                                id : 'templatesList',
    177179                                                                                type : 'html',
    178180                                                                                focus: true,
    179181                                                                                html :
    180182                                                                                        '<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="' + templateListLabelId+ '">' +
    181183                                                                                                '<div class="cke_tpl_loading"><span></span></div>' +
    182184                                                                                        '</div>' +
    183                                                                                         '<span class="cke_voice_label" id="' + templateListLabelId + '">' + editor.lang.templates.options+ '</span>'
     185                                                                                        '<span class="cke_voice_label" id="' + templateListLabelId + '">' + lang.options+ '</span>'
    184186                                                                        },
    185187                                                                        {
    186188                                                                                id : 'chkInsertOpt',
    187189                                                                                type : 'checkbox',
    188                                                                                 label : editor.lang.templates.insertOption,
    189                                                                                 'default' : editor.config.templates_replaceContent
     190                                                                                label : lang.insertOption,
     191                                                                                'default' : config.templates_replaceContent
    190192                                                                        }
    191193                                                                ]
    192194                                                        }
     
    201203                                        var templatesListField = this.getContentElement( 'selectTpl' , 'templatesList' );
    202204                                        listContainer = templatesListField.getElement();
    203205
    204                                         CKEDITOR.loadTemplates( editor.config.templates_files, function()
     206                                        CKEDITOR.loadTemplates( config.templates_files, function()
    205207                                                {
    206                                                         var templates = editor.config.templates.split( ',' );
     208                                                        var templates = ( config.templates || 'default' ).split( ',' );
    207209
    208210                                                        if ( templates.length )
    209211                                                        {
     
    214216                                                        {
    215217                                                                listContainer.setHtml(
    216218                                                                        '<div class="cke_tpl_empty">' +
    217                                                                                 '<span>' + editor.lang.templates.emptyListMsg + '</span>' +
     219                                                                                '<span>' + lang.emptyListMsg + '</span>' +
    218220                                                                        '</div>' );
    219221                                                        }
    220222                                                });
     
    222224                                        this._.element.on( 'keydown', keyNavigation );
    223225                                },
    224226
    225                                 onHide : function ()
     227                                onHide : function()
    226228                                {
    227229                                        this._.element.removeListener( 'keydown', keyNavigation );
    228230                                }
  • _source/plugins/templates/plugin.js

     
    4242                var toLoad = [];
    4343
    4444                // Look for pending template files to get loaded.
    45                 for ( var i = 0 ; i < templateFiles.length ; i++ )
     45                for ( var i = 0, count = templateFiles.length ; i < count ; i++ )
    4646                {
    4747                        if ( !loadedTemplatesFiles[ templateFiles[ i ] ] )
    4848                        {
     
    5151                        }
    5252                }
    5353
    54                 if ( toLoad.length > 0 )
     54                if ( toLoad.length )
    5555                        CKEDITOR.scriptLoader.load( toLoad, callback );
    5656                else
    5757                        setTimeout( callback, 0 );
     
    6868 * @example
    6969 * config.templates = 'my_templates';
    7070 */
    71 CKEDITOR.config.templates = 'default';
    7271
    7372/**
    7473 * The list of templates definition files to load.
  • _source/plugins/toolbar/plugin.js

     
    157157                                        {
    158158                                                editor.toolbox = new toolbox();
    159159
    160                                                 var labelId = 'cke_' + CKEDITOR.tools.getNextNumber();
     160                                                var labelId = CKEDITOR.tools.getNextId();
    161161
    162162                                                var output = [ '<div class="cke_toolbox" role="toolbar" aria-labelledby="', labelId, '"' ],
    163163                                                        expanded =  editor.config.toolbarStartupExpanded !== false,
     
    187187                                                        if ( !row )
    188188                                                                continue;
    189189
    190                                                         var toolbarId = 'cke_' + CKEDITOR.tools.getNextNumber(),
     190                                                        var toolbarId = CKEDITOR.tools.getNextId(),
    191191                                                                toolbarObj = { id : toolbarId, items : [] };
    192192
    193193                                                        if ( groupStarted )
     
    283283                                                                function()
    284284                                                                {
    285285                                                                        editor.execCommand( 'toolbarCollapse' );
    286                                                                 } );
     286                                                                });
    287287
    288288                                                        editor.on( 'destroy', function () {
    289289                                                                        CKEDITOR.tools.removeFunction( collapserFn );
    290                                                                 } );
     290                                                                });
    291291
    292                                                         var collapserId = 'cke_' + CKEDITOR.tools.getNextNumber();
     292                                                        var collapserId = CKEDITOR.tools.getNextId();
    293293
    294294                                                        editor.addCommand( 'toolbarCollapse',
    295295                                                                {
    296296                                                                        exec : function( editor )
    297297                                                                        {
    298                                                                                 var collapser = CKEDITOR.document.getById( collapserId );
    299                                                                                 var toolbox = collapser.getPrevious();
    300                                                                                 var contents = editor.getThemeSpace( 'contents' );
    301                                                                                 var toolboxContainer = toolbox.getParent();
    302                                                                                 var contentHeight = parseInt( contents.$.style.height, 10 );
    303                                                                                 var previousHeight = toolboxContainer.$.offsetHeight;
    304                                                                                 var collapsed = !toolbox.isVisible();
     298                                                                                var collapser = CKEDITOR.document.getById( collapserId ),
     299                                                                                        toolbox = collapser.getPrevious(),
     300                                                                                        contents = editor.getThemeSpace( 'contents' ),
     301                                                                                        toolboxContainer = toolbox.getParent(),
     302                                                                                        contentHeight = parseInt( contents.$.style.height, 10 ),
     303                                                                                        previousHeight = toolboxContainer.$.offsetHeight,
     304                                                                                        collapsed = !toolbox.isVisible();
    305305
    306306                                                                                if ( !collapsed )
    307307                                                                                {
  • _source/plugins/undo/plugin.js

     
    133133                        editor.on( 'updateSnapshot', function()
    134134                        {
    135135                                if ( undoManager.currentImage && new Image( editor ).equals( undoManager.currentImage ) )
    136                                         setTimeout( function () { undoManager.update(); }, 0 );
     136                                        setTimeout( function() { undoManager.update(); }, 0 );
    137137                        });
    138138                }
    139139        });
     
    339339                         */
    340340                        this.index = -1;
    341341
    342                         this.limit = this.editor.config.undoStackSize;
     342                        this.limit = this.editor.config.undoStackSize || 20;
    343343
    344344                        this.currentImage = null;
    345345
     
    545545 * @example
    546546 * config.undoStackSize = 50;
    547547 */
    548 CKEDITOR.config.undoStackSize = 20;
    549548
    550549/**
    551550 * Fired when the editor is about to save an undo snapshot. This event can be
  • _source/plugins/wysiwygarea/plugin.js

     
    9292                                var marker = this.document.getById( 'cke_paste_marker' );
    9393                                marker.scrollIntoView();
    9494                                marker.remove();
     95                                marker = null;
    9596                        }
    9697
    9798                        CKEDITOR.tools.setTimeout( function()
     
    132133                                // Remove the original contents.
    133134                                range.deleteContents();
    134135
    135                                 clone = !i && element || element.clone( true );
     136                                clone = !i && element || element.clone( 1 );
    136137
    137138                                // If we're inserting a block at dtd-violated position, split
    138139                                // the parent blocks until we reach blockLimit.
    139140                                var current, dtd;
    140141                                if ( isBlock )
    141142                                {
    142                                         while ( ( current = range.getCommonAncestor( false, true ) )
     143                                        while ( ( current = range.getCommonAncestor( 0, 1 ) )
    143144                                                        && ( dtd = CKEDITOR.dtd[ current.getName() ] )
    144145                                                        && !( dtd && dtd [ elementName ] ) )
    145146                                        {
     
    530531
    531532                                                CKEDITOR.env.gecko && CKEDITOR.tools.setTimeout( activateEditing, 0, null, editor );
    532533
    533                                                 domWindow       = editor.window         = new CKEDITOR.dom.window( domWindow );
     534                                                domWindow       = editor.window = new CKEDITOR.dom.window( domWindow );
    534535                                                domDocument     = editor.document       = new CKEDITOR.dom.document( domDocument );
    535536
    536537                                                domDocument.on( 'dblclick', function( evt )
     
    10661067        // Fixing Firefox 'Back-Forward Cache' break design mode. (#4514)
    10671068        if ( CKEDITOR.env.gecko )
    10681069        {
    1069                 ( function ()
     1070                (function()
    10701071                {
    10711072                        var body = document.body;
    10721073
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy