/*! * VisualEditor UserInterface Dialog class. * * @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt * @license The MIT License (MIT); see LICENSE.txt */ /** * UserInterface dialog. * * @class * @abstract * * @constructor * @param {ve.Surface} surface */ ve.ui.Dialog = function VeUiDialog( surface ) { // Parent constructor ve.EventEmitter.call( this ); // Properties this.surface = surface; this.visible = false; this.$ = $( '
' ); // Initialization this.cancelButton = new ve.ui.ButtonWidget( { 'label': ve.msg( 'cancel' ) } ); this.cancelButton.on( 'click', ve.bind( surface.target.closeDialog, surface.target ) ); this.applyButton = new ve.ui.ButtonWidget( { 'label': ve.msg( 'visualeditor-dialog-label-apply' ), 'flags': ['constructive'], 'disabled': false } ); this.applyButton.on( 'click', ve.bind( this.onApply, this ) ); // Base elements this.$title = $( '' ).text( ve.msg( this.constructor.static.dialogTitleMessage ) ); this.$actions = $( '