tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r470236 - in /tapestry/tapestry4/trunk/tapestry-framework/src: js/dojo/src/widget/Dialog.js test/org/apache/tapestry/enhance/BaseAutowire.java test/org/apache/tapestry/enhance/SubAutowire.java
Date Thu, 02 Nov 2006 05:58:13 GMT
Author: jkuhnert
Date: Wed Nov  1 21:58:12 2006
New Revision: 470236

URL: http://svn.apache.org/viewvc?view=rev&rev=470236
Log:
Temporary fix for b0rken dialog sizing calculations. (I'd do it in dojo but the testing process
there isn't exactly fun...Soon though.)

Added:
    tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/BaseAutowire.java
    tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/SubAutowire.java
Modified:
    tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js?view=diff&rev=470236&r1=470235&r2=470236
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo/src/widget/Dialog.js Wed Nov 
1 21:58:12 2006
@@ -7,7 +7,7 @@
 dojo.html.setOpacity(this.shared.bg, op);try {this.bgOpacity = dojo.html.getOpacity(this.shared.bg);}
catch (e) {this.bgOpacity = op;}
 return this.bgOpacity;},_sizeBackground: function() {if(this.bgOpacity > 0) {var viewport
= dojo.html.getViewport();var h = viewport.height;var w = viewport.width;with(this.shared.bg.style){width
= w + "px";height = h + "px";}
 var scroll_offset = dojo.html.getScroll().offset;this.shared.bg.style.top = scroll_offset.y
+ "px";this.shared.bg.style.left = scroll_offset.x + "px";var viewport = dojo.html.getViewport();if
(viewport.width != w) { this.shared.bg.style.width = viewport.width + "px"; }
-if (viewport.height != h) { this.shared.bg.style.height = viewport.height + "px"; }}},_showBackground:
function() {if(this.bgOpacity > 0) {this.shared.bg.style.display = "block";}},placeModalDialog:
function() {var scroll_offset = dojo.html.getScroll().offset;var viewport_size = dojo.html.getViewport();var
mb;if(this.isShowing()){mb = dojo.html.getMarginBox(this.containerNode);}else{dojo.html.setVisibility(this.domNode,
false);dojo.html.show(this.domNode);mb = dojo.html.getMarginBox(this.containerNode);dojo.html.hide(this.domNode);dojo.html.setVisibility(this.domNode,
true);}
+if (viewport.height != h) { this.shared.bg.style.height = viewport.height + "px"; }}},_showBackground:
function() {if(this.bgOpacity > 0) {this.shared.bg.style.display = "block";}},placeModalDialog:
function() {var scroll_offset = dojo.html.getScroll().offset;var viewport_size = dojo.html.getViewport();var
mb;if(this.isShowing()){mb = dojo.html.getMarginBox(this.domNode);}else{dojo.html.setVisibility(this.domNode,
false);dojo.html.show(this.domNode);mb = dojo.html.getMarginBox(this.domNode);dojo.html.hide(this.domNode);dojo.html.setVisibility(this.domNode,
true);}
 var x = scroll_offset.x + (viewport_size.width - mb.width)/2;var y = scroll_offset.y + (viewport_size.height
- mb.height)/2;with(this.domNode.style){left = x + "px";top = y + "px";}},showModalDialog:
function() {if (this.followScroll && !this._scrollConnected){this._scrollConnected
= true;dojo.event.connect(window, "onscroll", this, "_onScroll");}
 this.placeModalDialog();this.setBackgroundOpacity();this._sizeBackground();this._showBackground();},hideModalDialog:
function(){if (this.focusElement) {dojo.byId(this.focusElement).focus();dojo.byId(this.focusElement).blur();}
 this.shared.bg.style.display = "none";this.shared.bg.style.width = this.shared.bg.style.height
= "1px";if (this._scrollConnected){this._scrollConnected = false;dojo.event.disconnect(window,
"onscroll", this, "_onScroll");}},_onScroll: function(){var scroll_offset = dojo.html.getScroll().offset;this.shared.bg.style.top
= scroll_offset.y + "px";this.shared.bg.style.left = scroll_offset.x + "px";this.placeModalDialog();},checkSize:
function() {if(this.isShowing()){this._sizeBackground();this.placeModalDialog();this.onResized();}}});dojo.widget.defineWidget(

Added: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/BaseAutowire.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/BaseAutowire.java?view=auto&rev=470236
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/BaseAutowire.java
(added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/BaseAutowire.java
Wed Nov  1 21:58:12 2006
@@ -0,0 +1,37 @@
+// Copyright 2004, 2005 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package org.apache.tapestry.enhance;
+
+import org.apache.commons.logging.Log;
+
+
+/**
+ * Used to test {@link AutowireWorker}.
+ *
+ * @author jkuhnert
+ */
+public class BaseAutowire {
+    
+    private Log _log;
+    
+    public final Log getLog()
+    {
+        return _log;
+    }
+    
+    public final void setLog(Log log)
+    {
+        _log = log;
+    }
+}

Added: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/SubAutowire.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/SubAutowire.java?view=auto&rev=470236
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/SubAutowire.java
(added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/SubAutowire.java
Wed Nov  1 21:58:12 2006
@@ -0,0 +1,25 @@
+// Copyright 2004, 2005 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package org.apache.tapestry.enhance;
+
+
+/**
+ * Simple subclass.
+ *
+ * @author jkuhnert
+ */
+public class SubAutowire extends BaseAutowire
+{
+    
+}



Mime
View raw message