mediawiki-extensions-Visual.../modules/ve/ui/ve.ui.Dialog.js
Rob Moen 81c9b72db5 Introduce dialogs
Major changes:

demos/ve/index.php
* Renamed ve-demo-content to ve-demo-editor

ve.init.mw.ViewPageTarget, ve.init.sa.Target
* Added handlers for dialog events

ve.ui.*Dialog.js
* Added skeleton classes for dialogs

ve.init.Target.js
* Create abstract class methods for Target.

ve.init.sa.Target.js
* Create Standalone target view methods.

ve.init.mw.Target.js
* Added MW specific target view methods.
* Integration action buttons are now added to the edit
view in the toolbar.

ve.Surface.js
* Simplified constructor, now requiring a target which contains the container

* Other changes include some documentation and code cleanup.

Bug: 39597
Change-Id: Iff39266bdd3052f34bda254ca407030dbbc81f26
2013-03-06 14:19:15 -08:00

39 lines
717 B
JavaScript

/*!
* 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.ui.Surface} surface
*/
ve.ui.Dialog = function VeUiDialog( surface ) {
// Properties
this.surface = surface;
this.visible = false;
this.$ = $( '<div class="ve-ui-dialog"></div>' );
};
/* Methods */
ve.ui.Dialog.prototype.isVisible = function () {
return this.visible;
};
ve.ui.Dialog.prototype.show = function () {
this.$.show();
this.visible = true;
};
ve.ui.Dialog.prototype.hide = function () {
this.$.hide();
this.visible = false;
};