UNPKG

@wavemaker/m3-custom-widgets

Version:

A collection of custom widgets

36 lines (35 loc) 1.32 kB
/* * Use App.getDependency for Dependency Injection * eg: var DialogService = App.getDependency('DialogService'); */ /* perform any action on Partials/variables within this block */ Widget.onReady = function () { /* * variables can be accessed through 'Widget.Variables' property here * e.g. to get dataSet in a staticVariable named 'loggedInUser' use following script * Widget.Variables.loggedInUser.getData() * * Partials can be accessed through 'Widget.Partials' property here * e.g. to get value of text Partial named 'username' use following script * 'Widget.Partials.username.datavalue' */ if (Widget.props.layout === "horizontal") { Widget.Widgets.radioset.class += ' horizontal'; } else { Widget.Widgets.radioset.class += ' vertical'; } if (Widget.props.label_placement === "top") { Widget.Widgets.radioset.class += ' top-placement'; } else if (Widget.props.label_placement === "bottom") { Widget.Widgets.radioset.class += ' bottom-placement'; } else if (Widget.props.label_placement === "start") { Widget.Widgets.radioset.class += ' start-placement'; } else { Widget.Widgets.radioset.class += ''; } Widget.Widgets.composite.required = Widget.props.required; };