Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349978 )

Change subject: demos: Add some more examples with 'accessKey'
......................................................................

demos: Add some more examples with 'accessKey'

This is just for testing things. The DropdownWidget ones don't work unless
you open the menu first. In Chrome, most of them don't work at all.
Also synchronize the PHP demo to the JS demo.

Change-Id: If79975c90b3cfefbf70c1b8c417979dd33a0aa01
---
M demos/pages/widgets.js
M demos/pages/widgets.php
2 files changed, 70 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/78/349978/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index c139838..0408e46 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1620,11 +1620,21 @@
                                ),
                                new OO.ui.FieldLayout(
                                        new OO.ui.ButtonWidget( {
+                                               label: 'Accesskey: H',
+                                               accessKey: 'h'
+                                       } ),
+                                       {
+                                               label: 'ButtonWidget (with 
accesskey)\u200E',
+                                               align: 'top'
+                                       }
+                               ),
+                               new OO.ui.FieldLayout(
+                                       new OO.ui.ButtonInputWidget( {
                                                label: 'Accesskey: I',
                                                accessKey: 'i'
                                        } ),
                                        {
-                                               label: 'ButtonWidget (with 
accesskey)\u200E',
+                                               label: 'ButtonInputWidget (with 
accesskey)\u200E',
                                                align: 'top'
                                        }
                                ),
@@ -1679,9 +1689,36 @@
                                        }
                                ),
                                new OO.ui.FieldLayout(
+                                       new OO.ui.DropdownWidget( {
+                                               menu: {
+                                                       items: [
+                                                               new 
OO.ui.MenuOptionWidget( {
+                                                                       data: 
'a',
+                                                                       label: 
'Accesskey: P',
+                                                                       
accessKey: 'p'
+                                                               } ),
+                                                               new 
OO.ui.MenuOptionWidget( {
+                                                                       data: 
'b',
+                                                                       label: 
'Accesskey: Q',
+                                                                       
accessKey: 'q'
+                                                               } ),
+                                                               new 
OO.ui.MenuOptionWidget( {
+                                                                       data: 
'c',
+                                                                       label: 
'Accesskey: R',
+                                                                       
accessKey: 'r'
+                                                               } )
+                                                       ]
+                                               }
+                                       } ),
+                                       {
+                                               align: 'top',
+                                               label: 'DropdownWidget (with 
accesskeys)\u200E'
+                                       }
+                               ),
+                               new OO.ui.FieldLayout(
                                        new OO.ui.TextInputWidget( {
-                                               value: 'Accesskey: P',
-                                               accessKey: 'p'
+                                               value: 'Accesskey: S',
+                                               accessKey: 's'
                                        } ),
                                        {
                                                label: 'TextInputWidget (with 
accesskey)\u200E',
diff --git a/demos/pages/widgets.php b/demos/pages/widgets.php
index 9d9daa2..44b6b48 100644
--- a/demos/pages/widgets.php
+++ b/demos/pages/widgets.php
@@ -254,16 +254,6 @@
                                'align' => 'top'
                        ]
                ),
-               new OOUI\FieldLayout(
-                       new OOUI\ButtonWidget( [
-                               'label' => 'AccessKeyed',
-                               'accessKey' => 'k',
-                       ] ),
-                       [
-                               'label' => "ButtonWidget (with accesskey 
k)\xE2\x80\x8E",
-                               'align' => 'top'
-                       ]
-               )
        ]
 ] ) );
 $demoContainer->appendContent( new OOUI\FieldsetLayout( [
@@ -465,16 +455,6 @@
                        ] ),
                        [
                                'label' => "TextInputWidget 
(disabled)\xE2\x80\x8E",
-                               'align' => 'top'
-                       ]
-               ),
-               new OOUI\FieldLayout(
-                       new OOUI\TextInputWidget( [
-                               'value' => 'Accesskey A',
-                               'accessKey' => 'a'
-                       ] ),
-                       [
-                               'label' => "TextInputWidget (with 
Accesskey)\xE2\x80\x8E",
                                'align' => 'top'
                        ]
                ),
@@ -713,6 +693,36 @@
                                'align' => 'top',
                                'label' => "ButtonInputWidget (frameless, using 
<input>)\xE2\x80\x8E"
                        ]
+               ),
+               new OOUI\FieldLayout(
+                       new OOUI\ButtonWidget( [
+                               'label' => 'Accesskey: H',
+                               'accessKey' => 'h'
+                       ] ),
+                       [
+                               'label' => "ButtonWidget (with 
accesskey)\xE2\x80\x8E",
+                               'align' => 'top'
+                       ]
+               ),
+               new OOUI\FieldLayout(
+                       new OOUI\ButtonInputWidget( [
+                               'label' => 'Accesskey: I',
+                               'accessKey' => 'i'
+                       ] ),
+                       [
+                               'label' => "ButtonInputWidget (with 
accesskey)\xE2\x80\x8E",
+                               'align' => 'top'
+                       ]
+               ),
+               new OOUI\FieldLayout(
+                       new OOUI\TextInputWidget( [
+                               'value' => 'Accesskey: S',
+                               'accessKey' => 's'
+                       ] ),
+                       [
+                               'label' => "TextInputWidget (with 
accesskey)\xE2\x80\x8E",
+                               'align' => 'top'
+                       ]
                )
        ]
 ] ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/349978
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If79975c90b3cfefbf70c1b8c417979dd33a0aa01
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to