ipeychev / liferay-aui-upgrade-tool

1 stars 1 forks source link

When toolbar has multiple children, handler is missed #20

Closed robframpton closed 11 years ago

robframpton commented 11 years ago

If the toolbar children property has multiple children being defined at once, only the first child's handler will be changed to on click.

instance._toolbar = new A.Toolbar(
    {
        boundingBox: instance._userToolbar,
        children: [
            {
                // This handler will be changed to on click
                handler: function(event) {
                    instance._editEntry(contact);
                },
                icon: 'edit'
            },
            {
                // This handler will be left alone
                handler: function(event) {
                    instance._deleteEntry(contact);
                },
                icon: 'delete'
            }
        ]
    }
).render();