From b8d81f52389aac8119731547e430b4150107a8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Inez=20Korczyn=CC=81ski?= Date: Wed, 15 May 2013 10:01:19 -0700 Subject: [PATCH] Make MWBlockImageNode a ProtectedNode (by adding mixin). Change-Id: Ib15efaf4964f16b86020367e42848d228efd09ba --- modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js b/modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js index f7ad5f4d0d..c43bdd1a1a 100644 --- a/modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js +++ b/modules/ve/ce/nodes/ve.ce.MWBlockImageNode.js @@ -10,6 +10,8 @@ * * @class * @extends ve.ce.BranchNode + * @mixins ve.ce.ProtectedNode + * * @constructor * @param {ve.dm.MWBlockImageNode} model Model to observe * @param {Object} [config] Config options @@ -18,6 +20,9 @@ ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) { // Parent constructor ve.ce.BranchNode.call( this, model, config ); + // Mixin constructors + ve.ce.ProtectedNode.call( this ); + if ( this.model.getAttribute( 'align' ) === 'center' ) { this.$.addClass( 'center' ); this.$thumb = this.$$( '
' ).appendTo( this.$ ); @@ -48,6 +53,8 @@ ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) { ve.inheritClass( ve.ce.MWBlockImageNode, ve.ce.BranchNode ); +ve.mixinClass( ve.ce.MWBlockImageNode, ve.ce.ProtectedNode ); + /* Static Properties */ ve.ce.MWBlockImageNode.static.name = 'MWblockimage';