Changeset 12914
- Timestamp:
- 02/28/09 21:14:41 (3 years ago)
- Location:
- trunk/Xul_XedLib/chrome/content/scenarixedlib
- Files:
-
- 2 edited
-
libUiBase/widgets/xedUiRichTextInput.xbl.xml (modified) (2 diffs)
-
libUiExtra/scRichText/textBase.xbl.xml (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Xul_XedLib/chrome/content/scenarixedlib/libUiBase/widgets/xedUiRichTextInput.xbl.xml
r12908 r12914 661 661 </method> 662 662 663 <!-- Sélectionne un noeud HTML. --> 664 <method name="focusHtmlNode"> 665 <parameter name="pHtmlNode"/> 666 <body> 667 try{ 668 if( ! this.fRichTextInput.hasAttribute("inputFocused")) { 669 this.fEditorNode.contentWindow.focus(); 670 } 671 var vDoc = this.fEditorNode.contentDocument; 672 var vSel = this.fHTMLEditor.selection; 673 var vOffs = this.getOffsetInParent(pHtmlNode) 674 vSel.collapse(pHtmlNode.parentNode, vOffs); 675 vSel.extend(pHtmlNode.parentNode, vOffs+1); 676 }catch(e){xed.debug("richTextZone.focusHtmlNode::"+e+pHtmlNode);} 677 </body> 678 </method> 679 663 680 <!-- 664 681 @param pFrom : 1 = focus (default), 2 = start, 3 = end … … 1023 1040 ]]></body> 1024 1041 </method> 1025 1026 <!-- Sélectionne un noeud HTML. -->1027 <method name="focusHtmlNode">1028 <parameter name="pHtmlNode"/>1029 <body>1030 try{1031 var vDoc = this.fEditorNode.contentDocument;1032 var vSel = this.fHTMLEditor.selection;1033 var vOffs = this.getOffsetInParent(pHtmlNode)1034 vSel.collapse(pHtmlNode.parentNode, vOffs);1035 vSel.extend(pHtmlNode.parentNode, vOffs+1);1036 }catch(e){xed.debug("richTextZone.focusHtmlNode::"+e+pHtmlNode);}1037 </body>1038 </method>1039 1042 <!-- Ouvre les propriétés d'un noeud. --> 1040 1043 <method name="xOpenSubEditor"> -
trunk/Xul_XedLib/chrome/content/scenarixedlib/libUiExtra/scRichText/textBase.xbl.xml
r12913 r12914 791 791 }; 792 792 vTrans.doTransaction = function(){ 793 //this.fNode.setAttribute("refUri", this.fNewUri); 793 794 this.fXbl.loadExtBlock(this.fNode, this.fNewUri); 794 795 }; 795 796 vTrans.undoTransaction = function(){ 797 //this.fNode.setAttribute("refUri", this.fOldUri); 796 798 this.fXbl.loadExtBlock(this.fNode, this.fOldUri); 797 799 this.fXbl.focusObject(this.fNode); 798 800 }; 799 801 vTrans.redoTransaction = function(){ 802 //this.fNode.setAttribute("refUri", this.fNewUri); 800 803 this.fXbl.loadExtBlock(this.fNode, this.fNewUri); 801 804 this.fXbl.focusObject(this.fNode); … … 5742 5745 --> 5743 5746 </implementation> 5744 5747 <handlers> 5748 <handler event="ScText_mousedown1"><![CDATA[ 5749 this.focusObject(event.target); 5750 ]]></handler> 5751 <handler event="ScText_click2"><![CDATA[ 5752 var vObj = event.target; 5753 if(vObj.nodeType==1 && this.fClasses[vObj.nodeName].isHighlightable) { 5754 var vSubEd = this.fClasses[vObj.nodeName].getUrlSubEditor(vObj); 5755 if(vSubEd) this.xOpenSubEditor(this.fClasses[vObj.nodeName].getUrlSubEditor(vObj), vObj); 5756 } 5757 ]]></handler> 5758 </handlers> 5745 5759 </binding> 5746 5760 … … 5777 5791 function onMouse(pEvent){ 5778 5792 try { 5779 var vEvent = vIframe.ownerDocument.createEvent('MouseEvent'); 5780 vEvent.initMouseEvent(pEvent.type, true, true, vIframe.view, pEvent.detail, 5781 pEvent.screenX, pEvent.screenY, pEvent.clientX, pEvent.clientY, 5782 pEvent.ctrlKey, pEvent.altKey, pEvent.shiftKey, pEvent.metaKey, 5783 pEvent.button, null); 5784 vIframe.dispatchEvent(vEvent); 5793 var vEvent = vIframe.ownerDocument.createEvent("Events"); 5794 vEvent.initEvent("ScText_" + pEvent.type + pEvent.detail, true, false); 5795 vIframe.parentNode.dispatchEvent(vEvent); 5785 5796 }catch(e){alert(e);} 5786 5797 }
Note: See TracChangeset
for help on using the changeset viewer.