Places

 

  • Download
  • Documentation
  • Forums
  • Demo
  • Contact
  • Blog
  • My account

Meteora

Javascript Widgets

Controls

  • Autocomplete
  • Bubble
  • Calendar
  • Carousel
  • Datagrid
  • Dialog
  • Editor
  • Filebrowser
  • Form Control
  • Menu
  • Notebook
  • Picbox
  • Popup
  • Searchlist
  • Selection
  • Spinbutton
  • Tablesort
  • Toolbox
  • Treeview

Features

  • JsonRpc Core

Effects

  • Visual effects

Control.Menu

Widget demo

HTML source

<div id="menu-demo-div"></div>

Javascript source

Meteora.uses('Control.Menu');

Meteora.onStart(
  function () {

    new Menu(
      'menu-demo-div',
      [
        {
          'label': 'File',
          'onClick': function() {
            alert('You have clicked on "File".');
          },
          'icon': 'go-next.png',
          'items': [
            {
              'label': 'New...',
              'icon': 'document-new.png'
            },
            {
              'label': 'Open...',
              'icon': 'document-open.png'
            },
            {
              'label': 'Print',
              'icon': 'document-print-preview.png'
            },
          ]
        },
        {
          'label': 'Edit',
          'icon': 'edit-copy.png',
          'items': [
            {
              'label': 'Preferences',
              'onClick': function() {
                alert('You have clicked on "Preferences"');
              }
            }
          ]
        },
        {
          'label': 'View',
          'icon': 'edit-find.png',
          'items': [
            {
              'label': 'Toolbars',
              'items': [
                {
                  'label': 'Toolbar 1'
                },
                {
                  'label': 'Toolbar 2',
                  'items': [
                    {
                      'label': 'test'
                    },
                    {
                      'label': 'test',
                      'items': [
                        {
                          'label': 'test x'
                        }
                      ]
                    },
                    {
                      'label': 'test'
                    }
                  ]
                }
              ]
            },
            {
              'label': 'Sidebar',
              'items': [
                {
                  'label': 'Foo'
                }
              ]
            }
          ]
        }
      ],
      {
        iconDir: '/media/demo'
      }
    );
  }
);

Documentation

If you're looking for more documentation about this widget, you may want to read Control.Menu documentation

Powered by textmotion

(c) 2008 Astrata Software