[
https://issues.apache.org/jira/browse/WICKET-1761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov reassigned WICKET-1761:
---------------------------------------
Assignee: Sven Meier (was: Matej Knopp)
> ModalWindow: Allow developer to specify whether cookie is used for size,
> position or both
> -----------------------------------------------------------------------------------------
>
> Key: WICKET-1761
> URL: https://issues.apache.org/jira/browse/WICKET-1761
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-extensions
> Affects Versions: 1.3.3
> Environment: IE6
> Reporter: Chuck Deal
> Assignee: Sven Meier
> Priority: Minor
>
> It would be nice if the use of cookies in a ModalWindow could be improved.
> Currently, if you specify a cookiename for the ModalWindow, you have no
> choice but for it to store not only the size, but also the position of the
> window. In our project, we want to use the cookie to store the size, but we
> always want the window to be auto-centered in the browser window. When we
> use the cookie, we had had scenarios where the modal window "appears" outside
> of the browser view port because the last time it's position was saved, the
> browser window was scrolled farther down the page. Now this time, the window
> should appear near the top of the page but the user can't see it!
> If I could tell the ModalWindow to not use the last posittion, but still use
> the last size, that would be perfect.
> On a side note, there was a bit of code in modal.js that I couldn't follow.
> savePosition: function() {
>
> if (typeof(this.settings.cookieId) != "undefined" &&
> this.settings.cookieId != null) {
>
> this.findPositionString(true);
>
> if (cookie == null || cookie.length == 0)
> cookie = "";
> else
> cookie = cookie + "|";
>
> var cookie = this.settings.cookieId;
> cookie += "::";
>
> cookie += this.window.style.left + ",";
> cookie += this.window.style.top + ",";
> cookie += this.window.style.width + ",";
> cookie += this.content.style.height;
>
> var rest = Wicket.Cookie.get(this.cookieKey);
> if (rest != null) {
> cookie += "|" + rest;
> }
> Wicket.Cookie.set(this.cookieKey, cookie,
> this.cookieExp);
>
> };
> },
> Notice the use of the "cookie" var in the if stmt? what is it referring too?
> cookie isn't declared until right after the if block.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira