Skip to content

Commit

Permalink
Issue #111 is fixed. There was provided additional behaviour for win…
Browse files Browse the repository at this point in the history
…dow resizing. Now you can use value 'once' for attribute 'autosizing' to resize window only once on show. Resizable attribute is not ignored in this case.
  • Loading branch information
RomanPerin committed May 14, 2015
1 parent 7050713 commit 3291c13
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Expand Up @@ -207,7 +207,7 @@ O$.PopupLayer = {
if (popup.isVisible()) return;
popup.hidden = false;
popup.style.display = "block";
if (autosizing == "on") {
if (autosizing == "on" || autosizing == "once") {
popup._resizeToContent();
}
if (popup._containment) {
Expand Down
Expand Up @@ -17,7 +17,8 @@
*/
public enum Autosizing {
ON("on"),
OFF("off");
OFF("off"),
ONCE("once");

private final String value;

Expand Down
Expand Up @@ -144,7 +144,7 @@ protected void encodeScriptsAndStyles(FacesContext context, PopupLayer popup) th

ScriptBuilder sb = new ScriptBuilder();
String width = popup.getWidth();
if (width == null && popup.getAutosizing() != Autosizing.ON)
if (width == null && popup.getAutosizing() != Autosizing.ON && popup.getAutosizing() != Autosizing.ONCE)
width = getDefaultWidth();
String height = popup.getHeight();
if (height == null && popup.getAutosizing() != Autosizing.ON)
Expand Down

0 comments on commit 3291c13

Please sign in to comment.