JSFiddle - React, Tailwind, and code Playground

by johanhaest

HTML

<link rel="stylesheet" href="http://cdn.sencha.io/ext-4.1.1-gpl/resources/css/ext-all.css">
<body>
    <form name="aspnetForm" method="post" action="./Sonet Selfservice_files/Sonet Selfservice.htm" id="aspnetForm">
        <div>
            <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="">
            <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="">
            <input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="">
            <input type="hidden" name="__ctl00_wmMainMenu_SSF" id="__ctl00_wmMainMenu_SSF" value="">
            <input type="hidden" name="__ctl00_wmMainMenu_SSIF" id="__ctl00_wmMainMenu_SSIF" value="">
            <input type="hidden" name="__ctl00_cphMenu_c1wmActions_SSF" id="__ctl00_cphMenu_c1wmActions_SSF" value="">
            <input type="hidden" name="__ctl00_cphMenu_c1wmActions_SSIF" id="__ctl00_cphMenu_c1wmActions_SSIF" value="">
            <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"...

JavaScript

Ext.onReady(function () {
    Ext.create('Ext.toolbar.Toolbar', {
        renderTo: 'toolbar',

        items: [{
            text: 'test',

            menu: {
                items: [{
                    text: 'hallo'
                }, {
                    text: 'hallo2'
                }]
            }
        }],

        listeners: {
            afterrender: function (toolbar) {
                var menuitems = toolbar.query('menuitem');
                Ext.each(menuitems, function (menuitem) {
                    menuitem.on({
                        click: function () {
                            alert('ok');
                        }
                    });
                });
            }
        }
    });
});