mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 18:39:52 +00:00
81c9b72db5
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
39 lines
717 B
JavaScript
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;
|
|
};
|