Ticket #171: 171_pre.patch
File 171_pre.patch, 3.7 KB (added by , 16 years ago) |
---|
-
editor/_source/internals/fckxhtml.js
30 30 FCKDomTools.CheckAndRemovePaddingNode( FCKTools.GetElementDocument( node ), FCKConfig.EnterMode ) ; 31 31 FCKXHtmlEntities.Initialize() ; 32 32 33 // Random ID for protected attributes. 34 this._ProtectID = Math.random() ; 35 33 36 // Set the correct entity to use for empty blocks. 34 37 this._NbspEntity = ( FCKConfig.ProcessHTMLEntities? 'nbsp' : '#160' ) ; 35 38 … … 59 62 // Get the resulting XHTML as a string. 60 63 var sXHTML = this._GetMainXmlString() ; 61 64 65 // Release protected attributes that could not be directly set in DOM operations previously. 66 sXHTML = sXHTML.replace( new RegExp( '_protected_' + this._ProtectID, 'g' ), '' ) ; 67 62 68 // alert( 'Time: ' + ( ( ( new Date() ) - dTimer ) ) + ' ms' ) ; 63 69 64 70 this.XML = null ; … … 513 519 } ; 514 520 515 521 FCKXHtml.TagProcessors.ul = FCKXHtml.TagProcessors.ol ; 522 523 FCKXHtml.AttributeProcessors = 524 { 525 fck_alt_size : function( node, htmlNode, value ) 526 { 527 node.attributes.removeNamedItem( 'size' ) ; 528 node.attributes.removeNamedItem( 'fck_alt_size' ) ; 529 htmlNode.removeAttribute( 'size' ) ; 530 htmlNode.removeAttribute( 'fck_alt_size' ) ; 531 532 FCKXHtml._AppendAttribute( node, 'size_protected_' + FCKXHtml._ProtectID, value ) ; 533 } 534 } ; -
editor/_source/internals/fckxhtml_gecko.js
60 60 else 61 61 sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined. 62 62 63 this._AppendAttribute( node, sAttName, sAttValue ) ; 63 if ( this.AttributeProcessors[sAttName] ) 64 this.AttributeProcessors[sAttName]( node, htmlNode, sAttValue ) ; 65 else 66 this._AppendAttribute( node, sAttName, sAttValue ) ; 64 67 } 65 68 } 66 69 } -
editor/_source/internals/fckxhtml_ie.js
77 77 } 78 78 catch (e) {} 79 79 } 80 this._AppendAttribute( node, sAttName, sAttValue || oAttribute.nodeValue ) ; 80 if ( this.AttributeProcessors[sAttName] ) 81 this.AttributeProcessors[sAttName]( node, htmlNode, sAttValue ) ; 82 else 83 this._AppendAttribute( node, sAttName, sAttValue ) ; 81 84 } 82 85 } 83 86 } … … 200 203 node = FCKXHtml._AppendChildNodes( node, htmlNode ) ; 201 204 202 205 return node ; 203 } 204 No newline at end of file 206 } -
editor/dialog/fck_textfield.html
46 46 { 47 47 GetE('txtName').value = oActiveEl.name ; 48 48 GetE('txtValue').value = oActiveEl.value ; 49 GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) ;49 GetE('txtSize').value = GetAttribute( oActiveEl, 'size' ) || GetAttribute( oActiveEl, 'fck_alt_size' ) ; 50 50 GetE('txtMax').value = GetAttribute( oActiveEl, 'maxLength' ) ; 51 51 GetE('txtType').value = oActiveEl.type ; 52 52 … … 86 86 oActiveEl.name = GetE('txtName').value ; 87 87 SetAttribute( oActiveEl, 'value' , GetE('txtValue').value ) ; 88 88 SetAttribute( oActiveEl, 'size' , GetE('txtSize').value ) ; 89 SetAttribute( oActiveEl, 'fck_alt_size', GetE('txtSize').value ) ; 89 90 SetAttribute( oActiveEl, 'maxlength', GetE('txtMax').value ) ; 90 91 91 92 return true ;