"ooui-outline-control-move-down": "Bweeschs nunna",
"ooui-outline-control-move-up": "Bweeschs nuff",
"ooui-outline-control-remove": "Leschs",
- "ooui-toolbar-more": "Mea"
+ "ooui-toolbar-more": "Mea",
+ "ooui-dialog-confirm-default-prompt": "Bischda sischa?",
+ "ooui-dialog-confirm-default-ok": "OK",
+ "ooui-dialog-confirm-default-cancel": "Abbresche"
}
/*!
- * 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 ) {
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
* @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
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 );
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.