juliocavalcanti

Sencha Touch 2 - RadioGroup 2 Column solution

Nov 12th, 2012 (edited)
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {  
  2.                 itemId: 'companhia',
  3.                 layout: 'vbox',
  4.                 items: [
  5.                     {
  6.                         xtype : 'panel',
  7.                         cls: 'companhia',
  8.                         items : [
  9.                             {
  10.                                 cls: 'perguntas-header closed',
  11.                                 layout: 'hbox',
  12.                                 items: [
  13.                                     {
  14.                                         cls: 'perguntas-label',
  15.                                         html: '<h1>Companhia:</h1>',
  16.                                         flex: 1
  17.                                     },
  18.                                     {
  19.                                         cls: 'perguntas-option-selected',
  20.                                         itemId: 'companhia-option-selected',
  21.                                         html: 'A Dois',
  22.                                         flex: 2
  23.                                     }
  24.                                 ]
  25.                             },
  26.                             {
  27.                                 xtype : "button",
  28.                                 action : "toggleRespostas"
  29.                             }
  30.                         ]
  31.                     },
  32.                     {
  33.                         cls: 'perguntas-options',
  34.                         layout : 'vbox',
  35.                         defaults: {
  36.                             layout : 'hbox',
  37.                             xtype: 'fieldset',
  38.                             ui: 'none',
  39.                             defaults: {
  40.                                 xtype: 'radiofield',
  41.                                 name: 'companhia-options',
  42.                                 labelAlign: 'right',
  43.                                 labelWrap: true,
  44.                                 labelWidth: '78%',
  45.                                 width: '50%'
  46.                             }
  47.                         },
  48.                         items: [
  49.                             {
  50.                                 items: [
  51.                                     {
  52.                                         label: 'Amigos',
  53.                                         value: '1',
  54.                                         checked: true
  55.                                     },
  56.                                     {
  57.                                         label: 'A dois',
  58.                                         value: '2'
  59.                                     }
  60.                                 ]
  61.                             },
  62.                             {
  63.                                 items: [
  64.                                     {
  65.                                         label: 'Pessoal do Trabalho',
  66.                                         value: '3'
  67.                                     },
  68.                                     {
  69.                                         label: 'Família',
  70.                                         value: '4'
  71.                                     }
  72.                                 ]
  73.                             }
  74.                         ]
  75.                     }
  76.                 ]
  77.             },
Advertisement
Add Comment
Please, Sign In to add comment