ipeychev / liferay-aui-upgrade-tool

1 stars 1 forks source link

Event handling for aui-toolbar children has changed #9

Closed robframpton closed 11 years ago

robframpton commented 11 years ago

Currently in trunk, using the handler property on the children of aui-toolbars does not work.

toolbarChildren.push(
    {
        icon: 'add',
        label: 'button',
        handler: function(event) {
            someFunction();
        }
    }
);

Instead we are using the onClick event.

toolbarChildren.push(
    {
        icon: 'add',
        label: 'button',
        on: {
            click: function(event) {
                someFunction();
            }
        }
    }
);

When upgrading this is a hassle to change, especially if the toolbar has many children. If the UT could handle these changes it would save the developer a lot of time and possible confusion.