/*!
- * OOjs UI v0.1.0-pre (20c61ec865)
+ * OOjs UI v0.1.0-pre (d4cfcce969)
* 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-20T18:41:36Z
+ * Date: 2014-11-21T00:12:46Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
}
.oo-ui-fieldLayout .oo-ui-fieldLayout-help-content {
padding: 0.5em 0.75em;
+ line-height: 1.5em;
}
.oo-ui-fieldLayout:last-child {
margin-bottom: 0;
.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
left: 1em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
- left: -1em;
-}
.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget {
left: 1.25em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
- left: -1.25em;
-}
.oo-ui-textInputWidget {
position: relative;
-webkit-box-sizing: border-box;
height: 0;
overflow: hidden;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
width: auto;
height: auto;
top: 0;
width: 100%;
height: 100%;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
- visibility: hidden;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
- visibility: visible;
-}
.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;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
/*!
- * OOjs UI v0.1.0-pre (20c61ec865)
+ * OOjs UI v0.1.0-pre (d4cfcce969)
* 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-20T18:41:26Z
+ * Date: 2014-11-21T00:12:34Z
*/
/* Instantiation */
/*!
- * OOjs UI v0.1.0-pre (20c61ec865)
+ * OOjs UI v0.1.0-pre (d4cfcce969)
* 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-20T18:41:36Z
+ * Date: 2014-11-21T00:12:46Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
}
.oo-ui-fieldLayout .oo-ui-fieldLayout-help-content {
padding: 0.5em 0.75em;
+ line-height: 1.5em;
}
.oo-ui-fieldLayout:last-child {
margin-bottom: 0;
.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
left: 1em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
- left: -1em;
-}
.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget {
left: 1.25em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
- left: -1.25em;
-}
.oo-ui-textInputWidget {
position: relative;
-webkit-box-sizing: border-box;
height: 0;
overflow: hidden;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
width: auto;
height: auto;
top: 0;
width: 100%;
height: 100%;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
- visibility: hidden;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
- visibility: visible;
-}
.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;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
/*!
- * OOjs UI v0.1.0-pre (20c61ec865)
+ * OOjs UI v0.1.0-pre (d4cfcce969)
* 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-20T18:41:36Z
+ * Date: 2014-11-21T00:12:46Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
}
.oo-ui-fieldLayout .oo-ui-fieldLayout-help-content {
padding: 0.5em 0.75em;
+ line-height: 1.5em;
}
.oo-ui-fieldLayout:last-child {
margin-bottom: 0;
.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
left: 1em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
- left: -1em;
-}
.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget {
left: 1.75em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
- left: -1.75em;
-}
.oo-ui-checkboxInputWidget {
position: relative;
line-height: 1.6em;
height: 0;
overflow: hidden;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
width: auto;
height: auto;
top: 0;
width: 100%;
height: 100%;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
- visibility: hidden;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
- visibility: visible;
-}
.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;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
/*!
- * OOjs UI v0.1.0-pre (20c61ec865)
+ * OOjs UI v0.1.0-pre (d4cfcce969)
* 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-20T18:41:26Z
+ * Date: 2014-11-21T00:12:34Z
*/
/**
* @class
/*!
- * OOjs UI v0.1.0-pre (20c61ec865)
+ * OOjs UI v0.1.0-pre (d4cfcce969)
* 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-20T18:41:36Z
+ * Date: 2014-11-21T00:12:46Z
*/
.oo-ui-progressBarWidget-slide-frames from {
margin-left: -40%;
}
.oo-ui-fieldLayout .oo-ui-fieldLayout-help-content {
padding: 0.5em 0.75em;
+ line-height: 1.5em;
}
.oo-ui-fieldLayout:last-child {
margin-bottom: 0;
.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget {
left: 1em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-frameless > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
- left: -1em;
-}
.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget {
left: 1.75em;
}
-.oo-ui-popupButtonWidget.oo-ui-buttonElement-framed > .oo-ui-popupWidget > .oo-ui-popupWidget-popup {
- left: -1.75em;
-}
.oo-ui-checkboxInputWidget {
position: relative;
line-height: 1.6em;
height: 0;
overflow: hidden;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-setup {
width: auto;
height: auto;
top: 0;
width: 100%;
height: 100%;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog > .oo-ui-window-frame {
- visibility: hidden;
-}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
- visibility: visible;
-}
.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;
}
-.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-load {
+.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready {
opacity: 1;
}
.oo-ui-windowManager-modal > .oo-ui-dialog.oo-ui-window-ready > .oo-ui-window-frame {
/*!
- * OOjs UI v0.1.0-pre (20c61ec865)
+ * OOjs UI v0.1.0-pre (d4cfcce969)
* 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-20T18:41:26Z
+ * Date: 2014-11-21T00:12:34Z
*/
( function ( OO ) {
* @param {Object} [config] Configuration options
* @cfg {string} [size] Symbolic name of dialog size, `small`, `medium`, `large` or `full`; omit to
* use #static-size
+ * @fires initialize
*/
OO.ui.Window = function OoUiWindow( config ) {
// Configuration initialization
* instead of display.
*
* @param {boolean} [show] Make window visible, omit to toggle visibility
- * @fires toggle
+ * @fires visible
* @chainable
*/
OO.ui.Window.prototype.toggle = function ( show ) {
this.getTeardownProcess( data ).execute().done( function () {
// Force redraw by asking the browser to measure the elements' widths
- win.$element.removeClass( 'oo-ui-window-load oo-ui-window-setup' ).width();
+ win.$element.removeClass( 'oo-ui-window-setup' ).width();
win.$content.removeClass( 'oo-ui-window-content-setup' ).width();
win.$element.hide();
win.visible = false;
/**
* Load the frame contents.
*
- * 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.
+ * 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.
*
* Sounds simple right? Read on...
*
* All this stylesheet injection and polling magic is in #transplantStyles.
*
* @return {jQuery.Promise} Promise resolved when loading is complete
+ * @fires load
*/
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();
// Window opening
if ( opening.state() !== 'rejected' ) {
- if ( !win.getManager() ) {
+ // 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)
win.setManager( this );
+ preparing.push( win.load() );
}
- preparing.push( win.load() );
if ( this.closing ) {
// If a window is currently closing, wait for it to complete