You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/08/22 22:08:04 UTC
svn commit: r433769 - in /incubator/xap/trunk/WebContent/examples/dojo:
portlet.html portletHandler.js
Author: mturyn
Date: Tue Aug 22 15:08:04 2006
New Revision: 433769
URL: http://svn.apache.org/viewvc?rev=433769&view=rev
Log:
Improved layout.
Modified:
incubator/xap/trunk/WebContent/examples/dojo/portlet.html
incubator/xap/trunk/WebContent/examples/dojo/portletHandler.js
Modified: incubator/xap/trunk/WebContent/examples/dojo/portlet.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dojo/portlet.html?rev=433769&r1=433768&r2=433769&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dojo/portlet.html (original)
+++ incubator/xap/trunk/WebContent/examples/dojo/portlet.html Tue Aug 22 15:08:04 2006
@@ -63,21 +63,24 @@
<h1>A spatially-distributed component</h1>
<h2>---a "component" can be XAP+HTML....</h2>
-<TABLE align="left" border="4" width="80%" height="60%" cellpadding="3" cellspacing="4">
+<TABLE align="center" border="0" width="60%" height="60%"
+ border="1px" border-style="dotted" bgColor="#EEEEFF"
+ cellpadding="0px" cellspacing="-1px" frame="box"
+>
<TR>
- <TD border="2" align="center" valign="middle" id="00"></TD>
+ <TD border="0" align="left" valign="top" id="00"></TD>
<TD id="01"></TD>
- <TD border="2" align="center" valign="middle" id="02"></TD>
+ <TD border="0" align="right" valign="top" id="02"></TD>
</TR>
<TR>
<TD id="10"></TD>
- <TD border="2" align="center" valign="middle" id="xapHome"></TD>
+ <TD border="0" align="center" valign="middle" id="xapHome" height="1px" width="1px"></TD>
<TD id="12"></TD>
</TR>
<TR>
- <TD border="2" align="center" valign="middle" id="20"></TD>
+ <TD border="0" align="left" valign="bottom" id="20"></TD>
<TD id="21"></TD>
- <TD border="2" align="center" valign="middle" id="22"></TD>
+ <TD border="0" align="right" valign="bottom" id="22"></TD>
</TR>
</TABLE>
</body>
Modified: incubator/xap/trunk/WebContent/examples/dojo/portletHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/dojo/portletHandler.js?rev=433769&r1=433768&r2=433769&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/dojo/portletHandler.js (original)
+++ incubator/xap/trunk/WebContent/examples/dojo/portletHandler.js Tue Aug 22 15:08:04 2006
@@ -1,4 +1,5 @@
+
portletHandler = function(){} ;
// Light-up an adjacent cell:
@@ -28,26 +29,25 @@
var bridge = clientEvent.session.getUiDocumentHandler().getHandlerForElement( cpEl );
-// var palette = bridge.getPeer() ;
-// var colour = palette._color.replace(/\s/g,"") ;
-
- var colour = bridge.getAttribute( "color" ).replace(/\s/g,"") ;
+ var colour = bridge.getSelectedColor().replace(/\s/g,"") ;
var elementId = clientEvent.source.getAttribute("displayerId") ;
- var element = document.getElementById(portletHandler.getPairedCorner(elementId) );
+ var element = document.getElementById( elementId );
+ var nextElement = document.getElementById(portletHandler.getPairedCorner(elementId) );
- element.style.background = colour ;
+ element.style.background = colour ;
+ nextElement.style.background = colour ;
};
portletHandler.prototype.onClick = function () {
// Clears these cells:
- var elIds=["01","10","12","21" ] ;
+ var elIds=["01","10","12","21","00","22","02","20" ] ;
for ( var k = 0; k < elIds.length; ++k ){
var element = document.getElementById(elIds[k] );
- element.style.background = "rgb(255,255,235)" ;
+ element.style.background = "#EEEEFF" ;
}
};