glebtv-ckeditor 4.0.2.5 → 4.0.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module Ckeditor
2
2
  module Version
3
- GEM = "4.0.2.5".freeze
3
+ GEM = "4.0.2.6".freeze
4
4
  EDITOR = "4.0.2".freeze
5
5
  end
6
6
  end
@@ -0,0 +1,138 @@
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
+ CKEDITOR.plugins.add( 'panelbutton', {
7
+ requires: 'button',
8
+ onLoad: function() {
9
+ function clickFn( editor ) {
10
+ var _ = this._;
11
+
12
+ if ( _.state == CKEDITOR.TRISTATE_DISABLED )
13
+ return;
14
+
15
+ this.createPanel( editor );
16
+
17
+ if ( _.on ) {
18
+ _.panel.hide();
19
+ return;
20
+ }
21
+
22
+ _.panel.showBlock( this._.id, this.document.getById( this._.id ), 4 );
23
+ }
24
+
25
+ /**
26
+ * @class
27
+ * @extends CKEDITOR.ui.button
28
+ * @todo class and methods
29
+ */
30
+ CKEDITOR.ui.panelButton = CKEDITOR.tools.createClass({
31
+ base: CKEDITOR.ui.button,
32
+
33
+ /**
34
+ * Creates a panelButton class instance.
35
+ *
36
+ * @constructor
37
+ */
38
+ $: function( definition ) {
39
+ // We don't want the panel definition in this object.
40
+ var panelDefinition = definition.panel || {};
41
+ delete definition.panel;
42
+
43
+ this.base( definition );
44
+
45
+ this.document = ( panelDefinition.parent && panelDefinition.parent.getDocument() ) || CKEDITOR.document;
46
+
47
+ panelDefinition.block = {
48
+ attributes: panelDefinition.attributes
49
+ };
50
+ panelDefinition.toolbarRelated = true;
51
+
52
+ this.hasArrow = true;
53
+
54
+ this.click = clickFn;
55
+
56
+ this._ = {
57
+ panelDefinition: panelDefinition
58
+ };
59
+ },
60
+
61
+ statics: {
62
+ handler: {
63
+ create: function( definition ) {
64
+ return new CKEDITOR.ui.panelButton( definition );
65
+ }
66
+ }
67
+ },
68
+
69
+ proto: {
70
+ createPanel: function( editor ) {
71
+ var _ = this._;
72
+
73
+ if ( _.panel )
74
+ return;
75
+
76
+ var panelDefinition = this._.panelDefinition,
77
+ panelBlockDefinition = this._.panelDefinition.block,
78
+ panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(),
79
+ panel = this._.panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ),
80
+ block = panel.addBlock( _.id, panelBlockDefinition ),
81
+ me = this;
82
+
83
+ panel.onShow = function() {
84
+ if ( me.className )
85
+ this.element.addClass( me.className + '_panel' );
86
+
87
+ me.setState( CKEDITOR.TRISTATE_ON );
88
+
89
+ _.on = 1;
90
+
91
+ me.editorFocus && editor.focus();
92
+
93
+ if ( me.onOpen )
94
+ me.onOpen();
95
+ };
96
+
97
+ panel.onHide = function( preventOnClose ) {
98
+ if ( me.className )
99
+ this.element.getFirst().removeClass( me.className + '_panel' );
100
+
101
+ me.setState( me.modes && me.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED );
102
+
103
+ _.on = 0;
104
+
105
+ if ( !preventOnClose && me.onClose )
106
+ me.onClose();
107
+ };
108
+
109
+ panel.onEscape = function() {
110
+ panel.hide( 1 );
111
+ me.document.getById( _.id ).focus();
112
+ };
113
+
114
+ if ( this.onBlock )
115
+ this.onBlock( panel, block );
116
+
117
+ block.onHide = function() {
118
+ _.on = 0;
119
+ me.setState( CKEDITOR.TRISTATE_OFF );
120
+ };
121
+ }
122
+ }
123
+ });
124
+
125
+ },
126
+ beforeInit: function( editor ) {
127
+ editor.ui.addHandler( CKEDITOR.UI_PANELBUTTON, CKEDITOR.ui.panelButton.handler );
128
+ }
129
+ });
130
+
131
+ /**
132
+ * Button UI element.
133
+ *
134
+ * @readonly
135
+ * @property {String} [='panelbutton']
136
+ * @member CKEDITOR
137
+ */
138
+ CKEDITOR.UI_PANELBUTTON = 'panelbutton';
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glebtv-ckeditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2.5
4
+ version: 4.0.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -139,6 +139,7 @@ files:
139
139
  - vendor/assets/javascripts/ckeditor/plugins/fakeobjects/images/spacer.gif
140
140
  - vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js
141
141
  - vendor/assets/javascripts/ckeditor/plugins/image/images/noimage.png
142
+ - vendor/assets/javascripts/ckeditor/plugins/panelbutton/plugin.js
142
143
  - vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js
143
144
  - vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js
144
145
  - vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/toolbar.css