Author: mgrigorov
Date: Sun Jul 18 09:51:09 2010
New Revision: 965190
URL: http://svn.apache.org/viewvc?rev=965190&view=rev
Log:
Port from wicket-1.4.x
r938090
Author: jcompagner
Date: Mon Apr 26 15:22:56 2010 UTC (2 months, 3 weeks ago)
Changed paths: 1
Log Message:
small patch to be able to save your own positions
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Modified:
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js?rev=965190&r1=965189&r2=965190&view=diff
==============================================================================
---
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
(original)
+++
wicket/trunk/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js
Sun Jul 18 09:51:09 2010
@@ -528,7 +528,10 @@ Wicket.Window.prototype = {
* Saves the position (and size if resizable) as a cookie.
*/
savePosition: function() {
-
+ savePositionAs(this.window.style.left, this.window.style.top,
this.window.style.width, this.content.style.height);
+ },
+
+ savePositionAs: function(x, y, width, height) {
if (typeof(this.settings.cookieId) != "undefined" &&
this.settings.cookieId != null) {
this.findPositionString(true);
@@ -541,10 +544,10 @@ Wicket.Window.prototype = {
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;
+ cookie += x + ",";
+ cookie += y + ",";
+ cookie += width + ",";
+ cookie += height;
var rest = Wicket.Cookie.get(this.cookieKey);
if (rest != null) {