mediawiki-extensions-Visual.../modules/ve/ui/widgets/ve.ui.PendingInputWidget.js
Trevor Parscal 6a068e7d83 UI Refactor
Changed:

VisualEditor.i18n.php
* Updated Link inspector i18n messages

ve.ui.MetaDialog.js -> ve.ui.PagedDialog
* Moved paging functionality into Paged dialog

ve.ui.EditorPanelLayout -> ve.ui.PagePanelLayout.js
* Renamed from EditorPanelLayout to work nicely with the concept of
  stacks and pages

ve.ui.GroupElement.js
* Added addItem method and change addItems to use it

ve.ui.Dialog.css
* Updated classname as per refactor of meta dialog

ve.ui.StackPanelLayout.js
* Set currentItem property on showItem
* In addItems method, show currentItem with class method
** rather display block on element

ve.ui.Layout.css
* Make editorPanel layout 100% in width.

ve.ui.Widget.css
* Added CategoryWidget and CategoryPopup styles
* Other adjustments

ve.ui.PopupWidget.js
* Added auto-close on loss of focus
* Made friendly with being initialized inside a frame

ve.ui.MWLinkTargetInputWidget.js
* Mixin ve.ui.PendingInputWidget and remove pending methods
* Prevent querying on spaces
* Reintroduce i18n messages for menu sections

ve.ui.MenuWidget.js
* Update cases of $input config property to input

New:

ve.ui.PagedDialog.js
* Refactored base-class for mwMeta dialog (and probably other dialogs
  too)
* Abstracts adding and accessing pages

ve.ui.PendingInputWidget.js
* Moved pushPending and popPending methods into pending class

Change-Id: I29bcd92b7b5641941a4e98e65b2a56424a5263ff
2013-04-26 21:18:13 +00:00

39 lines
753 B
JavaScript

/*!
* VisualEditor UserInterface PendingInputWidget class.
*
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
/**
* Creates an ve.ui.PendingInputWidget object.
*
* @class
* @abstract
*
* @constructor
*/
ve.ui.PendingInputWidget = function VeUiPendingInputWidget () {
this.pending = 0;
};
/* Methods */
/**
* Adds a pending marker
*/
ve.ui.PendingInputWidget.prototype.pushPending = function () {
this.pending++;
this.$.addClass( 've-ui-pendingInputWidget' );
return this;
};
/**
* Removes a pending marker
*/
ve.ui.PendingInputWidget.prototype.popPending = function () {
this.pending--;
this.$.removeClass( 've-ui-pendingInputWidget' );
return this;
};