Changeset 419

Show
Ignore:
Timestamp:
2007-07-08 11:48:08 (17 months ago)
Author:
alfonsoml
Message:

Fix for #944, make the samples work directly from the Mac filesystem.

Location:
FCKeditor/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/_source/internals/fckconfig.js

    r327 r419  
    3434        FCKConfig.BasePath = decodeURIComponent( document.location.pathname.substr(1) ) ; 
    3535        FCKConfig.BasePath = FCKConfig.BasePath.replace( /\\/gi, '/' ) ; 
    36         FCKConfig.BasePath = 'file://' + FCKConfig.BasePath.substring(0,FCKConfig.BasePath.lastIndexOf('/')+1) ; 
     36         
     37        // The way to address local files is different according to the OS. 
     38        // In Windows it is file:// but in MacOs it is file:/// so let's get it automatically 
     39        var sFullProtocol = document.location.href.match( /^(file\:\/{2,3})/ )[1] ; 
     40        FCKConfig.BasePath = sFullProtocol + FCKConfig.BasePath.substring( 0, FCKConfig.BasePath.lastIndexOf( '/' ) + 1) ; 
    3741        FCKConfig.FullBasePath = FCKConfig.BasePath ; 
    3842} 
    3943else 
    4044{ 
    41         FCKConfig.BasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('/')+1) ; 
     45        FCKConfig.BasePath = document.location.pathname.substring( 0, document.location.pathname.lastIndexOf( '/' ) + 1) ; 
    4246        FCKConfig.FullBasePath = document.location.protocol + '//' + document.location.host + FCKConfig.BasePath ; 
    4347} 
  • FCKeditor/trunk/_whatsnew.html

    r418 r419  
    1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    22<!-- 
    33 * FCKeditor - The text editor for Internet - http://www.fckeditor.net 
     
    9898                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/802">#802</a>] The replace dialog will now advance its searching 
    9999                        position correctly and is able to search for strings spanning across multiple inline tags.</li> 
     100                <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/944">#944</a>] The _samples didn't work directly from 
     101                        the Mac filesystem.</li> 
    100102        </ul> 
    101103        <h3>