aboutsummaryrefslogtreecommitdiffstats
path: root/resources/lib/oojs-ui/oojs-ui.js
diff options
context:
space:
mode:
authorRoan Kattouw <roan.kattouw@gmail.com>2014-05-19 14:09:32 -0700
committerRoan Kattouw <roan.kattouw@gmail.com>2014-05-19 14:09:53 -0700
commit08f105e2d93bf6f2be0d7dc8d6017b41ec6ad3b0 (patch)
treea3e654c7c3e532ef8da082051bf115e5fb7138c2 /resources/lib/oojs-ui/oojs-ui.js
parent8a70e9825fc65567a34e29e84b725dbf39c0b60d (diff)
downloadmediawikicore-08f105e2d93bf6f2be0d7dc8d6017b41ec6ad3b0.tar.gz
mediawikicore-08f105e2d93bf6f2be0d7dc8d6017b41ec6ad3b0.zip
Update OOjs UI to v0.1.0-pre (0fbf6bd14e)
New changes: ab5ebc6 Localisation updates from https://translatewiki.net. 39a1496 Make flags on buttons in confirmation dialog configurable Change-Id: I6c67b919003a33b1617ad36734bde489d79d916c
Diffstat (limited to 'resources/lib/oojs-ui/oojs-ui.js')
-rw-r--r--resources/lib/oojs-ui/oojs-ui.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js
index 85546f96b844..e1f321bb9b4f 100644
--- a/resources/lib/oojs-ui/oojs-ui.js
+++ b/resources/lib/oojs-ui/oojs-ui.js
@@ -1,12 +1,12 @@
/*!
- * OOjs UI v0.1.0-pre (521a9e242b)
+ * OOjs UI v0.1.0-pre (0fbf6bd14e)
* 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: Mon May 19 2014 10:42:43 GMT-0700 (PDT)
+ * Date: Mon May 19 2014 14:09:28 GMT-0700 (PDT)
*/
( function ( OO ) {
@@ -1957,14 +1957,10 @@ OO.ui.ConfirmationDialog.prototype.initialize = function () {
this.$promptContainer = this.$( '<div>' ).addClass( 'oo-ui-dialog-confirm-promptContainer' );
- this.cancelButton = new OO.ui.ButtonWidget( {
- 'flags': [ 'destructive' ]
- } );
+ this.cancelButton = new OO.ui.ButtonWidget();
this.cancelButton.connect( this, { 'click': [ 'emit', 'cancel' ] } );
- this.okButton = new OO.ui.ButtonWidget( {
- 'flags': [ 'constructive' ]
- } );
+ this.okButton = new OO.ui.ButtonWidget();
this.okButton.connect( this, { 'click': [ 'emit', 'ok' ] } );
// Make the buttons
@@ -1990,6 +1986,8 @@ OO.ui.ConfirmationDialog.prototype.initialize = function () {
* @param {jQuery|string} [data.prompt] The text of the dialog.
* @param {jQuery|string|Function|null} [data.okLabel] The text used on the OK button
* @param {jQuery|string|Function|null} [data.cancelLabel] The text used on the cancel button
+ * @param {string[]} [data.okFlags] Flags for the OK button
+ * @param {string[]} [data.cancelFlags] Flags for the cancel button
*/
OO.ui.ConfirmationDialog.prototype.setup = function ( data ) {
// Parent method
@@ -1997,7 +1995,9 @@ OO.ui.ConfirmationDialog.prototype.setup = function ( data ) {
var prompt = data.prompt || OO.ui.deferMsg( 'ooui-dialog-confirm-default-prompt' ),
okLabel = data.okLabel || OO.ui.deferMsg( 'ooui-dialog-confirm-default-ok' ),
- cancelLabel = data.cancelLabel || OO.ui.deferMsg( 'ooui-dialog-confirm-default-cancel' );
+ cancelLabel = data.cancelLabel || OO.ui.deferMsg( 'ooui-dialog-confirm-default-cancel' ),
+ okFlags = data.okFlags || [ 'constructive'],
+ cancelFlags = data.cancelFlags || [ 'destructive' ];
if ( typeof prompt === 'string' ) {
this.$promptContainer.text( prompt );
@@ -2005,8 +2005,8 @@ OO.ui.ConfirmationDialog.prototype.setup = function ( data ) {
this.$promptContainer.empty().append( prompt );
}
- this.okButton.setLabel( okLabel );
- this.cancelButton.setLabel( cancelLabel );
+ this.okButton.setLabel( okLabel ).clearFlags().setFlags( okFlags );
+ this.cancelButton.setLabel( cancelLabel ).clearFlags().setFlags( cancelFlags );
};
/**
* Element with a button.