Moved saveStateDoButtonAction() function contents to the single place where it's called.
Moved saveStateDoButtonAction() function contents to the single place where it's called.

This is part of a rework of the button functionality.  I'm attempting to simplify things so I can fold in the spriting code.

diversen/jquery-markedit,sch1zo/wmd,diversen/jquery-markedit,derobins/wmd,derobins/wmd,diversen/jquery-markedit,diversen/jquery-markedit