Ticket #3564: 3564_3.patch
File 3564_3.patch, 9.7 KB (added by , 15 years ago) |
---|
-
_source/lang/en.js
647 647 copy : 'Copyright © $1. All rights reserved.' 648 648 }, 649 649 650 maximize : 'Maximize' 650 maximize : 'Maximize', 651 652 resize : 'Drag to resize' 651 653 }; -
_source/plugins/resize/plugin.js
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For licensing, see LICENSE.html or http://ckeditor.com/license 4 */ 5 6 CKEDITOR.plugins.add( 'resize', 7 { 8 init : function( editor ) 9 { 10 var config = editor.config; 11 12 if ( config.resize_enabled ) 13 { 14 var container = null; 15 var origin, startSize; 16 17 function dragHandler( evt ) 18 { 19 var dx = evt.data.$.screenX - origin.x; 20 var dy = evt.data.$.screenY - origin.y; 21 var internalWidth = startSize.width + dx * ( editor.lang.dir == 'rtl' ? -1 : 1 ); 22 var internalHeight = startSize.height + dy; 23 24 editor.resize( Math.max( config.resize_minWidth, Math.min( internalWidth, config.resize_maxWidth ) ), 25 Math.max( config.resize_minHeight, Math.min( internalHeight, config.resize_maxHeight ) ) ); 26 } 27 28 function dragEndHandler ( evt ) 29 { 30 CKEDITOR.document.removeListener( 'mousemove', dragHandler ); 31 CKEDITOR.document.removeListener( 'mouseup', dragEndHandler ); 32 33 if ( editor.document ) 34 { 35 editor.document.removeListener( 'mousemove', dragHandler ); 36 editor.document.removeListener( 'mouseup', dragEndHandler ); 37 } 38 } 39 40 var mouseDownFn = CKEDITOR.tools.addFunction( function( $event ) 41 { 42 if ( container == null ) 43 container = editor.getResizable(); 44 45 startSize = { width : container.$.offsetWidth || 0, height : container.$.offsetHeight || 0 }; 46 origin = { x : $event.screenX, y : $event.screenY }; 47 48 CKEDITOR.document.on( 'mousemove', dragHandler ); 49 CKEDITOR.document.on( 'mouseup', dragEndHandler ); 50 51 if ( editor.document ) 52 { 53 editor.document.on( 'mousemove', dragHandler ); 54 editor.document.on( 'mouseup', dragEndHandler ); 55 } 56 } ); 57 58 editor.on( 'themeSpace', function( event ) 59 { 60 if ( event.data.space == 'bottom' ) 61 { 62 event.data.html += '<div class="cke_resizer"' + 63 ' title="' + CKEDITOR.tools.htmlEncode( editor.lang.resize ) + '"' + 64 ' onmousedown="CKEDITOR.tools.callFunction(' + mouseDownFn + ', event)"' + 65 '></div>'; 66 } 67 }, editor, null, 100 ); 68 } 69 } 70 } ); 71 72 CKEDITOR.config.resize_minWidth = 750; 73 CKEDITOR.config.resize_minHeight = 250; 74 CKEDITOR.config.resize_maxWidth = 3000; 75 CKEDITOR.config.resize_maxHeight = 3000; 76 CKEDITOR.config.resize_enabled = true; -
_source/themes/default/theme.js
178 178 var contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ); 179 179 var outer = contents.getAscendant( 'table' ); 180 180 181 // WEBKIT BUG: Webkit requires that we put the editor off from display when we 182 // resize it. If we don't, the browser crashes! 183 181 184 // Resize the width first. 185 CKEDITOR.env.webkit && outer.setStyle( 'display', 'none' ); 182 186 outer.setStyle( 'width', width ); 187 outer.$.offsetHeight; 188 CKEDITOR.env.webkit && outer.setStyle( 'display', '' ); 183 189 184 190 // Get the height delta between the outer table and the content area. 185 191 // If we're setting the content area's height, then we don't need the delta. 186 192 var delta = isContentHeight ? 0 : ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 ); 193 CKEDITOR.env.webkit && outer.setStyle( 'display', 'none' ); 194 contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' ); 195 CKEDITOR.env.webkit && outer.setStyle( 'display', '' ); 187 196 188 // Resize the height.189 contents.setStyle( 'height', ( height - delta ) + 'px' );190 191 197 // Emit a resize event. 192 198 this.fire( 'resize' ); 193 199 }; 200 201 CKEDITOR.editor.prototype.getResizable = function() 202 { 203 return this.container.getChild( [ 0, 0 ] ); 204 }; -
_source/skins/office2003/elementspath.css
14 14 .cke_skin_office2003 .cke_path 15 15 { 16 16 padding: 3px 3px 0 3px; 17 display: block; 18 float: left; 17 19 } 18 20 21 .cke_skin_office2003 .cke_rtl .cke_path 22 { 23 float: right; 24 } 25 19 26 .cke_skin_office2003 .cke_path a, 20 27 .cke_skin_office2003 .cke_path .cke_empty 21 28 { … … 36 43 } 37 44 38 45 .cke_skin_office2003 .cke_rtl .cke_path a, 39 .cke_skin_office2003 .cke_ path .cke_empty46 .cke_skin_office2003 .cke_rtl .cke_path .cke_empty 40 47 { 41 48 float: right; 42 49 } -
_source/skins/office2003/mainui.css
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: _source/skins/office2003/images/resizer.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: _source/skins/office2003/images/resizer_rtl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
54 54 white-space: pre; 55 55 background-color: #fff; 56 56 } 57 58 .cke_skin_office2003 .cke_resizer 59 { 60 width: 12px; 61 height: 12px; 62 margin-top: 12px; 63 display: block; 64 float: right; 65 background-image: url(images/resizer.gif); 66 cursor: se-resize; 67 } 68 69 .cke_skin_office2003 .cke_rtl .cke_resizer 70 { 71 cursor: sw-resize; 72 background-image: url(images/resizer_rtl.gif); 73 float: left; 74 } -
_source/skins/v2/elementspath.css
14 14 .cke_skin_v2 .cke_path 15 15 { 16 16 padding: 3px 3px 0 3px; 17 display: block; 18 float: left; 17 19 } 18 20 21 .cke_skin_v2 .cke_rtl .cke_path 22 { 23 float: right; 24 } 25 19 26 .cke_skin_v2 .cke_path a, 20 27 .cke_skin_v2 .cke_path .cke_empty 21 28 { … … 36 43 } 37 44 38 45 .cke_skin_v2 .cke_rtl .cke_path a, 39 .cke_skin_v2 .cke_ path .cke_empty46 .cke_skin_v2 .cke_rtl .cke_path .cke_empty 40 47 { 41 48 float: right; 42 49 } -
_source/skins/v2/mainui.css
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: _source/skins/v2/images/resizer.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes on: _source/skins/v2/images/resizer_rtl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream
65 65 /* For IE6+Quirks only */ 66 66 _white-space: normal; 67 67 } 68 69 .cke_skin_v2 .cke_resizer 70 { 71 width: 12px; 72 height: 12px; 73 margin-top: 12px; 74 display: block; 75 float: right; 76 background-image: url(images/resizer.gif); 77 cursor: se-resize; 78 } 79 80 .cke_skin_v2 .cke_rtl .cke_resizer 81 { 82 cursor: sw-resize; 83 background-image: url(images/resizer_rtl.gif); 84 float: left; 85 } -
_source/core/config.js
150 150 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; 151 151 */ 152 152 153 plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat, save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',153 plugins : 'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,resize,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc', 154 154 155 155 /** 156 156 * List of additional plugins to be loaded. This is a tool setting which