"ooui-dialog-action-close": "Zarrar",
"ooui-outline-control-move-down": "Mover abaxo l'elementu",
"ooui-outline-control-move-up": "Mover arriba l'elementu",
+ "ooui-outline-control-remove": "Desaniciar elementu",
"ooui-toolbar-more": "Más"
}
\ No newline at end of file
"ooui-dialog-action-close": "Փակել",
"ooui-outline-control-move-down": "Իջեցնել կետը",
"ooui-outline-control-move-up": "Բարձրացնել կետը",
+ "ooui-outline-control-remove": "Հեռացնել տարրը",
"ooui-toolbar-more": "Ավելին"
}
\ No newline at end of file
]
},
"ooui-dialog-action-close": "Loka",
- "ooui-outline-control-move-down": "Færa atriða niður",
- "ooui-outline-control-move-up": "Færa atriða upp",
+ "ooui-outline-control-move-down": "Færa atriði niður",
+ "ooui-outline-control-move-up": "Færa atriði upp",
"ooui-toolbar-more": "Fleira"
}
\ No newline at end of file
"ooui-dialog-action-close": "닫기",
"ooui-outline-control-move-down": "항목을 아래로 옮기기",
"ooui-outline-control-move-up": "항목을 위로 옮기기",
+ "ooui-outline-control-remove": "항목 지우기",
"ooui-toolbar-more": "더 보기"
}
\ No newline at end of file
"ooui-dialog-action-close": "Zoumaachen",
"ooui-outline-control-move-down": "Element erof réckelen",
"ooui-outline-control-move-up": "Element erop réckelen",
+ "ooui-outline-control-remove": "Element ewechhuelen",
"ooui-toolbar-more": "Méi"
}
\ No newline at end of file
"@metadata": {
"authors": [
"Audriusa",
- "Eitvys200"
+ "Eitvys200",
+ "Mantak111"
]
},
- "ooui-dialog-action-close": "Uždaryti"
+ "ooui-dialog-action-close": "Uždaryti",
+ "ooui-outline-control-remove": "Šalinti elementus"
}
\ No newline at end of file
"Saruman",
"Siebrand",
"Southparkfan",
- "सरोज कुमार ढकाल"
+ "सरोज कुमार ढकाल",
+ "Sjoerddebruin"
]
},
"ooui-dialog-action-close": "Sluiten",
"ooui-outline-control-move-down": "Item omlaag verplaatsen",
"ooui-outline-control-move-up": "Item omhoog verplaatsen",
+ "ooui-outline-control-remove": "Item verwijderen",
"ooui-toolbar-more": "Meer"
}
\ No newline at end of file
{
"@metadata": {
"authors": [
- "Euriditi"
+ "Euriditi",
+ "Kushtrim"
]
},
"ooui-dialog-action-close": "Mbylle",
"ooui-outline-control-move-down": "Zhvendose artikullin më poshtë",
"ooui-outline-control-move-up": "Zhvendose artikullin më lart",
+ "ooui-outline-control-remove": "Largoje artikullin",
"ooui-toolbar-more": "Më tepër..."
}
\ No newline at end of file
"Per",
"Sendelbach",
"Skalman",
- "WikiPhoenix"
+ "WikiPhoenix",
+ "Lokal Profil"
]
},
"ooui-dialog-action-close": "Stäng",
"ooui-outline-control-move-down": "Flytta ned objekt",
"ooui-outline-control-move-up": "Flytta upp objekt",
+ "ooui-outline-control-remove": "Ta bort objekt",
"ooui-toolbar-more": "Mer"
}
\ No newline at end of file
"ooui-dialog-action-close": "Закрити",
"ooui-outline-control-move-down": "Перемістити елемент униз",
"ooui-outline-control-move-up": "Перемістити елемент вгору",
+ "ooui-outline-control-remove": "Видалити елемент",
"ooui-toolbar-more": "Більше"
}
\ No newline at end of file
box-shadow: none;
}
+.oo-ui-bookletLayout > .oo-ui-gridLayout > .oo-ui-panelLayout {
+ -webkit-transition: width 250ms ease-in-out, height 250ms ease-in-out, top 250ms ease-in-out, left 250ms ease-in-out;
+ -moz-transition: width 250ms ease-in-out, height 250ms ease-in-out, top 250ms ease-in-out, left 250ms ease-in-out;
+ -ms-transition: width 250ms ease-in-out, height 250ms ease-in-out, top 250ms ease-in-out, left 250ms ease-in-out;
+ -o-transition: width 250ms ease-in-out, height 250ms ease-in-out, top 250ms ease-in-out, left 250ms ease-in-out;
+ transition: width 250ms ease-in-out, height 250ms ease-in-out, top 250ms ease-in-out, left 250ms ease-in-out;
+}
+
.oo-ui-bookletLayout-outlinePanel {
border-right: solid 1px #ddd;
}
/*!
- * OOjs UI v0.1.0-pre (8ac38a5c31)
+ * OOjs UI v0.1.0-pre (e4f6ce0156)
* 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: Tue Mar 04 2014 11:26:29 GMT-0800 (PST)
+ * Date: Wed Mar 05 2014 16:08:46 GMT-0800 (PST)
*/
( function () {
throw new Error( 'Unknown window: ' + name );
}
if ( !( name in this.windows ) ) {
- win = this.windows[name] = this.factory.create( name, this, { '$': this.$ } );
+ win = this.windows[name] = this.createWindow( name );
this.addWindow( win );
}
return this.windows[name];
};
+/**
+ * Create a window for use in this window set.
+ *
+ * @param {string} name Symbolic name of window
+ * @return {OO.ui.Window} Window with specified name
+ */
+OO.ui.WindowSet.prototype.createWindow = function ( name ) {
+ return this.factory.create( name, { '$': this.$ } );
+};
+
/**
* Add a given window to this window set.
*
* @constructor
* @param {Object} [config] Configuration options
* @cfg {boolean} [footless] Hide foot
- * @cfg {boolean} [small] Make the dialog small
+ * @cfg {string} [size='large'] Symbolic name of dialog size, `small`, `medium` or `large`
*/
OO.ui.Dialog = function OoUiDialog( config ) {
// Configuration initialization
- config = config || {};
+ config = $.extend( { 'size': 'large' }, config );
// Parent constructor
OO.ui.Window.call( this, config );
// Properties
this.visible = false;
this.footless = !!config.footless;
- this.small = !!config.small;
+ this.size = null;
this.onWindowMouseWheelHandler = OO.ui.bind( this.onWindowMouseWheel, this );
this.onDocumentKeyDownHandler = OO.ui.bind( this.onDocumentKeyDown, this );
// Initialization
this.$element.addClass( 'oo-ui-dialog' );
+ this.setSize( config.size );
};
/* Inheritance */
*/
OO.ui.Dialog.static.name = '';
+/**
+ * Map of symbolic size names and CSS classes.
+ *
+ * @static
+ * @property {Object}
+ */
+OO.ui.Dialog.static.sizeCssClasses = {
+ 'small': 'oo-ui-dialog-small',
+ 'medium': 'oo-ui-dialog-medium',
+ 'large': 'oo-ui-dialog-large'
+};
+
/* Methods */
/**
this.$element.addClass( 'oo-ui-dialog-open' );
};
+/**
+ * Set dialog size.
+ *
+ * @param {string} [size='large'] Symbolic name of dialog size, `small`, `medium` or `large`
+ */
+OO.ui.Dialog.prototype.setSize = function ( size ) {
+ var name, state, cssClass,
+ sizeCssClasses = OO.ui.Dialog.static.sizeCssClasses;
+
+ if ( !sizeCssClasses[size] ) {
+ size = 'large';
+ }
+ this.size = size;
+ for ( name in sizeCssClasses ) {
+ state = name === size;
+ cssClass = sizeCssClasses[name];
+ this.$element.toggleClass( cssClass, state );
+ if ( this.frame.$content ) {
+ this.frame.$content.toggleClass( cssClass, state );
+ }
+ }
+};
+
/**
* @inheritdoc
*/
if ( this.footless ) {
this.frame.$content.addClass( 'oo-ui-dialog-content-footless' );
}
- if ( this.small ) {
- this.$frame.addClass( 'oo-ui-window-frame-small' );
- }
this.closeButton.$element.addClass( 'oo-ui-window-closeButton' );
this.$head.append( this.closeButton.$element );
};
this.ignoreFocus = false;
this.stackLayout = new OO.ui.StackLayout( { '$': this.$, 'continuous': !!config.continuous } );
this.autoFocus = !!config.autoFocus;
+ this.outlineVisible = false;
this.outlined = !!config.outlined;
if ( this.outlined ) {
this.editable = !!config.editable;
this.gridLayout = new OO.ui.GridLayout(
[this.outlinePanel, this.stackLayout], { '$': this.$, 'widths': [1, 2] }
);
+ this.outlineVisible = true;
if ( this.editable ) {
this.outlineControlsWidget = new OO.ui.OutlineControlsWidget(
this.outlineWidget,
return this.editable;
};
+/**
+ * Check if booklet has editing controls.
+ *
+ * @method
+ * @returns {boolean} Booklet is outlined
+ */
+OO.ui.BookletLayout.prototype.isOutlineVisible = function () {
+ return this.outlined && this.outlineVisible;
+};
+
+/**
+ * Hide or show the outline.
+ *
+ * @param {boolean} [show] Show outline, omit to invert current state
+ * @chainable
+ */
+OO.ui.BookletLayout.prototype.toggleOutline = function ( show ) {
+ if ( this.outlined ) {
+ show = show === undefined ? !this.outlineVisible : !!show;
+ this.outlineVisible = show;
+ this.gridLayout.layout( show ? [ 1, 2 ] : [ 0, 1 ], [ 1 ] );
+ }
+
+ return this;
+};
+
/**
* Get the outline widget.
*
/*!
- * OOjs UI v0.1.0-pre (8ac38a5c31)
+ * OOjs UI v0.1.0-pre (e4f6ce0156)
* 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: Tue Mar 04 2014 11:26:29 GMT-0800 (PST)
+ * Date: Wed Mar 05 2014 16:08:46 GMT-0800 (PST)
*/
/* Textures */
left: 0;
padding: 1em;
line-height: 1em;
+ /* Fix for strange opacity-related rendering issues.
+ CAUTION: -webkit-backface-visibility: hidden; is EXTREMELY DANGEROUS.
+ If applied to a VE surface directly, it will break selection of
+ FocusableNodes, and in the past it's caused transparent PNGs to
+ render as opaque black images. For some reason applying it to the dialog
+ wrapper in the main document fixes opacity-related behavior in the iframe
+ document, but doesn't break the surface inside the iframe. */
+
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
}
.oo-ui-dialog .oo-ui-window-frame {
right: 0;
bottom: 1em;
left: 0;
- width: 800px;
- max-height: 600px;
min-height: 12em;
margin: auto;
overflow: hidden;
}
-.oo-ui-dialog .oo-ui-window-frame-small {
- max-width: 600px;
+.oo-ui-dialog-small .oo-ui-window-frame {
+ width: 400px;
+ max-height: 200px;
+}
+
+.oo-ui-dialog-medium .oo-ui-window-frame {
+ width: 600px;
max-height: 400px;
}
+.oo-ui-dialog-large .oo-ui-window-frame {
+ width: 800px;
+ max-height: 600px;
+}
+
.oo-ui-dialog .oo-ui-frame {
width: 100%;
height: 100%;