Wrap <img> in <a> inside image thumb in order to match MediaWiki parser output.

Change-Id: I91cfcd9ea319b4429abbbe9ddbb07d1cd8a65b62
This commit is contained in:
Inez Korczyński 2013-05-17 11:42:27 -07:00
parent 4f14fddd2b
commit e196c2f247

View file

@ -41,12 +41,17 @@ ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) {
.css( 'width', parseInt( this.model.getAttribute( 'width' ), 10 ) + 2 )
.appendTo( this.$thumb );
this.$a = this.$$( '<a>' )
.addClass( 'image' )
.attr( 'src', this.model.getAttribute( 'href' ) )
.appendTo( this.$thumbInner );
this.$image = this.$$( '<img>' )
.addClass( 'thumbimage' )
.attr( 'src', this.model.getAttribute( 'src' ) )
.attr( 'width', this.model.getAttribute( 'width' ) )
.attr( 'height', this.model.getAttribute( 'height' ) )
.appendTo( this.$thumbInner );
.appendTo( this.$a );
};
/* Inheritance */