Skip to content

Commit

Permalink
Merge branch 't/10851' into major
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Oct 18, 2013
2 parents e49980f + 6742acc commit 2849cd0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/image2/dialogs/image2.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ CKEDITOR.dialog.add( 'image2', function( editor ) {
},
onShow: function() {
// Create a "global" reference to edited widget.
widget = this._.widget;
widget = this.widget;

// Create a "global" reference to widget's image.
image = widget.parts.image;
Expand Down
5 changes: 5 additions & 0 deletions plugins/image2/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@
this.on( 'contextMenu', function( evt ) {
evt.data.image2 = CKEDITOR.TRISTATE_OFF;
} );

// Pass the reference to this widget to the dialog.
this.on( 'dialog', function( evt ) {
evt.data.widget = this;
}, this );
},

upcast: upcastWidgetElement,
Expand Down
3 changes: 0 additions & 3 deletions plugins/widget/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,6 @@
if ( !that.fire( 'dialog', dialog ) )
return;

// Make widget accessible beyond setup and commit.
dialog._.widget = that;

showListener = dialog.on( 'show', function() {
dialog.setupContent( that );
} );
Expand Down

0 comments on commit 2849cd0

Please sign in to comment.