Ticket #2353: 2353.patch
File 2353.patch, 3.5 KB (added by , 16 years ago) |
---|
-
FCKeditorSkin.body.php
50 50 } 51 51 if (!empty($params)) { 52 52 if (isset($params['width'])) { 53 $ret .= " _fck_mw_width=\"".$params['width']."\" ";53 $ret .= "width=\"".$params['width']."\" "; 54 54 } 55 55 if (isset($params['height'])) { 56 $ret .= " _fck_mw_height=\"".$params['height']."\" ";56 $ret .= "height=\"".$params['height']."\" "; 57 57 } 58 58 } 59 59 $class = ""; … … 167 167 } 168 168 if (!empty($hp)) { 169 169 if (isset($hp['width'])) { 170 $ret .= " _fck_mw_width=\"".$hp['width']."\" ";170 $ret .= "width=\"".$hp['width']."\" "; 171 171 } 172 172 if (isset($hp['height'])) { 173 $ret .= " _fck_mw_height=\"".$hp['height']."\" ";173 $ret .= "height=\"".$hp['height']."\" "; 174 174 } 175 175 } 176 176 $class = ""; -
plugins/mediawiki/dialogs/image.html
73 73 GetE('xType').value = GetAttribute( oImage, '_fck_mw_type', '' ) ; 74 74 GetE('cmbAlign').value = GetAttribute( oImage, '_fck_mw_location', '' ) ; 75 75 76 GetE('txtWidth').value = GetAttribute( oImage, '_fck_mw_width', '' ) ; 77 GetE('txtHeight').value = GetAttribute( oImage, '_fck_mw_height', '' ) ; 76 GetE('txtWidth').value = GetAttribute( oImage, 'width', '' ) ; 77 if(!isNaN(parseInt(oImage.style.width))) 78 { 79 $width = parseInt(oImage.style.width)+''; 80 GetE('txtWidth').value = $width; 81 SetAttribute(oImage, 'width', $width); 82 oImage.style.width=''; 83 } 84 GetE('txtHeight').value = GetAttribute( oImage, 'height', '' ) ; 85 if(!isNaN(parseInt(oImage.style.height))) 86 { 87 $height = parseInt(oImage.style.height)+''; 88 GetE('txtHeight').value = $height; 89 SetAttribute(oImage, 'height', $height); 90 oImage.style.height=''; 91 } 78 92 79 93 UpdatePreview(); 80 94 } … … 149 163 SetAttribute( e, "alt", GetE('txtAlt').value ) ; 150 164 SetAttribute( e, "_fck_mw_type", imgType ) ; 151 165 SetAttribute( e, "_fck_mw_location", imgLocation ) ; 152 SetAttribute( e, "_fck_mw_width", GetE('txtWidth').value ) ;153 SetAttribute( e, "_fck_mw_height", GetE('txtHeight').value ) ;154 166 155 167 SetAttribute( e, "width" , GetE('txtWidth').value ) ; 156 168 SetAttribute( e, "height", GetE('txtHeight').value ) ; -
plugins/mediawiki/fckplugin.js
525 525 var imgCaption = htmlNode.getAttribute( 'alt' ) || '' ; 526 526 var imgType = htmlNode.getAttribute( '_fck_mw_type' ) || '' ; 527 527 var imgLocation = htmlNode.getAttribute( '_fck_mw_location' ) || '' ; 528 var imgWidth = htmlNode.getAttribute( '_fck_mw_width' ) || '' ; 529 var imgHeight = htmlNode.getAttribute( '_fck_mw_height' ) || '' ; 528 var imgWidth = htmlNode.getAttribute( 'width' )+'' || ''; 529 if(!isNaN(parseInt(htmlNode.style.width))) 530 { 531 imgWidth=parseInt(htmlNode.style.width)+''; 532 htmlNode.style.width = ''; 533 } 534 var imgHeight = htmlNode.getAttribute( 'height' )+'' || ''; 535 if(!isNaN(parseInt(htmlNode.style.height))) 536 { 537 imgHeight = parseInt(htmlNode.style.height)+''; 538 htmlNode.style.height = ''; 539 } 530 540 531 541 stringBuilder.push( '[[Image:' ) 532 542 stringBuilder.push( imgName )