Ticket #4594: 4594_3.patch
File 4594_3.patch, 2.5 KB (added by , 14 years ago) |
---|
-
_source/plugins/floatpanel/plugin.js
195 195 if ( rtl ) 196 196 left -= element.$.offsetWidth; 197 197 198 element.setStyles( 199 { 200 left : left + 'px', 201 visibility : '', 202 opacity : '1' // FF3 is ignoring "visibility" 203 }); 198 var panelLoad = CKEDITOR.tools.bind( function () 199 { 200 if ( this.onShow ) 201 this.onShow.call( this ); 204 202 205 if ( block.autoSize ) 206 { 207 function setHeight() 208 { 203 if ( block.autoSize ) 204 { 209 205 var target = element.getFirst(); 210 206 var height = block.element.$.scrollHeight; 211 207 … … 220 216 // Fix IE < 8 visibility. 221 217 panel._.currentBlock.element.setStyle( 'display', 'none' ).removeStyle( 'display' ); 222 218 } 223 224 if ( panel.isLoaded )225 setHeight();226 219 else 227 panel.onLoad = setHeight; 228 } 229 else 230 element.getFirst().removeStyle( 'height' ); 220 element.getFirst().removeStyle( 'height' ); 231 221 222 var panelElement = panel.element, 223 viewportSize = panelElement.getWindow().getViewPaneSize(), 224 panelSize = 225 { 226 'height' : panelElement.$.offsetHeight, 227 'width' : panelElement.$.offsetWidth 228 }; 229 230 // If the menu is horizontal off, shift it toward 231 // the opposite language direction. 232 if ( rtl ? left < 0 : left + panelSize.width > viewportSize.width ) 233 left += ( panelSize.width * ( rtl ? 1 : -1 ) ); 234 235 // Vertical off screen is simpler. 236 if( top + panelSize.height > viewportSize.height ) 237 top -= panelSize.height; 238 239 element.setStyles( 240 { 241 top : top + 'px', 242 left : left + 'px', 243 visibility : '', 244 opacity : '1' // FF3 is ignoring "visibility" 245 } ); 246 247 isShowing = false; 248 } , this ); 249 250 panel.isLoaded ? panelLoad() : panel.onLoad = panelLoad; 232 251 // Set the IFrame focus, so the blur event gets fired. 233 252 CKEDITOR.tools.setTimeout( function() 234 253 { … … 255 274 }, 0, this); 256 275 this.visible = 1; 257 276 258 if ( this.onShow )259 this.onShow.call( this );260 261 isShowing = false;262 277 }, 263 278 264 279 hide : function()