Ignore:
Timestamp:
07/03/09 18:44:53 (3 years ago)
Author:
sys
Message:

debug simpleList avec titre.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Xul_XedLib/chrome/content/scenarixedlib/libUiExtra/scRichText/textBase.xbl.xml

    r13462 r13485  
    355355                                        } 
    356356                                         
    357                                         /* Copie les attributs standards xml:lang et sc:id. */ 
     357                                        /* Copie les attributs standards role et sc:id. */ 
    358358                                        var vEditor = xed.getEditor(this.fRichTextInput); 
    359359                                        function copyAtts(pXmlNode, pHtmlNode){ 
     
    20272027                                ]]></body> 
    20282028                        </method> 
     2029                        <!-- Evalue si un point est au début d'un block. --> 
     2030                        <method name="isPointOnFirstPosition"> 
     2031                                <parameter name="pBlockNode"/> 
     2032                                <parameter name="pParentPoint"/> 
     2033                                <parameter name="pOffsetPoint"/> 
     2034                                <body><![CDATA[ 
     2035                                var vParentPoint = pParentPoint; 
     2036                                var vOffsetPoint = pOffsetPoint; 
     2037                                while(vParentPoint!=pBlockNode.parentNode) { 
     2038                                        while(vOffsetPoint>0) { 
     2039                                                if(vParentPoint.nodeType!=1) return false; 
     2040                                                vOffsetPoint--; 
     2041                                                var vPrev = vParentPoint.childNodes[vOffsetPoint]; 
     2042                                                if(vPrev.nodeType==1) return false; 
     2043                                                if(vPrev.nodeValue.length>0) return false; 
     2044                                        } 
     2045                                        pOffsetPoint = this.getOffsetInParent(vParentPoint); 
     2046                                        vParentPoint = vParentPoint.parentNode; 
     2047                                } 
     2048                                return true; 
     2049                                ]]></body> 
     2050                        </method> 
     2051                                 
    20292052                        <property name="fInvalidCar" onget="return '?'"/> 
    20302053                        <method name="toggleShowTag"> 
     
    39063929                                <parameter name="pOffsetPoint"/> 
    39073930                                <body><![CDATA[ 
    3908                                         var vIsStartPara = (pParentPoint == pBlockNode || pParentPoint == pBlockNode.firstChild) && pParentPoint.startOffset==0; 
     3931                                        var vIsStartPara = this.isPointOnFirstPosition(pBlockNode, pParentPoint, pOffsetPoint); 
    39093932                                        var vNewPara = pBlockNode.ownerDocument.createElement(pBlockNode.nodeName.toLowerCase()); 
    39103933                                        this.checkForEdit(vNewPara, false); 
     
    67976820                                                                        } 
    67986821                                                                        var vPara = this.getEditableBlockFromNode(vRange.startContainer); 
    6799                                                                         if(! vPara || ! this.fClasses[vPara.nodeName].isClonable) break; 
    6800                                                                         if(this.isNodeEmpty(vPara) || (vPara.previousElementSibling && this.isNodeEmpty(vPara.previousElementSibling))) { 
    6801                                                                                 if( ! this.unwrap()) { 
    6802                                                                                         var vNewBlockDoc = this.newBlockOnDoubleReturn(vPara.parentNode); 
    6803                                                                                         if(vNewBlockDoc) { 
    6804                                                                                                 this.pasteAsTextDtd(vNewBlockDoc, vPara.parentNode, this.getOffsetInParent(vPara), true); 
    6805                                                                                                 this.fRichTextInput.setDirty(true); 
    6806                                                                                                 this.controlSelection(vSel); 
     6822                                                                        if(vPara && this.fClasses[vPara.nodeName].isClonable) { 
     6823                                                                                var vPrev = vPara.previousElementSibling; 
     6824                                                                                if(this.isNodeEmpty(vPara) || (vPrev && this.fClasses[vPrev.nodeName].isClonable && this.isPointOnFirstPosition(vPara, vRange.startContainer, vRange.startOffset) && this.isNodeEmpty(vPrev))) { 
     6825                                                                                        if( ! this.unwrap()) { 
     6826                                                                                                var vNewBlockDoc = this.newBlockOnDoubleReturn(vPara.parentNode); 
     6827                                                                                                if(vNewBlockDoc) { 
     6828                                                                                                        this.pasteAsTextDtd(vNewBlockDoc, vPara.parentNode, this.getOffsetInParent(vPara), true); 
     6829                                                                                                        this.fRichTextInput.setDirty(true); 
     6830                                                                                                        this.controlSelection(vSel); 
     6831                                                                                                } 
    68076832                                                                                        } 
     6833                                                                                } else { 
     6834                                                                                        var vNext = this.splitBlock(vPara, vRange.startContainer, vRange.startOffset); 
     6835                                                                                        this.setCaretInBlock(vNext); 
     6836                                                                                        this.fRichTextInput.setDirty(true); 
     6837                                                                                        this.inlineSpellCheckHandleNav(pEvent); 
    68086838                                                                                } 
    6809                                                                         } else { 
    6810                                                                                 var vNext = this.splitBlock(vPara, vRange.startContainer, vRange.startOffset); 
    6811                                                                                 this.setCaretInBlock(vNext); 
    6812                                                                                 this.fRichTextInput.setDirty(true); 
    6813                                                                                 this.inlineSpellCheckHandleNav(pEvent); 
    68146839                                                                        } 
    68156840                                                                        this.addTransSelForRedo(); 
Note: See TracChangeset for help on using the changeset viewer.