New changes:
0557719 Use README.md as doxygen main page
290f8a9 Remove accidental double try-catch from
76800b47
e7039d0 Revert "Revert "Show the modal overlay as soon as openWindow is called""
61ac646 Fix lots of spelling mistakes and typos
5b381ae build: Create a 'typos' task to detect common typos
f21c8eb FieldLayout: Only use <label> for InputWidgets
39e8522 Localisation updates from https://translatewiki.net.
16eb98d PHP: Reject malformed and potentially evil input when outputting HTML
Change-Id: Ie039a451cf03eaf21e16538cfca270b1d9b8f7f9
"ooui-dialog-message-reject": "Cancelar",
"ooui-dialog-process-error": "Algo salió mal",
"ooui-dialog-process-dismiss": "Descartar",
"ooui-dialog-message-reject": "Cancelar",
"ooui-dialog-process-error": "Algo salió mal",
"ooui-dialog-process-dismiss": "Descartar",
- "ooui-dialog-process-retry": "Intentar de nuevo"
+ "ooui-dialog-process-retry": "Intentar de nuevo",
+ "ooui-dialog-process-continue": "Continuar"
"Urhixidur",
"Verdy p",
"Wyz",
"Urhixidur",
"Verdy p",
"Wyz",
+ "SnowedEarth",
+ "Jdforrester"
]
},
"ooui-outline-control-move-down": "Faire descendre l’élément",
]
},
"ooui-outline-control-move-down": "Faire descendre l’élément",
"ooui-outline-control-remove": "Supprimer l’élément",
"ooui-toolbar-more": "Plus",
"ooui-toolgroup-expand": "Plus",
"ooui-outline-control-remove": "Supprimer l’élément",
"ooui-toolbar-more": "Plus",
"ooui-toolgroup-expand": "Plus",
+ "ooui-toolgroup-collapse": "Moins",
"ooui-dialog-message-accept": "OK",
"ooui-dialog-message-reject": "Annuler",
"ooui-dialog-process-error": "Quelque chose a mal tourné",
"ooui-dialog-process-dismiss": "Rejeter",
"ooui-dialog-message-accept": "OK",
"ooui-dialog-message-reject": "Annuler",
"ooui-dialog-process-error": "Quelque chose a mal tourné",
"ooui-dialog-process-dismiss": "Rejeter",
- "ooui-dialog-process-retry": "Réessayez"
+ "ooui-dialog-process-retry": "Réessayez",
+ "ooui-dialog-process-continue": "Continuer"
"ooui-outline-control-move-up": "Ol baasi",
"ooui-outline-control-remove": "Balleessi",
"ooui-toolbar-more": "Dabalata",
"ooui-outline-control-move-up": "Ol baasi",
"ooui-outline-control-remove": "Balleessi",
"ooui-toolbar-more": "Dabalata",
+ "ooui-toolgroup-expand": "Dabalata",
+ "ooui-toolgroup-collapse": "Xiqqaa",
"ooui-dialog-message-accept": "Tole",
"ooui-dialog-message-reject": "Dhiisi",
"ooui-dialog-process-error": "Dogoggorri wayii ummameera",
"ooui-dialog-process-dismiss": "Didi",
"ooui-dialog-message-accept": "Tole",
"ooui-dialog-message-reject": "Dhiisi",
"ooui-dialog-process-error": "Dogoggorri wayii ummameera",
"ooui-dialog-process-dismiss": "Didi",
- "ooui-dialog-process-retry": "Itti deebi'ii yaali"
+ "ooui-dialog-process-retry": "Itti deebi'ii yaali",
+ "ooui-dialog-process-continue": "Itti fufi"
- * OOjs UI v0.1.0-pre (d4cfcce969)
+ * OOjs UI v0.1.0-pre (23565e7519)
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2014-11-21T00:12:46Z
+ * Date: 2014-11-21T22:18:30Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
height: 0;
overflow: hidden;
}
height: 0;
overflow: hidden;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
width: auto;
height: auto;
top: 0;
width: auto;
height: auto;
top: 0;
overflow: hidden;
max-width: 100%;
max-height: 100%;
overflow: hidden;
max-width: 100%;
max-height: 100%;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame > iframe {
width: 100%;
height: 100%;
}
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame > iframe {
width: 100%;
height: 100%;
}
+.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
+ visibility: hidden;
+}
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
- * OOjs UI v0.1.0-pre (d4cfcce969)
+ * OOjs UI v0.1.0-pre (23565e7519)
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2014-11-21T00:12:34Z
+ * Date: 2014-11-21T22:18:20Z
- * OOjs UI v0.1.0-pre (d4cfcce969)
+ * OOjs UI v0.1.0-pre (23565e7519)
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2014-11-21T00:12:46Z
+ * Date: 2014-11-21T22:18:30Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
height: 0;
overflow: hidden;
}
height: 0;
overflow: hidden;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
width: auto;
height: auto;
top: 0;
width: auto;
height: auto;
top: 0;
overflow: hidden;
max-width: 100%;
max-height: 100%;
overflow: hidden;
max-width: 100%;
max-height: 100%;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame > iframe {
width: 100%;
height: 100%;
}
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame > iframe {
width: 100%;
height: 100%;
}
+.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
+ visibility: hidden;
+}
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
- * OOjs UI v0.1.0-pre (d4cfcce969)
+ * OOjs UI v0.1.0-pre (23565e7519)
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2014-11-21T00:12:46Z
+ * Date: 2014-11-21T22:18:30Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
height: 0;
overflow: hidden;
}
height: 0;
overflow: hidden;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
width: auto;
height: auto;
top: 0;
width: auto;
height: auto;
top: 0;
overflow: hidden;
max-width: 100%;
max-height: 100%;
overflow: hidden;
max-width: 100%;
max-height: 100%;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame > iframe {
width: 100%;
height: 100%;
}
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame > iframe {
width: 100%;
height: 100%;
}
+.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
+ visibility: hidden;
+}
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
- * OOjs UI v0.1.0-pre (d4cfcce969)
+ * OOjs UI v0.1.0-pre (23565e7519)
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2014-11-21T00:12:34Z
+ * Date: 2014-11-21T22:18:20Z
- * OOjs UI v0.1.0-pre (d4cfcce969)
+ * OOjs UI v0.1.0-pre (23565e7519)
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2014-11-21T00:12:46Z
+ * Date: 2014-11-21T22:18:30Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
height: 0;
overflow: hidden;
}
height: 0;
overflow: hidden;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
width: auto;
height: auto;
top: 0;
width: auto;
height: auto;
top: 0;
overflow: hidden;
max-width: 100%;
max-height: 100%;
overflow: hidden;
max-width: 100%;
max-height: 100%;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame > iframe {
width: 100%;
height: 100%;
}
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup > .oo-ui-window-frame > iframe {
width: 100%;
height: 100%;
}
+.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
+ visibility: hidden;
+}
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
.oo-ui-windowManager-fullscreen > .oo-ui-dialog > .oo-ui-window-frame {
width: 100%;
height: 100%;
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
-o-transition: all 250ms ease-in-out;
transition: all 250ms ease-in-out;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
- * OOjs UI v0.1.0-pre (d4cfcce969)
+ * OOjs UI v0.1.0-pre (23565e7519)
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* https://www.mediawiki.org/wiki/OOjs_UI
*
* Copyright 2011–2014 OOjs Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
- * Date: 2014-11-21T00:12:34Z
+ * Date: 2014-11-21T22:18:20Z
*
* @param {HTMLElement|HTMLElement[]} containers Container node(s) to search in
* @param {HTMLElement} contained Node to find
*
* @param {HTMLElement|HTMLElement[]} containers Container node(s) to search in
* @param {HTMLElement} contained Node to find
- * @param {boolean} [matchContainers] Include the container(s) in the list of nodes to match, otherwise only match descendents
+ * @param {boolean} [matchContainers] Include the container(s) in the list of nodes to match, otherwise only match descendants
* @return {boolean} The node is in the list of target nodes
*/
OO.ui.contains = function ( containers, contained, matchContainers ) {
* @return {boolean} The node is in the list of target nodes
*/
OO.ui.contains = function ( containers, contained, matchContainers ) {
* @param {Object} [config] Configuration options
*/
OO.ui.ActionSet = function OoUiActionSet( config ) {
* @param {Object} [config] Configuration options
*/
OO.ui.ActionSet = function OoUiActionSet( config ) {
- // Configuration intialization
+ // Configuration initialization
config = config || {};
// Mixin constructors
config = config || {};
// Mixin constructors
/**
* Organize actions.
*
/**
* Organize actions.
*
- * This is called whenver organized information is requested. It will only reorganize the actions
+ * This is called whenever organized information is requested. It will only reorganize the actions
* if something has changed since the last time it ran.
*
* @private
* if something has changed since the last time it ran.
*
* @private
for ( i = 0, iLen = this.list.length; i < iLen; i++ ) {
action = this.list[i];
if ( action.isVisible() ) {
for ( i = 0, iLen = this.list.length; i < iLen; i++ ) {
action = this.list[i];
if ( action.isVisible() ) {
for ( category in this.categories ) {
if ( !this.categorized[category] ) {
this.categorized[category] = {};
for ( category in this.categories ) {
if ( !this.categorized[category] ) {
this.categorized[category] = {};
/**
* Update the theme-provided classes.
*
/**
* Update the theme-provided classes.
*
- * @localdoc This is called in element mixins and widget classes anytime state changes.
+ * @localdoc This is called in element mixins and widget classes any time state changes.
* Updating is debounced, minimizing overhead of changing multiple attributes and
* guaranteeing that theme updates do not occur within an element's constructor
*/
* Updating is debounced, minimizing overhead of changing multiple attributes and
* guaranteeing that theme updates do not occur within an element's constructor
*/
*
* Each process (setup, ready, hold and teardown) can be extended in subclasses by overriding
* {@link #getSetupProcess}, {@link #getReadyProcess}, {@link #getHoldProcess} and
*
* Each process (setup, ready, hold and teardown) can be extended in subclasses by overriding
* {@link #getSetupProcess}, {@link #getReadyProcess}, {@link #getHoldProcess} and
- * {@link #getTeardownProcess} respectively. Each process is executed in series, so asynchonous
- * processing can complete. Always assume window processes are executed asychronously. See
+ * {@link #getTeardownProcess} respectively. Each process is executed in series, so asynchronous
+ * processing can complete. Always assume window processes are executed asynchronously. See
* OO.ui.Process for more details about how to work with processes. Some events, as well as the
* #open and #close methods, provide promises which are resolved when the window enters a new state.
*
* OO.ui.Process for more details about how to work with processes. Some events, as well as the
* #open and #close methods, provide promises which are resolved when the window enters a new state.
*
* @param {Object} [config] Configuration options
* @cfg {string} [size] Symbolic name of dialog size, `small`, `medium`, `large` or `full`; omit to
* use #static-size
* @param {Object} [config] Configuration options
* @cfg {string} [size] Symbolic name of dialog size, `small`, `medium`, `large` or `full`; omit to
* use #static-size
*/
OO.ui.Window = function OoUiWindow( config ) {
// Configuration initialization
*/
OO.ui.Window = function OoUiWindow( config ) {
// Configuration initialization
this.$frame.addClass( 'oo-ui-window-frame' );
this.$overlay.addClass( 'oo-ui-window-overlay' );
this.$frame.addClass( 'oo-ui-window-frame' );
this.$overlay.addClass( 'oo-ui-window-overlay' );
- // NOTE: Additional intitialization will occur when #setManager is called
+ // NOTE: Additional initialization will occur when #setManager is called
/**
* Toggle visibility of window.
*
/**
* Toggle visibility of window.
*
- * If the window is isolated and hasn't fully loaded yet, the visiblity property will be used
+ * If the window is isolated and hasn't fully loaded yet, the visibility property will be used
* instead of display.
*
* @param {boolean} [show] Make window visible, omit to toggle visibility
* instead of display.
*
* @param {boolean} [show] Make window visible, omit to toggle visibility
* @chainable
*/
OO.ui.Window.prototype.toggle = function ( show ) {
* @chainable
*/
OO.ui.Window.prototype.toggle = function ( show ) {
- * This is called by OO.ui.WindowManager durring window opening, and should not be called directly
+ * This is called by OO.ui.WindowManager during window opening, and should not be called directly
* by other systems.
*
* @param {Object} [data] Window opening data
* by other systems.
*
* @param {Object} [data] Window opening data
- * This is called by OO.ui.WindowManager durring window opening, and should not be called directly
+ * This is called by OO.ui.WindowManager during window opening, and should not be called directly
* by other systems.
*
* @param {Object} [data] Window opening data
* by other systems.
*
* @param {Object} [data] Window opening data
- * This is called by OO.ui.WindowManager durring window closing, and should not be called directly
+ * This is called by OO.ui.WindowManager during window closing, and should not be called directly
* by other systems.
*
* @param {Object} [data] Window closing data
* by other systems.
*
* @param {Object} [data] Window closing data
- * This is called by OO.ui.WindowManager durring window closing, and should not be called directly
+ * This is called by OO.ui.WindowManager during window closing, and should not be called directly
* by other systems.
*
* @param {Object} [data] Window closing data
* by other systems.
*
* @param {Object} [data] Window closing data
this.getTeardownProcess( data ).execute().done( function () {
// Force redraw by asking the browser to measure the elements' widths
this.getTeardownProcess( data ).execute().done( function () {
// Force redraw by asking the browser to measure the elements' widths
- win.$element.removeClass( 'oo-ui-window-setup' ).width();
+ win.$element.removeClass( 'oo-ui-window-load oo-ui-window-setup' ).width();
win.$content.removeClass( 'oo-ui-window-content-setup' ).width();
win.$element.hide();
win.visible = false;
win.$content.removeClass( 'oo-ui-window-content-setup' ).width();
win.$element.hide();
win.visible = false;
/**
* Load the frame contents.
*
/**
* Load the frame contents.
*
- * Once the iframe's stylesheets are loaded, the `load` event will be emitted and the returned
- * promise will be resolved. Calling while loading will return a promise but not trigger a new
- * loading cycle. Calling after loading is complete will return a promise that's already been
- * resolved.
+ * Once the iframe's stylesheets are loaded the returned promise will be resolved. Calling while
+ * loading will return a promise but not trigger a new loading cycle. Calling after loading is
+ * complete will return a promise that's already been resolved.
*
* Sounds simple right? Read on...
*
*
* Sounds simple right? Read on...
*
* All this stylesheet injection and polling magic is in #transplantStyles.
*
* @return {jQuery.Promise} Promise resolved when loading is complete
* All this stylesheet injection and polling magic is in #transplantStyles.
*
* @return {jQuery.Promise} Promise resolved when loading is complete
*/
OO.ui.Window.prototype.load = function () {
var sub, doc, loading,
win = this;
*/
OO.ui.Window.prototype.load = function () {
var sub, doc, loading,
win = this;
+ this.$element.addClass( 'oo-ui-window-load' );
+
// Non-isolated windows are already "loaded"
if ( !this.loading && !this.isolated ) {
this.loading = $.Deferred().resolve();
// Non-isolated windows are already "loaded"
if ( !this.loading && !this.isolated ) {
this.loading = $.Deferred().resolve();
// Window opening
if ( opening.state() !== 'rejected' ) {
// Window opening
if ( opening.state() !== 'rejected' ) {
- // Begin loading the window if it's not loading or loaded already - may take noticable time
- // and we want to do this in parallel with any other preparatory actions
- if ( !win.isLoading() && !win.isLoaded() ) {
- // Finish initializing the window (must be done after manager is attached to DOM)
+ if ( !win.getManager() ) {
- preparing.push( win.load() );
+ preparing.push( win.load() );
if ( this.closing ) {
// If a window is currently closing, wait for it to complete
if ( this.closing ) {
// If a window is currently closing, wait for it to complete
.attr( 'aria-hidden', '' );
}
} else if ( this.$ariaHidden ) {
.attr( 'aria-hidden', '' );
}
} else if ( this.$ariaHidden ) {
- // Restore screen reader visiblity
+ // Restore screen reader visibility
this.$ariaHidden.removeAttr( 'aria-hidden' );
this.$ariaHidden = null;
}
this.$ariaHidden.removeAttr( 'aria-hidden' );
this.$ariaHidden = null;
}
/**
* Update CSS classes provided by the theme.
*
/**
* Update CSS classes provided by the theme.
*
- * For elements with theme logic hooks, this should be called anytime there's a state change.
+ * For elements with theme logic hooks, this should be called any time there's a state change.
*
* @param {OO.ui.Element} element Element for which to update classes
* @return {Object.<string,string[]>} Categorized class names with `on` and `off` lists
*
* @param {OO.ui.Element} element Element for which to update classes
* @return {Object.<string,string[]>} Categorized class names with `on` and `off` lists
if ( this.isDisabled() || e.which !== 1 ) {
return false;
}
if ( this.isDisabled() || e.which !== 1 ) {
return false;
}
- // Restore the tab-index after the button is up to restore the button's accesssibility
+ // Restore the tab-index after the button is up to restore the button's accessibility
this.$button.attr( 'tabindex', this.tabIndex );
this.$element.removeClass( 'oo-ui-buttonElement-pressed' );
// Stop listening for mouseup, since we only needed this once
this.$button.attr( 'tabindex', this.tabIndex );
this.$element.removeClass( 'oo-ui-buttonElement-pressed' );
// Stop listening for mouseup, since we only needed this once
* @cfg {jQuery} [$group] Container node, assigned to #$group, omit to use a generated `<div>`
*/
OO.ui.GroupElement = function OoUiGroupElement( config ) {
* @cfg {jQuery} [$group] Container node, assigned to #$group, omit to use a generated `<div>`
*/
OO.ui.GroupElement = function OoUiGroupElement( config ) {
- // Configuration intialization
+ // Configuration initialization
config = config || {};
// Properties
config = config || {};
// Properties
* @cfg {string} [iconTitle] Icon title text or a function that returns text
*/
OO.ui.IconElement = function OoUiIconElement( config ) {
* @cfg {string} [iconTitle] Icon title text or a function that returns text
*/
OO.ui.IconElement = function OoUiIconElement( config ) {
- // Configuration intialization
+ // Configuration initialization
config = config || {};
// Properties
config = config || {};
// Properties
* Dialog title.
*
* A confirmation dialog's title should describe what the progressive action will do. An alert
* Dialog title.
*
* A confirmation dialog's title should describe what the progressive action will do. An alert
- * dialog's title should describe what event occured.
+ * dialog's title should describe what event occurred.
*
* @static
* inheritable
*
* @static
* inheritable
/**
* A confirmation dialog's message should describe the consequences of the progressive action. An
/**
* A confirmation dialog's message should describe the consequences of the progressive action. An
- * alert dialog's message should describe why the event occured.
+ * alert dialog's message should describe why the event occurred.
*
* @static
* inheritable
*
* @static
* inheritable
- * Handle errors that occured durring accept or reject processes.
+ * Handle errors that occurred during accept or reject processes.
*
* @param {OO.ui.Error[]} errors Errors to be handled
*/
*
* @param {OO.ui.Error[]} errors Errors to be handled
*/
/**
* Get the outline widget.
*
/**
* Get the outline widget.
*
- * @return {OO.ui.OutlineSelectWidget|null} Outline widget, or null if boolet has no outline
+ * @return {OO.ui.OutlineSelectWidget|null} Outline widget, or null if booklet has no outline
*/
OO.ui.BookletLayout.prototype.getOutline = function () {
return this.outlineSelectWidget;
*/
OO.ui.BookletLayout.prototype.getOutline = function () {
return this.outlineSelectWidget;
// Configuration initialization
config = $.extend( { align: 'left' }, config );
// Configuration initialization
config = $.extend( { align: 'left' }, config );
+ // Properties (must be set before parent constructor, which calls #getTagName)
+ this.fieldWidget = fieldWidget;
+
// Parent constructor
OO.ui.FieldLayout.super.call( this, config );
// Parent constructor
OO.ui.FieldLayout.super.call( this, config );
// Properties
this.$field = this.$( '<div>' );
// Properties
this.$field = this.$( '<div>' );
- this.fieldWidget = fieldWidget;
this.align = null;
if ( config.help ) {
this.popupButtonWidget = new OO.ui.PopupButtonWidget( {
this.align = null;
if ( config.help ) {
this.popupButtonWidget = new OO.ui.PopupButtonWidget( {
OO.inheritClass( OO.ui.FieldLayout, OO.ui.Layout );
OO.mixinClass( OO.ui.FieldLayout, OO.ui.LabelElement );
OO.inheritClass( OO.ui.FieldLayout, OO.ui.Layout );
OO.mixinClass( OO.ui.FieldLayout, OO.ui.LabelElement );
-/* Static Properties */
-
-OO.ui.FieldLayout.static.tagName = 'label';
-
+/**
+ * @inheritdoc
+ */
+OO.ui.FieldLayout.prototype.getTagName = function () {
+ if ( this.fieldWidget instanceof OO.ui.InputWidget ) {
+ return 'label';
+ } else {
+ return 'div';
+ }
+};
+
/**
* Handle field disable events.
*
/**
* Handle field disable events.
*
*
* @param {number} x Horizontal position
* @param {number} y Vertical position
*
* @param {number} x Horizontal position
* @param {number} y Vertical position
- * @return {OO.ui.PanelLayout} The panel at the given postion
+ * @return {OO.ui.PanelLayout} The panel at the given position
*/
OO.ui.GridLayout.prototype.getPanel = function ( x, y ) {
return this.panels[ ( x * this.widths.length ) + y ];
*/
OO.ui.GridLayout.prototype.getPanel = function ( x, y ) {
return this.panels[ ( x * this.widths.length ) + y ];
* @cfg {boolean} [expanded=false] Whether the collapsible tools are expanded by default
*/
OO.ui.ListToolGroup = function OoUiListToolGroup( toolbar, config ) {
* @cfg {boolean} [expanded=false] Whether the collapsible tools are expanded by default
*/
OO.ui.ListToolGroup = function OoUiListToolGroup( toolbar, config ) {
- // Configuration intialization
+ // Configuration initialization
config = config || {};
// Properties (must be set before parent constructor, which calls #populate)
config = config || {};
// Properties (must be set before parent constructor, which calls #populate)
* Mixin for widgets used as items in widgets that inherit OO.ui.GroupWidget.
*
* Item widgets have a reference to a OO.ui.GroupWidget while they are attached to the group. This
* Mixin for widgets used as items in widgets that inherit OO.ui.GroupWidget.
*
* Item widgets have a reference to a OO.ui.GroupWidget while they are attached to the group. This
- * allows bidrectional communication.
+ * allows bidirectional communication.
*
* Use together with OO.ui.GroupWidget to make disabled state inheritable.
*
*
* Use together with OO.ui.GroupWidget to make disabled state inheritable.
*
* @return {jQuery} Input element
*/
OO.ui.ButtonInputWidget.prototype.getInputElement = function ( config ) {
* @return {jQuery} Input element
*/
OO.ui.ButtonInputWidget.prototype.getInputElement = function ( config ) {
- // Configuration intialization
+ // Configuration initialization
config = config || {};
var html = '<' + ( config.useInputTag ? 'input' : 'button' ) + ' type="' + config.type + '">';
config = config || {};
var html = '<' + ( config.useInputTag ? 'input' : 'button' ) + ' type="' + config.type + '">';
/**
* Set the read-only state of the widget.
*
/**
* Set the read-only state of the widget.
*
- * This should probably change the widgets's appearance and prevent it from being used.
+ * This should probably change the widget's appearance and prevent it from being used.
*
* @param {boolean} state Make input read-only
* @chainable
*
* @param {boolean} state Make input read-only
* @chainable
/**
* Check if item is movable.
*
/**
* Check if item is movable.
*
- * Movablilty is used by outline controls.
+ * Movability is used by outline controls.
*
* @return {boolean} Item is movable
*/
*
* @return {boolean} Item is movable
*/
/**
* Check if item is removable.
*
/**
* Check if item is removable.
*
- * Removablilty is used by outline controls.
+ * Removability is used by outline controls.
*
* @return {boolean} Item is removable
*/
*
* @return {boolean} Item is removable
*/
- * Movablilty is used by outline controls.
+ * Movability is used by outline controls.
*
* @param {boolean} movable Item is movable
* @chainable
*
* @param {boolean} movable Item is movable
* @chainable
/**
* Set removability.
*
/**
* Set removability.
*
- * Removablilty is used by outline controls.
+ * Removability is used by outline controls.
*
* @param {boolean} movable Item is removable
* @chainable
*
* @param {boolean} movable Item is removable
* @chainable
* @cfg {string} [value] Initial query value
*/
OO.ui.SearchWidget = function OoUiSearchWidget( config ) {
* @cfg {string} [value] Initial query value
*/
OO.ui.SearchWidget = function OoUiSearchWidget( config ) {
- // Configuration intialization
+ // Configuration initialization
config = config || {};
// Parent constructor
config = config || {};
// Parent constructor
- * Get an existing item with equivilant data.
+ * Get an existing item with equivalent data.
*
* @param {Object} data Item data to search for
*
* @param {Object} data Item data to search for
- * @return {OO.ui.OptionWidget|null} Item with equivilent value, `null` if none exists
+ * @return {OO.ui.OptionWidget|null} Item with equivalent value, `null` if none exists
*/
OO.ui.SelectWidget.prototype.getItemFromData = function ( data ) {
var hash = OO.getHash( data );
*/
OO.ui.SelectWidget.prototype.getItemFromData = function ( data ) {
var hash = OO.getHash( data );
/**
* Get the next selectable item.
*
/**
* Get the next selectable item.
*
- * @return {OO.ui.OptionWidget|null} Item, `null` if ther aren't any selectable items
+ * @return {OO.ui.OptionWidget|null} Item, `null` if there aren't any selectable items
*/
OO.ui.SelectWidget.prototype.getFirstSelectableItem = function () {
var i, len, item;
*/
OO.ui.SelectWidget.prototype.getFirstSelectableItem = function () {
var i, len, item;
* @cfg {jQuery} [$container=input.$element] Element to render menu under
*/
OO.ui.TextInputMenuSelectWidget = function OoUiTextInputMenuSelectWidget( input, config ) {
* @cfg {jQuery} [$container=input.$element] Element to render menu under
*/
OO.ui.TextInputMenuSelectWidget = function OoUiTextInputMenuSelectWidget( input, config ) {
- // Configuration intialization
+ // Configuration initialization
config = config || {};
// Parent constructor
config = config || {};
// Parent constructor