Update OOjs UI to v0.1.0-pre (0fbf6bd14e)
authorRoan Kattouw <roan.kattouw@gmail.com>
Mon, 19 May 2014 21:09:32 +0000 (14:09 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Mon, 19 May 2014 21:09:53 +0000 (14:09 -0700)
New changes:
ab5ebc6 Localisation updates from https://translatewiki.net.
39a1496 Make flags on buttons in confirmation dialog configurable

Change-Id: I6c67b919003a33b1617ad36734bde489d79d916c

resources/lib/oojs-ui/i18n/ckb.json
resources/lib/oojs-ui/i18n/pfl.json
resources/lib/oojs-ui/i18n/ro.json
resources/lib/oojs-ui/oojs-ui.js
resources/lib/oojs-ui/oojs-ui.svg.css

index 884a462..eadae99 100644 (file)
@@ -2,8 +2,12 @@
        "@metadata": {
                "authors": [
                        "Calak",
-                       "Muhammed taha"
+                       "Muhammed taha",
+                       "Serwan"
                ]
        },
-       "ooui-dialog-action-close": "دایخە"
+       "ooui-dialog-action-close": "دایخە",
+       "ooui-dialog-confirm-default-prompt": "ئایا تۆ دڵنیات ؟",
+       "ooui-dialog-confirm-default-ok": "باشە",
+       "ooui-dialog-confirm-default-cancel": "پاشگەزبوونەوە"
 }
index 0ee623e..b51f70d 100644 (file)
@@ -8,5 +8,8 @@
        "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"
 }
index de7cb1a..4f379e4 100644 (file)
@@ -15,5 +15,6 @@
        "ooui-toolbar-more": "Mai mult",
        "ooui-dialog-confirm-title": "Confirmă",
        "ooui-dialog-confirm-default-prompt": "Ești sigur?",
+       "ooui-dialog-confirm-default-ok": "OK",
        "ooui-dialog-confirm-default-cancel": "Renunță"
 }
index 85546f9..e1f321b 100644 (file)
@@ -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.
index 2f0d8aa..5182356 100644 (file)
@@ -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)
  */
 
 /* Textures */