Append error container to inspector

Also modify method that formats the error so only
the text is appended.

Depends on Ie84130d4ac0 in VE-MW.

Bug: T113172
Change-Id: I5310f22877f56d1828a9d1782ee335d5793700df
This commit is contained in:
Thalia 2015-10-05 00:05:09 +01:00
parent d81a1ff7ad
commit d24748769f

View file

@ -85,7 +85,12 @@ ve.ui.MWMathInspector.prototype.initialize = function () {
// Initialization
this.$content.addClass( 've-ui-mwMathInspector-content' );
this.form.$element.append( inputField.$element, displayField.$element, idField.$element );
this.form.$element.append(
inputField.$element,
this.$generatedContentsErrorContainer,
displayField.$element,
idField.$element
);
};
/**
@ -126,6 +131,13 @@ ve.ui.MWMathInspector.prototype.updateMwData = function ( mwData ) {
mwData.attrs.id = id || undefined;
};
/**
* @inheritdoc
*/
ve.ui.MWMathInspector.prototype.formatGeneratedContentsError = function ( $element ) {
return $element.text().trim();
};
/* Registration */
ve.ui.windowFactory.register( ve.ui.MWMathInspector );