r49616: added maximize and restore buttons to ace:dialog
From reading the description and the comment above, it wasn't very clear to me how these buttons should behave. So, I went ahead with what I felt made the most sense, and things work in the following way.
There's a new boolean attribute 'maximizableRestorable' that when is set to true will add the maximize and restore buttons to the dialog. The default value is false.
The maximize button will expand the dialog to take 95% of the viewport and will center the dialog on the viewport as well. The CSS position will be changed to fixed, so the dialog stays in place if the window is scrolled. This button will always be visible, even when being already maximized for the cases when the dialog needs to be expanded again if it was resized or dragged while expanded or if the window was resized so that the dialog can take 95% of the new viewport dimensions again.
The restore button will revert to the original position and dimensions of the dialog when it was shown. This of course will work to go back to the initial state from the maximized state. This button will always be visible as well. Even if the dialog it's not maximized, it can be resized or dragged, so pressing this button will revert to the initial position and dimensions of the dialog. This works on a "per-showing" basis; this means that if the dialog is resized and/or dragged and then closed, the next time it's shown again, those dimensions and position will become the new values for the restored state. Of course, if it's restored before closing, the original restored state values will remain the same the next time the dialog is shown again.
As for the maximized state, it is only a transient state. This means that if the dialog it's closed while it's expanded. The next time is shown it will have the original restored state dimensions and position, not the maximized state dimensions and position.
Testing Notes: please test these buttons in combination with all other attributes, paying special attention to the show/hide effects.
Another request from a customer is to implement a Minimize button as well. This essentially will have the dialog use two states for its size. Clicking the maximized button will have it display full screen, clicking the maximized will have it display in its original size/state.