I wanted to be able to accept a toggle event, submit a server query, then
toggle the state of the button upon receipt of the response from the server
(the action may fail, in which case I wanted to leave the state alone; at the
very least I wanted to wait for server confirmation before indicating the
change to the user).
To that end, I made the following change to iui.js (line ~346):
The line that says:
div.setAttribute("toggled", div.getAttribute("toggled") != "true");
I changed to:
if (!hasClass(div, "defer"))
iui.toggle(div);
And moved the original line of code upwards to around line 254 where I made it
part of window.iui:
toggle: function(div) {
div.setAttribute("toggled", div.getAttribute("toggled") != "true");
},
(Don't forget the comma after the } from the function above it, or you'll get a
JavaScript error.)
Original issue reported on code.google.com by eslind...@gmail.com on 3 Aug 2011 at 4:34
Original issue reported on code.google.com by
eslind...@gmail.com
on 3 Aug 2011 at 4:34