Changeset 2363

Show
Ignore:
Timestamp:
2008-08-19 11:28:15 (3 months ago)
Author:
alfonsoml
Message:

Fix for #822. Add the ability to switch between TD and TH

Location:
FCKeditor/trunk
Files:
62 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/editor/dialog/common/fck_dialog_common.js

    r2362 r2363  
    311311        } 
    312312        // The style: 
    313         oDest.style.cssText = oSource.style.cssText ; 
     313        if ( oSource.style.cssText !== '' ) 
     314                oDest.style.cssText = oSource.style.cssText ; 
    314315} 
    315316 
  • FCKeditor/trunk/editor/dialog/fck_tablecell.html

    r1795 r2363  
    3333var oEditor = dialog.InnerDialogLoaded() ; 
    3434 
    35 // Gets the document DOM 
    36 var oDOM = oEditor.FCK.EditorDocument ; 
     35var FCKDomTools = oEditor.FCKDomTools ; 
    3736 
    3837// Array of selected Cells 
     
    7574                GetE('txtBackColor').value              = GetAttribute( oCell, 'bgColor' ) ; 
    7675                GetE('txtBorderColor').value    = GetAttribute( oCell, 'borderColor' ) ; 
    77 //              GetE('cmbFontStyle').value              = oCell.className ; 
     76                GetE('selCellType').value     = oCell.nodeName.toLowerCase() ;  
    7877        } 
    7978} 
     
    101100                SetAttribute( aCells[i], 'bgColor'              , GetE('txtBackColor').value ) ; 
    102101                SetAttribute( aCells[i], 'borderColor'  , GetE('txtBorderColor').value ) ; 
    103 //              SetAttribute( aCells[i], 'className'    , GetE('cmbFontStyle').value ) ; 
     102 
     103                var cellType = GetE('selCellType').value ;  
     104                if ( aCells[i].nodeName.toLowerCase() != cellType )  
     105                        aCells[i] = RenameNode( aCells[i], cellType ) ; 
    104106        } 
     107 
     108        // The cells need to be reselected, otherwise the caret will appear inside the table borders (Gecko)  
     109        // or sent back to the beginning of the document (Opera and Safari).  
     110        // Strangely, IE works ok so no change is needed for IE.  
     111        if ( !oEditor.FCKBrowserInfo.IsIE )  
     112        {  
     113                var selection = oEditor.FCK.EditorWindow.getSelection() ;  
     114                selection.removeAllRanges() ;  
     115                for ( var i = 0 ; i < aCells.length ; i++ )  
     116                {  
     117                        var range = oEditor.FCK.EditorDocument.createRange() ;  
     118                        range.selectNode( aCells[i] ) ;  
     119                        selection.addRange( range ) ;  
     120                }  
     121        }  
    105122 
    106123        return true ; 
     
    203220                                                                <tr> 
    204221                                                                        <td nowrap="nowrap"> 
     222                                                                         <span fcklang="DlgCellType">Cell Type</span>:</td>  
     223                                                                        <td colspan="2">  
     224                                                                                &nbsp; <select id="selCellType">  
     225                                                                                        <option fcklang="DlgCellTypeData" value="td" />Data  
     226                                                                                        <option fcklang="DlgCellTypeHeader" value="th" />Header  
     227                                                                                </select>  
     228                                                                </tr>  
     229                                                                <tr>  
     230                                                                        <td>  
     231                                                                                &nbsp;</td>  
     232                                                                        <td>  
     233                                                                                &nbsp;</td>  
     234                                                                        <td>  
     235                                                                                &nbsp;</td>  
     236                                                                </tr>  
     237                                                                <tr>  
     238                                                                        <td nowrap="nowrap">  
    205239                                                                                <span fcklang="DlgCellRowSpan">Rows Span</span>:</td> 
    206240                                                                        <td> 
  • FCKeditor/trunk/editor/lang/af.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Onder", 
    337337DlgCellVerAlignBaseline : "Baseline", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Rei strekking", 
    339342DlgCellCollSpan         : "Kolom strekking", 
  • FCKeditor/trunk/editor/lang/ar.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "أسفل", 
    337337DlgCellVerAlignBaseline : "على السطر", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "إمتداد الصفوف", 
    339342DlgCellCollSpan         : "إمتداد الأعمدة", 
  • FCKeditor/trunk/editor/lang/bg.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Долу", 
    337337DlgCellVerAlignBaseline : "По базовата линия", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "повече от един ред", 
    339342DlgCellCollSpan         : "повече от една колона", 
  • FCKeditor/trunk/editor/lang/bn.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "নীচে", 
    337337DlgCellVerAlignBaseline : "মূলরেখা", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "রো স্প্যান", 
    339342DlgCellCollSpan         : "কলাম স্প্যান", 
  • FCKeditor/trunk/editor/lang/bs.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Dno", 
    337337DlgCellVerAlignBaseline : "Bazno", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Spajanje æelija", 
    339342DlgCellCollSpan         : "Spajanje kolona", 
  • FCKeditor/trunk/editor/lang/ca.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Bottom", 
    337337DlgCellVerAlignBaseline : "Baseline", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Rows Span", 
    339342DlgCellCollSpan         : "Columns Span", 
  • FCKeditor/trunk/editor/lang/cs.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Dolů", 
    337337DlgCellVerAlignBaseline : "Na účaří", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Sloučené řádky", 
    339342DlgCellCollSpan         : "Sloučené sloupce", 
  • FCKeditor/trunk/editor/lang/da.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Nederst", 
    337337DlgCellVerAlignBaseline : "Grundlinje", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Højde i antal rækker", 
    339342DlgCellCollSpan         : "Bredde i antal kolonner", 
  • FCKeditor/trunk/editor/lang/de.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Unten", 
    337337DlgCellVerAlignBaseline : "Grundlinie", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Zeilen zusammenfassen", 
    339342DlgCellCollSpan         : "Spalten zusammenfassen", 
  • FCKeditor/trunk/editor/lang/el.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Κάτω (Bottom)", 
    337337DlgCellVerAlignBaseline : "Γραμμή Βάσης (Baseline)", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Αριθμός Γραμμών (Rows Span)", 
    339342DlgCellCollSpan         : "Αριθμός Κολωνών (Columns Span)", 
  • FCKeditor/trunk/editor/lang/en-au.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Bottom", 
    337337DlgCellVerAlignBaseline : "Baseline", 
     338DlgCellType             : "Cell Type", 
     339DlgCellTypeData         : "Data", 
     340DlgCellTypeHeader       : "Header", 
    338341DlgCellRowSpan          : "Rows Span", 
    339342DlgCellCollSpan         : "Columns Span", 
  • FCKeditor/trunk/editor/lang/en-ca.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Bottom", 
    337337DlgCellVerAlignBaseline : "Baseline", 
     338DlgCellType             : "Cell Type", 
     339DlgCellTypeData         : "Data", 
     340DlgCellTypeHeader       : "Header", 
    338341DlgCellRowSpan          : "Rows Span", 
    339342DlgCellCollSpan         : "Columns Span", 
  • FCKeditor/trunk/editor/lang/en.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Bottom", 
    337337DlgCellVerAlignBaseline : "Baseline", 
     338DlgCellType             : "Cell Type", 
     339DlgCellTypeData         : "Data", 
     340DlgCellTypeHeader       : "Header", 
    338341DlgCellRowSpan          : "Rows Span", 
    339342DlgCellCollSpan         : "Columns Span", 
  • FCKeditor/trunk/editor/lang/en-uk.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Bottom", 
    337337DlgCellVerAlignBaseline : "Baseline", 
     338DlgCellType             : "Cell Type", 
     339DlgCellTypeData         : "Data", 
     340DlgCellTypeHeader       : "Header", 
    338341DlgCellRowSpan          : "Rows Span", 
    339342DlgCellCollSpan         : "Columns Span", 
  • FCKeditor/trunk/editor/lang/eo.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Malsupre", 
    337337DlgCellVerAlignBaseline : "Je Malsupro de Teksto", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Linioj Kunfanditaj", 
    339342DlgCellCollSpan         : "Kolumnoj Kunfanditaj", 
  • FCKeditor/trunk/editor/lang/es.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "ie", 
    337337DlgCellVerAlignBaseline : "Línea de Base", 
     338DlgCellType             : "Tipo de celda", 
     339DlgCellTypeData         : "Datos", 
     340DlgCellTypeHeader       : "Encabezado", 
    338341DlgCellRowSpan          : "Abarcar Filas", 
    339342DlgCellCollSpan         : "Abarcar Columnas", 
  • FCKeditor/trunk/editor/lang/et.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Alla", 
    337337DlgCellVerAlignBaseline : "Baasjoonele", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Reaulatus", 
    339342DlgCellCollSpan         : "Veeruulatus", 
  • FCKeditor/trunk/editor/lang/eu.js

    r2362 r2363  
    337337DlgCellVerAlignBottom   : "Behean", 
    338338DlgCellVerAlignBaseline : "Oinan", 
     339DlgCellType             : "Cell Type",  //MISSING 
     340DlgCellTypeData         : "Data",       //MISSING 
     341DlgCellTypeHeader       : "Header",     //MISSING 
    339342DlgCellRowSpan          : "Lerroak Hedatu", 
    340343DlgCellCollSpan         : "Zutabeak Hedatu", 
  • FCKeditor/trunk/editor/lang/fa.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "پائین", 
    337337DlgCellVerAlignBaseline : "خط‌پایه", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "گستردگی سطرها", 
    339342DlgCellCollSpan         : "گستردگی ستونها", 
  • FCKeditor/trunk/editor/lang/fi.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Alas", 
    337337DlgCellVerAlignBaseline : "Tekstin alas", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Rivin jatkuvuus", 
    339342DlgCellCollSpan         : "Sarakkeen jatkuvuus", 
  • FCKeditor/trunk/editor/lang/fo.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Niðast", 
    337337DlgCellVerAlignBaseline : "Basislinja", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Røðir, meskin fevnir um", 
    339342DlgCellCollSpan         : "Kolonnur, meskin fevnir um", 
  • FCKeditor/trunk/editor/lang/fr-ca.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Bas", 
    337337DlgCellVerAlignBaseline : "Bas du texte", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Lignes fusionnées", 
    339342DlgCellCollSpan         : "Colonnes fusionnées", 
  • FCKeditor/trunk/editor/lang/fr.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Bas", 
    337337DlgCellVerAlignBaseline : "Bas du texte", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Lignes fusionnées", 
    339342DlgCellCollSpan         : "Colonnes fusionnées", 
  • FCKeditor/trunk/editor/lang/gl.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Abaixo", 
    337337DlgCellVerAlignBaseline : "Liña de Base", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Ocupar Filas", 
    339342DlgCellCollSpan         : "Ocupar Columnas", 
  • FCKeditor/trunk/editor/lang/gu.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "નીચે", 
    337337DlgCellVerAlignBaseline : "મૂળ રેખા", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "પંક્તિ સ્પાન", 
    339342DlgCellCollSpan         : "કૉલમ/ઊભી કટાર સ્પાન", 
  • FCKeditor/trunk/editor/lang/he.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "לתחתית", 
    337337DlgCellVerAlignBaseline : "קו תחתית", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "טווח שורות", 
    339342DlgCellCollSpan         : "טווח עמודות", 
  • FCKeditor/trunk/editor/lang/hi.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "नीचे", 
    337337DlgCellVerAlignBaseline : "मूलरेखा", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "पंक्ति स्पैन", 
    339342DlgCellCollSpan         : "कालम स्पैन", 
  • FCKeditor/trunk/editor/lang/hr.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Donje", 
    337337DlgCellVerAlignBaseline : "Bazno", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Spajanje redova", 
    339342DlgCellCollSpan         : "Spajanje kolona", 
  • FCKeditor/trunk/editor/lang/hu.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "Aljára", 
    337337DlgCellVerAlignBaseline : "Egyvonalba", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Sorok egyesítése", 
    339342DlgCellCollSpan         : "Oszlopok egyesítése", 
  • FCKeditor/trunk/editor/lang/it.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "In Basso", 
    337337DlgCellVerAlignBaseline : "Linea base", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "Righe occupate", 
    339342DlgCellCollSpan         : "Colonne occupate", 
  • FCKeditor/trunk/editor/lang/ja.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "下", 
    337337DlgCellVerAlignBaseline : "ベースライン", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "縦幅(行数)", 
    339342DlgCellCollSpan         : "横幅(列数)", 
  • FCKeditor/trunk/editor/lang/km.js

    r2362 r2363  
    336336DlgCellVerAlignBottom   : "ខាងក្រោម", 
    337337DlgCellVerAlignBaseline : "បន្ទាត់ជាមូលដ្ឋាន", 
     338DlgCellType             : "Cell Type",  //MISSING 
     339DlgCellTypeData         : "Data",       //MISSING 
     340DlgCellTypeHeader       : "Header",     //MISSING 
    338341DlgCellRowSpan          : "បញ្ជូលជួរផ្តេក", 
    339342DlgCellCollSpan         : "បញ្ជូលជួរឈរ", 
  • FCKeditor/trunk/editor/lang/ko.js