Forums de discussion
aui toggle-switch
Robert Meissner, modifié il y a 7 années.
aui toggle-switch
Junior Member Publications: 76 Date d'inscription: 26/02/15 Publications récentes
Hi,
I am trying
The part toggler.toggle() doesn't work. How can i stop the toggler from being toggled?
I am trying
<aui:input name="toggler" type="toggle-switch" value="1" checked="<%= checked%>" label="checked" tabindex="1" />
var toggler = A.one('#<portlet:namespace />toggler');
if (toggler) {
toggler.on('change', function(e) {
if (!e.currentTarget.attr('checked')) {
if (confirm('<%= UnicodeLanguageUtil.get(request, "are-you-sure-you-want-to-toggle") %>')) {
// DO SOMETHING WHEN TOGGLED
} else {
toggler.toggle();
}
}
});
}
The part toggler.toggle() doesn't work. How can i stop the toggler from being toggled?
Robert Meissner, modifié il y a 7 années.
RE: aui toggle-switch
Junior Member Publications: 76 Date d'inscription: 26/02/15 Publications récentes
finalizedCheck.set('checked', true);
is the right way to do it
is the right way to do it