You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2011/08/16 03:09:05 UTC
svn commit: r1158077 - in
/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5:
default.css t5-ajax.js
Author: hlship
Date: Tue Aug 16 01:09:04 2011
New Revision: 1158077
URL: http://svn.apache.org/viewvc?rev=1158077&view=rev
Log:
TAP5-1308: Tweak the layout and adjust it to resize when the window resizes
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-ajax.js
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css?rev=1158077&r1=1158076&r2=1158077&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/default.css Tue Aug 16 01:09:04 2011
@@ -496,9 +496,8 @@ DIV.t-exception-container {
background: white;
border: 1px solid black;
position: fixed;
- width: 80%;
- top: 30px;
- left: 10%;
+ top: 50px;
+ left: 50px;
-moz-box-shadow: 6px 6px 3px #888;
-webkit-box-shadow: 6px 6px 3px #888;
box-shadow: 6px 6px 3px #888;
@@ -511,12 +510,12 @@ DIV.t-exception-frame {
DIV.t-exception-container .t-exception-close {
display: block;
float: right;
- margin-left: 3px;
- margin-bottom: 3px;
+ margin: 5px;
+ padding-right: 2px;
+ padding-left: 22px;
+ height: 18px;
cursor: pointer;
- width: 16px;
- height: 16px;
- background: url("silk/delete.png");
+ background: #e8e8e8 url("silk/delete.png") no-repeat;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-ajax.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-ajax.js?rev=1158077&r1=1158076&r2=1158077&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-ajax.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-ajax.js Tue Aug 16 01:09:04 2011
@@ -38,6 +38,14 @@ T5.define("ajax", function() {
}
+ function resizeExceptionDialog() {
+ // Very Prototype specific!
+ var dims = document.viewport.getDimensions();
+
+ iframe.width = dims.width - 100;
+ iframe.height = dims.height - (100 + 20);
+ }
+
/**
* When there's a server-side failure, Tapestry sends back the exception report page as HTML.
* This function creates and displays a dialog that presents that content to the user using
@@ -72,6 +80,17 @@ T5.define("ajax", function() {
writeToErrorIFrame("");
T5.dom.hide(exceptionContainer);
});
+
+ // Call it now to set initial width/height.
+
+ resizeExceptionDialog();
+
+ // Very Prototype specific:
+
+ // See http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/1b0ce3e94020121f/cdbab773fd8e7a4b
+ // debounced to handle the rate at which IE sends the resizes (every pixel!)
+
+ Event.observe(window, "resize", _.debounce(resizeExceptionDialog, 20));
}