rich 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rich/version.rb +1 -1
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/icons/maximize.png +0 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/af.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ar.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/bg.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/bn.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/bs.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ca.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/cs.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/cy.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/da.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/de.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/el.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/en-au.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/en-ca.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/en-gb.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/en.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/eo.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/es.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/et.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/eu.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fa.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fi.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fo.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fr-ca.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fr.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/gl.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/gu.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/he.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/hi.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/hr.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/hu.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/is.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/it.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ja.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ka.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/km.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ko.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ku.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/lt.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/lv.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/mk.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/mn.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ms.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/nb.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/nl.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/no.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/pl.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/pt-br.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/pt.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ro.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ru.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sk.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sl.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sr-latn.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sr.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sv.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/th.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/tr.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ug.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/uk.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/vi.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/zh-cn.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/zh.js +8 -0
- data/vendor/assets/ckeditor/ckeditor/plugins/maximize/plugin.js +301 -0
- metadata +65 -1
data/lib/rich/version.rb
CHANGED
Binary file
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'bn', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'bs', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'en-au', {
|
6
|
+
maximize: 'Maximize',
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'en-ca', {
|
6
|
+
maximize: 'Maximize',
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'fr-ca', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'gl', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'is', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'km', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'ko', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'mk', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'mn', {
|
6
|
+
maximize: 'Дэлгэц дүүргэх',
|
7
|
+
minimize: 'Цонхыг багсгаж харуулах'
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'ms', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'sr-latn', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'sr', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
CKEDITOR.plugins.setLang( 'maximize', 'th', {
|
6
|
+
maximize: 'Maximize', // MISSING
|
7
|
+
minimize: 'Minimize' // MISSING
|
8
|
+
});
|
@@ -0,0 +1,301 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.html or http://ckeditor.com/license
|
4
|
+
*/
|
5
|
+
|
6
|
+
(function() {
|
7
|
+
function protectFormStyles( formElement ) {
|
8
|
+
if ( !formElement || formElement.type != CKEDITOR.NODE_ELEMENT || formElement.getName() != 'form' )
|
9
|
+
return [];
|
10
|
+
|
11
|
+
var hijackRecord = [],
|
12
|
+
hijackNames = [ 'style', 'className' ];
|
13
|
+
for ( var i = 0; i < hijackNames.length; i++ ) {
|
14
|
+
var name = hijackNames[ i ];
|
15
|
+
var $node = formElement.$.elements.namedItem( name );
|
16
|
+
if ( $node ) {
|
17
|
+
var hijackNode = new CKEDITOR.dom.element( $node );
|
18
|
+
hijackRecord.push( [ hijackNode, hijackNode.nextSibling ] );
|
19
|
+
hijackNode.remove();
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
return hijackRecord;
|
24
|
+
}
|
25
|
+
|
26
|
+
function restoreFormStyles( formElement, hijackRecord ) {
|
27
|
+
if ( !formElement || formElement.type != CKEDITOR.NODE_ELEMENT || formElement.getName() != 'form' )
|
28
|
+
return;
|
29
|
+
|
30
|
+
if ( hijackRecord.length > 0 ) {
|
31
|
+
for ( var i = hijackRecord.length - 1; i >= 0; i-- ) {
|
32
|
+
var node = hijackRecord[ i ][ 0 ];
|
33
|
+
var sibling = hijackRecord[ i ][ 1 ];
|
34
|
+
if ( sibling )
|
35
|
+
node.insertBefore( sibling );
|
36
|
+
else
|
37
|
+
node.appendTo( formElement );
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
function saveStyles( element, isInsideEditor ) {
|
43
|
+
var data = protectFormStyles( element );
|
44
|
+
var retval = {};
|
45
|
+
|
46
|
+
var $element = element.$;
|
47
|
+
|
48
|
+
if ( !isInsideEditor ) {
|
49
|
+
retval[ 'class' ] = $element.className || '';
|
50
|
+
$element.className = '';
|
51
|
+
}
|
52
|
+
|
53
|
+
retval.inline = $element.style.cssText || '';
|
54
|
+
if ( !isInsideEditor ) // Reset any external styles that might interfere. (#2474)
|
55
|
+
$element.style.cssText = 'position: static; overflow: visible';
|
56
|
+
|
57
|
+
restoreFormStyles( data );
|
58
|
+
return retval;
|
59
|
+
}
|
60
|
+
|
61
|
+
function restoreStyles( element, savedStyles ) {
|
62
|
+
var data = protectFormStyles( element );
|
63
|
+
var $element = element.$;
|
64
|
+
if ( 'class' in savedStyles )
|
65
|
+
$element.className = savedStyles[ 'class' ];
|
66
|
+
if ( 'inline' in savedStyles )
|
67
|
+
$element.style.cssText = savedStyles.inline;
|
68
|
+
restoreFormStyles( data );
|
69
|
+
}
|
70
|
+
|
71
|
+
function refreshCursor( editor ) {
|
72
|
+
// Refresh all editor instances on the page (#5724).
|
73
|
+
var all = CKEDITOR.instances;
|
74
|
+
for ( var i in all ) {
|
75
|
+
var one = all[ i ];
|
76
|
+
if ( one.mode == 'wysiwyg' && !one.readOnly ) {
|
77
|
+
var body = one.document.getBody();
|
78
|
+
// Refresh 'contentEditable' otherwise
|
79
|
+
// DOM lifting breaks design mode. (#5560)
|
80
|
+
body.setAttribute( 'contentEditable', false );
|
81
|
+
body.setAttribute( 'contentEditable', true );
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
if ( editor.editable().hasFocus ) {
|
86
|
+
editor.toolbox.focus();
|
87
|
+
editor.focus();
|
88
|
+
}
|
89
|
+
}
|
90
|
+
|
91
|
+
CKEDITOR.plugins.add( 'maximize', {
|
92
|
+
lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en-au,en-ca,en-gb,en,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,ug,uk,vi,zh-cn,zh', // %REMOVE_LINE_CORE%
|
93
|
+
icons: 'maximize', // %REMOVE_LINE_CORE%
|
94
|
+
init: function( editor ) {
|
95
|
+
// Maximize plugin isn't available in inline mode yet.
|
96
|
+
if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_INLINE )
|
97
|
+
return;
|
98
|
+
|
99
|
+
var lang = editor.lang;
|
100
|
+
var mainDocument = CKEDITOR.document,
|
101
|
+
mainWindow = mainDocument.getWindow();
|
102
|
+
|
103
|
+
// Saved selection and scroll position for the editing area.
|
104
|
+
var savedSelection, savedScroll;
|
105
|
+
|
106
|
+
// Saved scroll position for the outer window.
|
107
|
+
var outerScroll;
|
108
|
+
|
109
|
+
// Saved resize handler function.
|
110
|
+
function resizeHandler() {
|
111
|
+
var viewPaneSize = mainWindow.getViewPaneSize();
|
112
|
+
editor.resize( viewPaneSize.width, viewPaneSize.height, null, true );
|
113
|
+
}
|
114
|
+
|
115
|
+
// Retain state after mode switches.
|
116
|
+
var savedState = CKEDITOR.TRISTATE_OFF;
|
117
|
+
|
118
|
+
editor.addCommand( 'maximize', {
|
119
|
+
// Disabled on iOS (#8307).
|
120
|
+
modes: { wysiwyg: !CKEDITOR.env.iOS, source: !CKEDITOR.env.iOS },
|
121
|
+
readOnly: 1,
|
122
|
+
editorFocus: false,
|
123
|
+
exec: function() {
|
124
|
+
var container = editor.container.getChild( 1 );
|
125
|
+
var contents = editor.ui.space( 'contents' );
|
126
|
+
|
127
|
+
// Save current selection and scroll position in editing area.
|
128
|
+
if ( editor.mode == 'wysiwyg' ) {
|
129
|
+
var selection = editor.getSelection();
|
130
|
+
savedSelection = selection && selection.getRanges();
|
131
|
+
savedScroll = mainWindow.getScrollPosition();
|
132
|
+
} else {
|
133
|
+
var $textarea = editor.editable().$;
|
134
|
+
savedSelection = !CKEDITOR.env.ie && [ $textarea.selectionStart, $textarea.selectionEnd ];
|
135
|
+
savedScroll = [ $textarea.scrollLeft, $textarea.scrollTop ];
|
136
|
+
}
|
137
|
+
|
138
|
+
if ( this.state == CKEDITOR.TRISTATE_OFF ) // Go fullscreen if the state is off.
|
139
|
+
{
|
140
|
+
// Add event handler for resizing.
|
141
|
+
mainWindow.on( 'resize', resizeHandler );
|
142
|
+
|
143
|
+
// Save the scroll bar position.
|
144
|
+
outerScroll = mainWindow.getScrollPosition();
|
145
|
+
|
146
|
+
// Save and reset the styles for the entire node tree.
|
147
|
+
var currentNode = editor.container;
|
148
|
+
while ( ( currentNode = currentNode.getParent() ) ) {
|
149
|
+
currentNode.setCustomData( 'maximize_saved_styles', saveStyles( currentNode ) );
|
150
|
+
// Show under floatpanels (-1) and context menu (-2).
|
151
|
+
currentNode.setStyle( 'z-index', editor.config.baseFloatZIndex - 5 );
|
152
|
+
}
|
153
|
+
contents.setCustomData( 'maximize_saved_styles', saveStyles( contents, true ) );
|
154
|
+
container.setCustomData( 'maximize_saved_styles', saveStyles( container, true ) );
|
155
|
+
|
156
|
+
// Hide scroll bars.
|
157
|
+
var styles = {
|
158
|
+
overflow: CKEDITOR.env.webkit ? '' : 'hidden', // #6896
|
159
|
+
width: 0,
|
160
|
+
height: 0
|
161
|
+
};
|
162
|
+
|
163
|
+
mainDocument.getDocumentElement().setStyles( styles );
|
164
|
+
!CKEDITOR.env.gecko && mainDocument.getDocumentElement().setStyle( 'position', 'fixed' );
|
165
|
+
!( CKEDITOR.env.gecko && CKEDITOR.env.quirks ) && mainDocument.getBody().setStyles( styles );
|
166
|
+
|
167
|
+
// Scroll to the top left (IE needs some time for it - #4923).
|
168
|
+
CKEDITOR.env.ie ? setTimeout( function() {
|
169
|
+
mainWindow.$.scrollTo( 0, 0 );
|
170
|
+
}, 0 ) : mainWindow.$.scrollTo( 0, 0 );
|
171
|
+
|
172
|
+
// Resize and move to top left.
|
173
|
+
// Special treatment for FF Quirks (#7284)
|
174
|
+
container.setStyle( 'position', CKEDITOR.env.gecko && CKEDITOR.env.quirks ? 'fixed' : 'absolute' );
|
175
|
+
container.$.offsetLeft; // SAFARI BUG: See #2066.
|
176
|
+
container.setStyles({
|
177
|
+
// Show under floatpanels (-1) and context menu (-2).
|
178
|
+
'z-index': editor.config.baseFloatZIndex - 5,
|
179
|
+
left: '0px',
|
180
|
+
top: '0px'
|
181
|
+
});
|
182
|
+
|
183
|
+
// Add cke_maximized class before resize handle since that will change things sizes (#5580)
|
184
|
+
container.addClass( 'cke_maximized' );
|
185
|
+
|
186
|
+
resizeHandler();
|
187
|
+
|
188
|
+
// Still not top left? Fix it. (Bug #174)
|
189
|
+
var offset = container.getDocumentPosition();
|
190
|
+
container.setStyles({
|
191
|
+
left: ( -1 * offset.x ) + 'px',
|
192
|
+
top: ( -1 * offset.y ) + 'px'
|
193
|
+
});
|
194
|
+
|
195
|
+
// Fixing positioning editor chrome in Firefox break design mode. (#5149)
|
196
|
+
CKEDITOR.env.gecko && refreshCursor( editor );
|
197
|
+
|
198
|
+
} else if ( this.state == CKEDITOR.TRISTATE_ON ) // Restore from fullscreen if the state is on.
|
199
|
+
{
|
200
|
+
// Remove event handler for resizing.
|
201
|
+
mainWindow.removeListener( 'resize', resizeHandler );
|
202
|
+
|
203
|
+
// Restore CSS styles for the entire node tree.
|
204
|
+
var editorElements = [ contents, container ];
|
205
|
+
for ( var i = 0; i < editorElements.length; i++ ) {
|
206
|
+
restoreStyles( editorElements[ i ], editorElements[ i ].getCustomData( 'maximize_saved_styles' ) );
|
207
|
+
editorElements[ i ].removeCustomData( 'maximize_saved_styles' );
|
208
|
+
}
|
209
|
+
|
210
|
+
currentNode = editor.container;
|
211
|
+
while ( ( currentNode = currentNode.getParent() ) ) {
|
212
|
+
restoreStyles( currentNode, currentNode.getCustomData( 'maximize_saved_styles' ) );
|
213
|
+
currentNode.removeCustomData( 'maximize_saved_styles' );
|
214
|
+
}
|
215
|
+
|
216
|
+
// Restore the window scroll position.
|
217
|
+
CKEDITOR.env.ie ? setTimeout( function() {
|
218
|
+
mainWindow.$.scrollTo( outerScroll.x, outerScroll.y );
|
219
|
+
}, 0 ) : mainWindow.$.scrollTo( outerScroll.x, outerScroll.y );
|
220
|
+
|
221
|
+
// Remove cke_maximized class.
|
222
|
+
container.removeClass( 'cke_maximized' );
|
223
|
+
|
224
|
+
// Webkit requires a re-layout on editor chrome. (#6695)
|
225
|
+
if ( CKEDITOR.env.webkit ) {
|
226
|
+
container.setStyle( 'display', 'inline' );
|
227
|
+
setTimeout( function() {
|
228
|
+
container.setStyle( 'display', 'block' );
|
229
|
+
}, 0 );
|
230
|
+
}
|
231
|
+
|
232
|
+
// Emit a resize event, because this time the size is modified in
|
233
|
+
// restoreStyles.
|
234
|
+
editor.fire( 'resize' );
|
235
|
+
}
|
236
|
+
|
237
|
+
this.toggleState();
|
238
|
+
|
239
|
+
// Toggle button label.
|
240
|
+
var button = this.uiItems[ 0 ];
|
241
|
+
// Only try to change the button if it exists (#6166)
|
242
|
+
if ( button ) {
|
243
|
+
var label = ( this.state == CKEDITOR.TRISTATE_OFF ) ? lang.maximize.maximize : lang.maximize.minimize;
|
244
|
+
var buttonNode = CKEDITOR.document.getById( button._.id );
|
245
|
+
buttonNode.getChild( 1 ).setHtml( label );
|
246
|
+
buttonNode.setAttribute( 'title', label );
|
247
|
+
buttonNode.setAttribute( 'href', 'javascript:void("' + label + '");' );
|
248
|
+
}
|
249
|
+
|
250
|
+
// Restore selection and scroll position in editing area.
|
251
|
+
if ( editor.mode == 'wysiwyg' ) {
|
252
|
+
if ( savedSelection ) {
|
253
|
+
// Fixing positioning editor chrome in Firefox break design mode. (#5149)
|
254
|
+
CKEDITOR.env.gecko && refreshCursor( editor );
|
255
|
+
|
256
|
+
editor.getSelection().selectRanges( savedSelection );
|
257
|
+
var element = editor.getSelection().getStartElement();
|
258
|
+
element && element.scrollIntoView( true );
|
259
|
+
} else
|
260
|
+
mainWindow.$.scrollTo( savedScroll.x, savedScroll.y );
|
261
|
+
} else {
|
262
|
+
if ( savedSelection ) {
|
263
|
+
$textarea.selectionStart = savedSelection[ 0 ];
|
264
|
+
$textarea.selectionEnd = savedSelection[ 1 ];
|
265
|
+
}
|
266
|
+
$textarea.scrollLeft = savedScroll[ 0 ];
|
267
|
+
$textarea.scrollTop = savedScroll[ 1 ];
|
268
|
+
}
|
269
|
+
|
270
|
+
savedSelection = savedScroll = null;
|
271
|
+
savedState = this.state;
|
272
|
+
|
273
|
+
editor.fire( 'maximize', this.state );
|
274
|
+
},
|
275
|
+
canUndo: false
|
276
|
+
});
|
277
|
+
|
278
|
+
editor.ui.addButton && editor.ui.addButton( 'Maximize', {
|
279
|
+
label: lang.maximize.maximize,
|
280
|
+
command: 'maximize',
|
281
|
+
toolbar: 'tools,10'
|
282
|
+
});
|
283
|
+
|
284
|
+
// Restore the command state after mode change, unless it has been changed to disabled (#6467)
|
285
|
+
editor.on( 'mode', function() {
|
286
|
+
var command = editor.getCommand( 'maximize' );
|
287
|
+
command.setState( command.state == CKEDITOR.TRISTATE_DISABLED ? CKEDITOR.TRISTATE_DISABLED : savedState );
|
288
|
+
}, null, null, 100 );
|
289
|
+
}
|
290
|
+
});
|
291
|
+
})();
|
292
|
+
|
293
|
+
/**
|
294
|
+
* Event fired when the maximize command is called.
|
295
|
+
* It also indicates whether an editor is maximized or not.
|
296
|
+
*
|
297
|
+
* @event maximize
|
298
|
+
* @member CKEDITOR.editor
|
299
|
+
* @param {CKEDITOR.editor} editor This editor instance.
|
300
|
+
* @param {Number} data Current state of the command. See {@link CKEDITOR#TRISTATE_ON} and {@link CKEDITOR#TRISTATE_OFF}.
|
301
|
+
*/
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rich
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -320,6 +320,70 @@ files:
|
|
320
320
|
- vendor/assets/ckeditor/ckeditor/plugins/link/images/anchor.png
|
321
321
|
- vendor/assets/ckeditor/ckeditor/plugins/liststyle/dialogs/liststyle.js
|
322
322
|
- vendor/assets/ckeditor/ckeditor/plugins/magicline/images/icon.png
|
323
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/icons/maximize.png
|
324
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/af.js
|
325
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ar.js
|
326
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/bg.js
|
327
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/bn.js
|
328
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/bs.js
|
329
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ca.js
|
330
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/cs.js
|
331
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/cy.js
|
332
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/da.js
|
333
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/de.js
|
334
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/el.js
|
335
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/en-au.js
|
336
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/en-ca.js
|
337
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/en-gb.js
|
338
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/en.js
|
339
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/eo.js
|
340
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/es.js
|
341
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/et.js
|
342
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/eu.js
|
343
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fa.js
|
344
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fi.js
|
345
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fo.js
|
346
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fr-ca.js
|
347
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/fr.js
|
348
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/gl.js
|
349
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/gu.js
|
350
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/he.js
|
351
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/hi.js
|
352
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/hr.js
|
353
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/hu.js
|
354
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/is.js
|
355
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/it.js
|
356
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ja.js
|
357
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ka.js
|
358
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/km.js
|
359
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ko.js
|
360
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ku.js
|
361
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/lt.js
|
362
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/lv.js
|
363
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/mk.js
|
364
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/mn.js
|
365
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ms.js
|
366
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/nb.js
|
367
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/nl.js
|
368
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/no.js
|
369
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/pl.js
|
370
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/pt-br.js
|
371
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/pt.js
|
372
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ro.js
|
373
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ru.js
|
374
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sk.js
|
375
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sl.js
|
376
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sr-latn.js
|
377
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sr.js
|
378
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/sv.js
|
379
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/th.js
|
380
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/tr.js
|
381
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/ug.js
|
382
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/uk.js
|
383
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/vi.js
|
384
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/zh-cn.js
|
385
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/lang/zh.js
|
386
|
+
- vendor/assets/ckeditor/ckeditor/plugins/maximize/plugin.js
|
323
387
|
- vendor/assets/ckeditor/ckeditor/plugins/pagebreak/images/pagebreak.gif
|
324
388
|
- vendor/assets/ckeditor/ckeditor/plugins/pastefromword/filter/default.js
|
325
389
|
- vendor/assets/ckeditor/ckeditor/plugins/preview/preview.html
|