Ticket #2215: 2215.4.patch

File 2215.4.patch, 2.8 KB (added by fredck, 22 months ago)
  • _whatsnew.html

     
    4242                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2150">#2150</a>] The searching 
    4343                        speed of the Find/Replace dialog has been vastly improved.</li> 
    4444                <li>New language file for <strong>Gujarati</strong> (by Nilam Doctor).</li> 
     45                <li>A new TabIndex property has been added to the JavaScript integration files.</li> 
     46                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2215">#2215</a>] Following 
     47                        the above new feature, the ReplaceTextarea method will now copy the textarea.tabIndex 
     48                        value if available.</li> 
    4549 
    4650                 
    4751        </ul> 
  • fckeditor.js

     
    8888        { 
    8989                var sWidth  = this.Width.toString().indexOf('%')  > 0 ? this.Width  : this.Width  + 'px' ; 
    9090                var sHeight = this.Height.toString().indexOf('%') > 0 ? this.Height : this.Height + 'px' ; 
    91                 sHtml += '<textarea name="' + this.InstanceName + '" rows="4" cols="40" style="width:' + sWidth + ';height:' + sHeight + '">' + this._HTMLEncode( this.Value ) + '<\/textarea>' ; 
     91 
     92                sHtml += '<textarea name="' + this.InstanceName + 
     93                        '" rows="4" cols="40" style="width:' + sWidth + 
     94                        ';height:' + sHeight ; 
     95 
     96                if ( this.TabIndex ) 
     97                        sHtml += '" tabindex="' + this.TabIndex ; 
     98 
     99                sHtml += '">' + 
     100                        this._HTMLEncode( this.Value ) + 
     101                        '<\/textarea>' ; 
    92102        } 
    93103 
    94104        return sHtml ; 
     
    116126                } 
    117127 
    118128                oTextarea.style.display = 'none' ; 
     129 
     130                if ( oTextarea.tabIndex ) 
     131                        this.TabIndex = oTextarea.tabIndex ; 
     132 
    119133                this._InsertHtmlBefore( this._GetConfigHtml(), oTextarea ) ; 
    120134                this._InsertHtmlBefore( this._GetIFrameHtml(), oTextarea ) ; 
    121135        } 
     
    158172        catch (e) { /* Ignore it. Much probably we are inside a FRAME where the "top" is in another domain (security error). */ } 
    159173 
    160174        var sLink = this.BasePath + 'editor/' + sFile + '?InstanceName=' + encodeURIComponent( this.InstanceName ) ; 
    161         if (this.ToolbarSet) sLink += '&amp;Toolbar=' + this.ToolbarSet ; 
     175        if (this.ToolbarSet) 
     176                sLink += '&amp;Toolbar=' + this.ToolbarSet ; 
    162177 
    163         return '<iframe id="' + this.InstanceName + '___Frame" src="' + sLink + '" width="' + this.Width + '" height="' + this.Height + '" frameborder="0" scrolling="no"></iframe>' ; 
     178        html = '<iframe id="' + this.InstanceName + 
     179                '___Frame" src="' + sLink + 
     180                '" width="' + this.Width + 
     181                '" height="' + this.Height ; 
     182 
     183        if ( this.TabIndex ) 
     184                html += '" tabindex="' + this.TabIndex ; 
     185 
     186        html += '" frameborder="0" scrolling="no"></iframe>' ; 
     187 
     188        return html ; 
    164189} 
    165190 
    166191FCKeditor.prototype._IsCompatibleBrowser = function()