diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-12-04 18:55:29 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2017-12-04 18:55:29 +0100 |
commit | 1794320dcfdfcd19572fb1676294f9853a6bbc20 (patch) | |
tree | a4c9e978947d6930d50391747382d7f95a5863e3 /sources/plugins/maximize | |
parent | 7183f6a6a21ad9124e70c997e0168459f377a9f2 (diff) | |
download | ludivine-ckeditor-component-1794320dcfdfcd19572fb1676294f9853a6bbc20.tar.gz ludivine-ckeditor-component-1794320dcfdfcd19572fb1676294f9853a6bbc20.tar.zst ludivine-ckeditor-component-1794320dcfdfcd19572fb1676294f9853a6bbc20.zip |
Diffstat (limited to 'sources/plugins/maximize')
-rw-r--r-- | sources/plugins/maximize/lang/es-mx.js | 8 | ||||
-rw-r--r-- | sources/plugins/maximize/plugin.js | 32 |
2 files changed, 24 insertions, 16 deletions
diff --git a/sources/plugins/maximize/lang/es-mx.js b/sources/plugins/maximize/lang/es-mx.js new file mode 100644 index 0000000..f47486c --- /dev/null +++ b/sources/plugins/maximize/lang/es-mx.js | |||
@@ -0,0 +1,8 @@ | |||
1 | /* | ||
2 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
3 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
4 | */ | ||
5 | CKEDITOR.plugins.setLang( 'maximize', 'es-mx', { | ||
6 | maximize: 'Maximizar', | ||
7 | minimize: 'Minimizar' | ||
8 | } ); | ||
diff --git a/sources/plugins/maximize/plugin.js b/sources/plugins/maximize/plugin.js index 16967a0..fbce920 100644 --- a/sources/plugins/maximize/plugin.js +++ b/sources/plugins/maximize/plugin.js | |||
@@ -51,7 +51,7 @@ | |||
51 | } | 51 | } |
52 | 52 | ||
53 | retval.inline = $element.style.cssText || ''; | 53 | retval.inline = $element.style.cssText || ''; |
54 | if ( !isInsideEditor ) // Reset any external styles that might interfere. (#2474) | 54 | if ( !isInsideEditor ) // Reset any external styles that might interfere. (http://dev.ckeditor.com/ticket/2474) |
55 | $element.style.cssText = 'position: static; overflow: visible'; | 55 | $element.style.cssText = 'position: static; overflow: visible'; |
56 | 56 | ||
57 | restoreFormStyles( data ); | 57 | restoreFormStyles( data ); |
@@ -72,14 +72,14 @@ | |||
72 | if ( editor.editable().isInline() ) | 72 | if ( editor.editable().isInline() ) |
73 | return; | 73 | return; |
74 | 74 | ||
75 | // Refresh all editor instances on the page (#5724). | 75 | // Refresh all editor instances on the page (http://dev.ckeditor.com/ticket/5724). |
76 | var all = CKEDITOR.instances; | 76 | var all = CKEDITOR.instances; |
77 | for ( var i in all ) { | 77 | for ( var i in all ) { |
78 | var one = all[ i ]; | 78 | var one = all[ i ]; |
79 | if ( one.mode == 'wysiwyg' && !one.readOnly ) { | 79 | if ( one.mode == 'wysiwyg' && !one.readOnly ) { |
80 | var body = one.document.getBody(); | 80 | var body = one.document.getBody(); |
81 | // Refresh 'contentEditable' otherwise | 81 | // Refresh 'contentEditable' otherwise |
82 | // DOM lifting breaks design mode. (#5560) | 82 | // DOM lifting breaks design mode. (http://dev.ckeditor.com/ticket/5560) |
83 | body.setAttribute( 'contentEditable', false ); | 83 | body.setAttribute( 'contentEditable', false ); |
84 | body.setAttribute( 'contentEditable', true ); | 84 | body.setAttribute( 'contentEditable', true ); |
85 | } | 85 | } |
@@ -93,7 +93,7 @@ | |||
93 | 93 | ||
94 | CKEDITOR.plugins.add( 'maximize', { | 94 | CKEDITOR.plugins.add( 'maximize', { |
95 | // jscs:disable maximumLineLength | 95 | // jscs:disable maximumLineLength |
96 | lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% | 96 | lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% |
97 | // jscs:enable maximumLineLength | 97 | // jscs:enable maximumLineLength |
98 | icons: 'maximize', // %REMOVE_LINE_CORE% | 98 | icons: 'maximize', // %REMOVE_LINE_CORE% |
99 | hidpi: true, // %REMOVE_LINE_CORE% | 99 | hidpi: true, // %REMOVE_LINE_CORE% |
@@ -122,7 +122,7 @@ | |||
122 | var savedState = CKEDITOR.TRISTATE_OFF; | 122 | var savedState = CKEDITOR.TRISTATE_OFF; |
123 | 123 | ||
124 | editor.addCommand( 'maximize', { | 124 | editor.addCommand( 'maximize', { |
125 | // Disabled on iOS (#8307). | 125 | // Disabled on iOS (http://dev.ckeditor.com/ticket/8307). |
126 | modes: { wysiwyg: !CKEDITOR.env.iOS, source: !CKEDITOR.env.iOS }, | 126 | modes: { wysiwyg: !CKEDITOR.env.iOS, source: !CKEDITOR.env.iOS }, |
127 | readOnly: 1, | 127 | readOnly: 1, |
128 | editorFocus: false, | 128 | editorFocus: false, |
@@ -163,7 +163,7 @@ | |||
163 | 163 | ||
164 | // Hide scroll bars. | 164 | // Hide scroll bars. |
165 | var styles = { | 165 | var styles = { |
166 | overflow: CKEDITOR.env.webkit ? '' : 'hidden', // #6896 | 166 | overflow: CKEDITOR.env.webkit ? '' : 'hidden', // http://dev.ckeditor.com/ticket/6896 |
167 | width: 0, | 167 | width: 0, |
168 | height: 0 | 168 | height: 0 |
169 | }; | 169 | }; |
@@ -172,15 +172,15 @@ | |||
172 | !CKEDITOR.env.gecko && mainDocument.getDocumentElement().setStyle( 'position', 'fixed' ); | 172 | !CKEDITOR.env.gecko && mainDocument.getDocumentElement().setStyle( 'position', 'fixed' ); |
173 | !( CKEDITOR.env.gecko && CKEDITOR.env.quirks ) && mainDocument.getBody().setStyles( styles ); | 173 | !( CKEDITOR.env.gecko && CKEDITOR.env.quirks ) && mainDocument.getBody().setStyles( styles ); |
174 | 174 | ||
175 | // Scroll to the top left (IE needs some time for it - #4923). | 175 | // Scroll to the top left (IE needs some time for it - http://dev.ckeditor.com/ticket/4923). |
176 | CKEDITOR.env.ie ? setTimeout( function() { | 176 | CKEDITOR.env.ie ? setTimeout( function() { |
177 | mainWindow.$.scrollTo( 0, 0 ); | 177 | mainWindow.$.scrollTo( 0, 0 ); |
178 | }, 0 ) : mainWindow.$.scrollTo( 0, 0 ); | 178 | }, 0 ) : mainWindow.$.scrollTo( 0, 0 ); |
179 | 179 | ||
180 | // Resize and move to top left. | 180 | // Resize and move to top left. |
181 | // Special treatment for FF Quirks (#7284) | 181 | // Special treatment for FF Quirks (http://dev.ckeditor.com/ticket/7284) |
182 | container.setStyle( 'position', CKEDITOR.env.gecko && CKEDITOR.env.quirks ? 'fixed' : 'absolute' ); | 182 | container.setStyle( 'position', CKEDITOR.env.gecko && CKEDITOR.env.quirks ? 'fixed' : 'absolute' ); |
183 | container.$.offsetLeft; // SAFARI BUG: See #2066. | 183 | container.$.offsetLeft; // SAFARI BUG: See http://dev.ckeditor.com/ticket/2066. |
184 | container.setStyles( { | 184 | container.setStyles( { |
185 | // Show under floatpanels (-1) and context menu (-2). | 185 | // Show under floatpanels (-1) and context menu (-2). |
186 | 'z-index': editor.config.baseFloatZIndex - 5, | 186 | 'z-index': editor.config.baseFloatZIndex - 5, |
@@ -188,19 +188,19 @@ | |||
188 | top: '0px' | 188 | top: '0px' |
189 | } ); | 189 | } ); |
190 | 190 | ||
191 | // Add cke_maximized class before resize handle since that will change things sizes (#5580) | 191 | // Add cke_maximized class before resize handle since that will change things sizes (http://dev.ckeditor.com/ticket/5580) |
192 | container.addClass( 'cke_maximized' ); | 192 | container.addClass( 'cke_maximized' ); |
193 | 193 | ||
194 | resizeHandler(); | 194 | resizeHandler(); |
195 | 195 | ||
196 | // Still not top left? Fix it. (Bug #174) | 196 | // Still not top left? Fix it. (Bug http://dev.ckeditor.com/ticket/174) |
197 | var offset = container.getDocumentPosition(); | 197 | var offset = container.getDocumentPosition(); |
198 | container.setStyles( { | 198 | container.setStyles( { |
199 | left: ( -1 * offset.x ) + 'px', | 199 | left: ( -1 * offset.x ) + 'px', |
200 | top: ( -1 * offset.y ) + 'px' | 200 | top: ( -1 * offset.y ) + 'px' |
201 | } ); | 201 | } ); |
202 | 202 | ||
203 | // Fixing positioning editor chrome in Firefox break design mode. (#5149) | 203 | // Fixing positioning editor chrome in Firefox break design mode. (http://dev.ckeditor.com/ticket/5149) |
204 | CKEDITOR.env.gecko && refreshCursor( editor ); | 204 | CKEDITOR.env.gecko && refreshCursor( editor ); |
205 | } | 205 | } |
206 | // Restore from fullscreen if the state is on. | 206 | // Restore from fullscreen if the state is on. |
@@ -229,7 +229,7 @@ | |||
229 | // Remove cke_maximized class. | 229 | // Remove cke_maximized class. |
230 | container.removeClass( 'cke_maximized' ); | 230 | container.removeClass( 'cke_maximized' ); |
231 | 231 | ||
232 | // Webkit requires a re-layout on editor chrome. (#6695) | 232 | // Webkit requires a re-layout on editor chrome. (http://dev.ckeditor.com/ticket/6695) |
233 | if ( CKEDITOR.env.webkit ) { | 233 | if ( CKEDITOR.env.webkit ) { |
234 | container.setStyle( 'display', 'inline' ); | 234 | container.setStyle( 'display', 'inline' ); |
235 | setTimeout( function() { | 235 | setTimeout( function() { |
@@ -250,7 +250,7 @@ | |||
250 | 250 | ||
251 | // Toggle button label. | 251 | // Toggle button label. |
252 | var button = this.uiItems[ 0 ]; | 252 | var button = this.uiItems[ 0 ]; |
253 | // Only try to change the button if it exists (#6166) | 253 | // Only try to change the button if it exists (http://dev.ckeditor.com/ticket/6166) |
254 | if ( button ) { | 254 | if ( button ) { |
255 | var label = ( this.state == CKEDITOR.TRISTATE_OFF ) ? lang.maximize.maximize : lang.maximize.minimize; | 255 | var label = ( this.state == CKEDITOR.TRISTATE_OFF ) ? lang.maximize.maximize : lang.maximize.minimize; |
256 | var buttonNode = CKEDITOR.document.getById( button._.id ); | 256 | var buttonNode = CKEDITOR.document.getById( button._.id ); |
@@ -262,7 +262,7 @@ | |||
262 | // Restore selection and scroll position in editing area. | 262 | // Restore selection and scroll position in editing area. |
263 | if ( editor.mode == 'wysiwyg' ) { | 263 | if ( editor.mode == 'wysiwyg' ) { |
264 | if ( savedSelection ) { | 264 | if ( savedSelection ) { |
265 | // Fixing positioning editor chrome in Firefox break design mode. (#5149) | 265 | // Fixing positioning editor chrome in Firefox break design mode. (http://dev.ckeditor.com/ticket/5149) |
266 | CKEDITOR.env.gecko && refreshCursor( editor ); | 266 | CKEDITOR.env.gecko && refreshCursor( editor ); |
267 | 267 | ||
268 | editor.getSelection().selectRanges( savedSelection ); | 268 | editor.getSelection().selectRanges( savedSelection ); |
@@ -294,7 +294,7 @@ | |||
294 | toolbar: 'tools,10' | 294 | toolbar: 'tools,10' |
295 | } ); | 295 | } ); |
296 | 296 | ||
297 | // Restore the command state after mode change, unless it has been changed to disabled (#6467) | 297 | // Restore the command state after mode change, unless it has been changed to disabled (http://dev.ckeditor.com/ticket/6467) |
298 | editor.on( 'mode', function() { | 298 | editor.on( 'mode', function() { |
299 | var command = editor.getCommand( 'maximize' ); | 299 | var command = editor.getCommand( 'maximize' ); |
300 | command.setState( command.state == CKEDITOR.TRISTATE_DISABLED ? CKEDITOR.TRISTATE_DISABLED : savedState ); | 300 | command.setState( command.state == CKEDITOR.TRISTATE_DISABLED ? CKEDITOR.TRISTATE_DISABLED : savedState ); |