<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Gonzalo Silverio's Weblog &#187; css</title>
	<atom:link href="http://gonzalosilverio.wordpress.com/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://gonzalosilverio.wordpress.com</link>
	<description>Web presentation technologies, flyfishing, Nahuatl Court Poetry, pest control</description>
	<lastBuildDate>Wed, 20 May 2009 13:08:44 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='gonzalosilverio.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/1ab63a470b01e0b22db39181eeabdc88?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Gonzalo Silverio's Weblog &#187; css</title>
		<link>http://gonzalosilverio.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gonzalosilverio.wordpress.com/osd.xml" title="Gonzalo Silverio&#8217;s Weblog" />
		<item>
		<title>The Sakai PDA portal</title>
		<link>http://gonzalosilverio.wordpress.com/2008/11/20/the-sakai-pda-portal/</link>
		<comments>http://gonzalosilverio.wordpress.com/2008/11/20/the-sakai-pda-portal/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 03:19:05 +0000</pubDate>
		<dc:creator>gonzalosilverio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[sakai]]></category>

		<guid isPermaLink="false">http://gonzalosilverio.wordpress.com/?p=32</guid>
		<description><![CDATA[Sakai has a portal for small devices since 2.4. It is pretty bare bones but it does several neat things:

it flattens the tool/site hierarchy so that they can coexist in the same breadcrumb
it serves up an iframeless experience
it elides many elements from the portal that would be noise in a small screen

Am working on several [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=32&subd=gonzalosilverio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Sakai has a portal for small devices since 2.4. It is pretty bare bones but it does several neat things:</p>
<ol>
<li>it flattens the tool/site hierarchy so that they can coexist in the same breadcrumb</li>
<li>it serves up an iframeless experience</li>
<li>it elides many elements from the portal that would be noise in a small screen</li>
</ol>
<p>Am working on several improvements to it for Sakai 2.7  under <a href="http://bugs.sakaiproject.org/jira/browse/SAK-14827">SAK-14827</a> and we are testing it at Michigan. It has been a very instructive experience constraining things to the small screen. What follows is a description of the changes, some tools and techniques that were useful, and some  observations from the preliminary testing.</p>
<p>The main tool turned out to be an iTouch that Chuck Severance donated to the lab. I tried several emulators such as <a href="http://marketcircle.com/iphoney/">iPhoney</a>, Apple&#8217;s iPhone Simulator that comes with the <a href="http://developer.apple.com/iphone/program/download.html">iPhone SDK</a> but there was no substitute for the actual thing.</p>
<p>Initially all I had in mind was polishing the portal, taking into account the screen size and the input device (your finger!). The PDA portal is served via a single Velocity template file present at a specific URL, so there was no need to do device detection &#8211; if you are there, you are using  a PDA (or, if you want to use a PDA you should use that URL). In the future it would be nice to route that  user agent to that URL automatically.</p>
<pre>http://localhost:8080/portal/pda</pre>
<p>The main complication was setting the viewport via the &lt;meta /&gt; tag. The <a href="http://developer.apple.com/iphone/designingcontent.html">official documentation</a> is very telegraphic, but there is <a href="http://groups.google.com/group/iphonewebdev/browse_thread/thread/f43493a828dffdb3">discussion</a> about it. Eventually I settled on the following:</p>
<pre>&lt;meta name="viewport" content="width=device-width,
     user-scalable=yes,  initial-scale=1.0, maximum-scale=2.0"/&gt;</pre>
<p>The main issue here is font sizing after an portrait/landscape orientation change or after the user input zoom function takes place. Amazing to think that some people are using <a href="http://www.joehewitt.com/files/liquid1.html">Javascript to detect the first</a>.</p>
<p>The second task was to take all the styling references out of the template and out of the experimental portalstyles.css and create a CSS framework for the PDA. This entailed adding a pda.css + 3 images to each skin in the system, and querying in the template what was the skin in use per site.</p>
<p>Note: I have only checked into trunk the style sheets and images. The changes to the velocity template (pda.vm) and loginTool.java are being reviewed.</p>
<p>Now that the PDA portal was skinnable, it&#8217;s styles could be addressed via the CSS. The main preoccupations here were the following:</p>
<ol>
<li>font sizing</li>
<li>adjusting padding/margins on links so that fingers of a moderate fatness could poke in the right place&#8230;</li>
<li>curtailing horizontal spread</li>
</ol>
<p>The results for the gateway pages and the site/tool pages are pretty good. Below with the University of Michigan skin, site navigation.</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/11/picture-3.png"></a><a href="http://gonzalosilverio.files.wordpress.com/2008/11/picture-3.png"><img class="alignnone size-full wp-image-189" title="picture-3" src="http://gonzalosilverio.files.wordpress.com/2008/11/picture-3.png?w=450&#038;h=241" alt="picture-3" width="450" height="241" /></a></p>
<p>The tool navigation:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/11/picture-41.png"><img class="alignnone size-full wp-image-191" title="picture-41" src="http://gonzalosilverio.files.wordpress.com/2008/11/picture-41.png?w=450&#038;h=241" alt="picture-41" width="450" height="241" /></a></p>
<p>And an actual tool:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/11/picture-1.png"><img class="alignnone size-full wp-image-192" title="picture-1" src="http://gonzalosilverio.files.wordpress.com/2008/11/picture-1.png?w=450&#038;h=241" alt="picture-1" width="450" height="241" /></a></p>
<p>I have craftily selected a tool for the screen-shot that works very well in this medium: the calendar summary from the excellent folks at Universidade Fernando Pessoa. Other tools are less fortunate.</p>
<p>A fun thing was adding icons for bookmarks. Following this <a href="http://www.ianhoar.com/2008/08/30/create-a-custom-iphone-icon-for-your-website/">tutorial</a> I created a handful in no time. The iPhone actually takes care of all the glitz effects (corners, glassy look).</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/11/picture-5.png"><img class="alignnone size-full wp-image-194" title="picture-5" src="http://gonzalosilverio.files.wordpress.com/2008/11/picture-5.png?w=450&#038;h=241" alt="picture-5" width="450" height="241" /></a></p>
<p>And this is what the icon looks like in the &#8220;desktop&#8221;</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/11/picture-7.png"><img class="alignnone size-medium wp-image-196" title="picture-7" src="http://gonzalosilverio.files.wordpress.com/2008/11/picture-7.png?w=161&#038;h=300" alt="picture-7" width="161" height="300" /></a></p>
<p>And what the Sakai skin looks like:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/11/picture-8.png"><img class="alignnone size-full wp-image-197" title="picture-8" src="http://gonzalosilverio.files.wordpress.com/2008/11/picture-8.png?w=450&#038;h=241" alt="picture-8" width="450" height="241" /></a></p>
<p>Preliminary testing with the iTouch indicates some problem areas.</p>
<ol>
<li> Any tool that uses internal iframes is hosed.</li>
<li>The browser detection identifies the iTouch as Safari, and serves it the default rich text editor, with it is unable to use &#8211; it should instead serve a plain text area.</li>
<li>Cannot do attachments because the &lt;input type=&#8221;file&#8221; /&gt; is disabled in the iTouch.</li>
<li>Not all tools render nicely, lots more to be done in this area.</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gonzalosilverio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gonzalosilverio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gonzalosilverio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gonzalosilverio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gonzalosilverio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gonzalosilverio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gonzalosilverio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gonzalosilverio.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gonzalosilverio.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gonzalosilverio.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=32&subd=gonzalosilverio&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gonzalosilverio.wordpress.com/2008/11/20/the-sakai-pda-portal/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/53c44f824ee4db9d068fdd4f8c6de656?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gonzalosilverio</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/11/picture-3.png" medium="image">
			<media:title type="html">picture-3</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/11/picture-41.png" medium="image">
			<media:title type="html">picture-41</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/11/picture-1.png" medium="image">
			<media:title type="html">picture-1</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/11/picture-5.png" medium="image">
			<media:title type="html">picture-5</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/11/picture-7.png?w=161" medium="image">
			<media:title type="html">picture-7</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/11/picture-8.png" medium="image">
			<media:title type="html">picture-8</media:title>
		</media:content>
	</item>
		<item>
		<title>RTL&#8217;g Sakai Tools</title>
		<link>http://gonzalosilverio.wordpress.com/2008/10/22/rtlg-sakai-tools/</link>
		<comments>http://gonzalosilverio.wordpress.com/2008/10/22/rtlg-sakai-tools/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 00:10:36 +0000</pubDate>
		<dc:creator>gonzalosilverio</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[sakai]]></category>

		<guid isPermaLink="false">http://gonzalosilverio.wordpress.com/?p=143</guid>
		<description><![CDATA[In order to create a skin for a RTL context we will be working in a the tool.css (so that we can override tool_base.css) of a new skin, named RTL. We will identify changes that need to be made, workarounds, failures to account for an RTL context in the tool design, etc.
If you are not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=143&subd=gonzalosilverio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In order to create a skin for a RTL context we will be working in a the <code>tool.css </code>(so that we can override <code>tool_base.css</code>) of a new skin, named RTL. We will identify changes that need to be made, workarounds, failures to account for an RTL context in the tool design, etc.</p>
<p>If you are not very interested in the details  - the uncombed and disreputable skin is availiable <a title="Right To Left Skin" href="http://www.umich.edu/~gsilver/rtl/rtl.zip" target="_blank">here</a></p>
<p>If you want to know how we got to this and the shortcomings of this approach, read on.</p>
<p>We will begin with a simple tool view  - the Announcements list. What it looks like in a LTR context:</p>
<p><span style="text-decoration:underline;"><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool2.png"></a><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool2.png"><img class="alignnone size-large wp-image-159" title="tool2" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool2.png?w=450&#038;h=215" alt="" width="450" height="215" /></a></span></p>
<p>What the <code>direction:rtl</code> applied to <code>.portletBody</code> gets us. Am keeping the language as English.</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool3.png"><img class="alignnone size-large wp-image-160" title="tool3" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool3.png?w=450&#038;h=205" alt="" width="450" height="205" /></a></p>
<p>Some nice things: the toolbar has been rearranged. The columns of the announcement table have been flipped correctly. Block elements are now flush right, such as the <code>&lt;h3&gt;Announcements&lt;/h3&gt;</code>. The label of the view navigator select is not to the right of the select. The select itself is reoriented. The list paged lists, from right to left: &#8220;first page, previous page, next page, last page&#8221; correctly as the entire block has been flipped.</p>
<p>Some things that will need to be addressed: a) the pipes between the toolbar items look wacky and need to be aligned right; 2) the navigation panels need to be flipped ( a sad irony: if the layout of these and the toolbar  had been a table our work would be done); 3) the text direction of the cells inside the table needs to be adjusted.</p>
<p><strong>The toolbar</strong></p>
<p>Align the toolbar right. We will be working in the new rtl/tool.css):</p>
<pre><span>.navIntraTool {
<span>	</span><span style="color:#ff0000;">text-align: right;</span>
}</span></pre>
<p>Add a border to the span child of the first list element:</p>
<pre>}
/*special style for the first item, namely no border-left*/
.navIntraTool li.firstToolBarItem span{
	<span style="color:#ff0000;">/*border:none;*/border-left:1px solid #ccc;</span>
}</pre>
<p>and take the border away from the last:</p>
<pre>.navIntraTool li:last-child span{
	<span style="color:#ff0000;">border:none</span>
}</pre>
<p>Since the design of the toolbar did not take into account a RTL possibility we had to resort to a pseudo class to identify the last element. We will see this problem elsewhere.</p>
<p><strong>The navigation panels</strong></p>
<p>The layout of these is set in tool_base.css. We will override in rtl/tool.css:</p>
<pre>.viewNav{
	<span style="color:#ff0000;">float: right;</span>
}
.listNav{
	<span style="color:#ff0000;">float: left;</span>
}</pre>
<p><strong>The table list</strong></p>
<pre>/*skinned header of standard tab. data table*/
.listHier th, .listHier td{
	<span style="color:#ff0000;">text-align: right !important;
<span style="color:#000000;">}</span></span></pre>
<p>The <span style="color:#ff0000;">!important</span> is needed to override the <span style="color:#ff0000;">!important</span> in <code>tool_base.css </code>- a bad decision that now needs to be dealt with.</p>
<p>The end result:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool4.png"><img class="alignnone size-large wp-image-162" title="tool4" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool4.png?w=450&#038;h=221" alt="" width="450" height="221" /></a></p>
<p>And in the target language:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool5.png"><img class="alignnone size-large wp-image-163" title="tool5" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool5.png?w=450&#038;h=219" alt="" width="450" height="219" /></a></p>
<p>Some issues remain with the navigation panels &#8211; reversing the floats did not exactly reverse the position, resulting in some inexplicable whitespace.  Someone help, please.</p>
<p>To recapitulate before we take on a more complex view of this tool: a) any series that identifies a first item also needs to identify the last; b) floats are not always totally reversible.</p>
<p><strong>Forms and inputs</strong></p>
<p>Some problems regarding the layout of the <code>input</code>, <code>label</code> and <code>required marker </code>troika. The orientation of the three is just not working due to floats. An example from create a new announcement.</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool6.png"><img class="alignnone size-large wp-image-165" title="tool6" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool6.png?w=450&#038;h=237" alt="" width="450" height="237" /></a></p>
<p>So we rearrange the floats and display attributes, paddings, margins (if you are redoing an existing skin, look for some of these definitions elsewhere in the sheets if your results do not match):</p>
<pre>.shorttext label{
<span style="color:#ff0000;">	float:none;
	display:block;
	padding:0;
	margin:0;
</span>}
.shorttext .reqStar{
<span style="color:#ff0000;">	float:right;
	margin-right:-7px;
</span>}
.longtext label{
<span style="color:#ff0000;">	float:none;
	display:block
</span>}
.longtext label .reqStar{
<span style="color:#ff0000;">	float:right;
	margin-right:-7px;
</span>}</pre>
<p>So:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool71.png"><img class="alignnone size-large wp-image-167" title="tool71" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool71.png?w=450&#038;h=194" alt="" width="450" height="194" /></a></p>
<p>And in Arabic:</p>
<p><span style="text-decoration:underline;"><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool8.png"></a><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool8.png"><img class="alignnone size-large wp-image-168" title="tool8" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool8.png?w=450&#038;h=204" alt="" width="450" height="204" /></a></span></p>
<p>The other input types render correctly without any tweaking (this is also from create a new announcement):</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool9.png"><img class="alignnone size-full wp-image-171" title="tool9" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool9.png?w=393&#038;h=430" alt="" width="393" height="430" /></a></p>
<p>While on the subject of inputs, the following is also needed if there is to be mixed RTL and LTR content:</p>
<pre>input, textarea{
	<span style="color:#ff0000;">unicode-bidi: override;</span>
}</pre>
<div><span>This opens an  additional level of embedding and overrides the Unicode character ordering, reordering the sequence to the value of the direction property. </span></div>
<div><span style="text-decoration:underline;"><a href="http://gonzalosilverio.files.wordpress.com/2008/10/tool101.png"><img class="alignnone size-full wp-image-174" title="tool101" src="http://gonzalosilverio.files.wordpress.com/2008/10/tool101.png?w=419&#038;h=181" alt="" width="419" height="181" /></a></span></div>
<p>A quick glance over the core tools and it seems most rendering now is OK. There will be exceptions where the developer has been forced to apply sui generis layout or styles because of the paucity of the default styles. There will also need to be addressed &#8211; please leave some comments where that is the case, thanks!</p>
<p>Off hand &#8211; here are some locales that need more work because of these and other reasons:</p>
<ol>
<li>Filtering controls in Schedule list view.</li>
<li>&#8220;Add&#8221; menu in Resources &#8211; text is misaligned.</li>
<li>Certain icons are facing in the wrong direction &#8211; such as disclosure triangles. These will need to be replaced in the file system when they are inline images, or in the skin when pulled as background images.</li>
<li>The FCK Editor &#8211; needs configuration &#8211; information on configuring the FCK Editor for RTL is <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Configuration/Configuration_Options/ContentLangDirection" target="_blank">here</a>. There are language files for Arabic and Hebrew, Persian as well. Probably a lot of other stuff that a native speaker could figure out needs to be tweaked.</li>
<li>Placement of icons inside certain blocks needs to be tweaked &#8211; see alertMessage etc. </li>
</ol>
<p>The uncombed and disreputable skin is avaliable <a title="Right To Left Skin" href="http://www.umich.edu/~gsilver/rtl/rtl.zip" target="_blank">here</a>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gonzalosilverio.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gonzalosilverio.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gonzalosilverio.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gonzalosilverio.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gonzalosilverio.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gonzalosilverio.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gonzalosilverio.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gonzalosilverio.wordpress.com/143/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gonzalosilverio.wordpress.com/143/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gonzalosilverio.wordpress.com/143/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=143&subd=gonzalosilverio&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gonzalosilverio.wordpress.com/2008/10/22/rtlg-sakai-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/53c44f824ee4db9d068fdd4f8c6de656?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gonzalosilverio</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool2.png?w=450" medium="image">
			<media:title type="html">tool2</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool3.png?w=450" medium="image">
			<media:title type="html">tool3</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool4.png?w=450" medium="image">
			<media:title type="html">tool4</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool5.png?w=450" medium="image">
			<media:title type="html">tool5</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool6.png?w=450" medium="image">
			<media:title type="html">tool6</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool71.png?w=450" medium="image">
			<media:title type="html">tool71</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool8.png?w=450" medium="image">
			<media:title type="html">tool8</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool9.png" medium="image">
			<media:title type="html">tool9</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/tool101.png" medium="image">
			<media:title type="html">tool101</media:title>
		</media:content>
	</item>
		<item>
		<title>RTL&#8217;ng Sakai from portal to tools</title>
		<link>http://gonzalosilverio.wordpress.com/2008/10/20/rtlng-sakai-from-portal-to-tools/</link>
		<comments>http://gonzalosilverio.wordpress.com/2008/10/20/rtlng-sakai-from-portal-to-tools/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 17:14:10 +0000</pubDate>
		<dc:creator>gonzalosilverio</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[sakai]]></category>

		<guid isPermaLink="false">http://gonzalosilverio.wordpress.com/?p=127</guid>
		<description><![CDATA[Some things we left disheveled in a previous post about the RTL Sakai Portal, I will address these below. We are modifying a pre-existing portal in case this is useful to a context where the LTR and the RTL experiences need to coexist &#8211; then you can just modify the existing LTR portal skin. If [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=127&subd=gonzalosilverio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some things we left disheveled in a previous post about the <a href="http://gonzalosilverio.wordpress.com/2008/10/10/rtl-sakai/" target="_self">RTL Sakai Portal</a>, I will address these below. We are modifying a pre-existing portal in case this is useful to a context where the LTR and the RTL experiences need to coexist &#8211; then you can just modify the existing LTR portal skin. If the context is strictly RTL, you might be better off starting from scratch. I will provide a starter RTL skin at the end.</p>
<p><strong>Site navigation</strong></p>
<p>Some portal clean up: the pipes between site links still reflect a LTR orientation.</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-sitenav2.png"><img class="alignnone size-large wp-image-129" title="portal-clean-sitenav2" src="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-sitenav2.png?w=450&#038;h=167" alt="" width="450" height="167" /></a></p>
<p>Change the location of the borders:</p>
<pre>/*links to other sites*/
#siteLinkList a,#siteLinkList a:link,#siteLinkList a:visited{
    color: #fff;
    padding: 2px 6px 2px 4px;
    text-decoration: none;
    <span style="color:#ff0000;">/*border-right: 1px solid #fff;*/border-left: 1px solid #fff;</span>
}</pre>
<p>and take borders away from the last link (which is the left-most one):</p>
<pre>#siteLinkList li:last-child a{
<span style="color:#ff0000;">    border:none</span>
}</pre>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-sitenav1.png"><img class="alignnone size-large wp-image-128" title="portal-clean-sitenav1" src="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-sitenav1.png?w=450&#038;h=217" alt="" width="450" height="217" /></a><br />
<strong><br />
Portlet titles</strong></p>
<p>The portlet titles also need sorting, flip the floats and text directions :</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-port-title1.png"><img class="alignnone size-full wp-image-145" title="portal-clean-port-title1" src="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-port-title1.png?w=447&#038;h=38" alt="" width="447" height="38" /></a></p>
<pre>.portletTitle .title{
	<span style="color:#ff0000;">/*float: left;*/float: right;</span>
}
.portletTitle .title a{
	<span style="color:#ff0000;">/*float:left;*/float:right;</span>
}
.portletTitle .action{
	<span style="color:#ff0000;">/*text-align: right;*/text-align: left;</span>
}</pre>
<p>So now the direction is correct:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-port-title2.png"><img class="alignnone size-full wp-image-146" title="portal-clean-port-title2" src="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-port-title2.png?w=441&#038;h=38" alt="" width="441" height="38" /></a></p>
<p><strong>Presence</strong></p>
<p>Presence also shows the old LRT orientation:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-presence1.png"><img class="alignnone size-full wp-image-130" title="portal-clean-presence1" src="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-presence1.png?w=237&#038;h=177" alt="" width="237" height="177" /></a></p>
<p>On the portal level &#8211; adjust  the title:</p>
<pre>#presenceTitle{
   font-size: .7em;
<span style="color:#ff0000;">   /*text-align: left;*/text-align: right;</span>
   margin-left: .5em;
}</pre>
<p>The presence list is inside of an iframe &#8211; and as such it is a tool, so it will be a useful segue to RTL&#8217;ng the tools. As with the portal we are adding the direction attribute to the first child of body (<code>.portletBody</code>).</p>
<pre>.portletBody{
   <span style="color:#ff0000;">direction:rtl</span>
}</pre>
<p>This will get us a lot of LTR &gt; RTL changes for free in all of the tool descendants as we will see later. Except in the presence list as that doc does not have a <code>.portalBody</code> wrapper!!! Since presence does not have a <code>.portletBody</code> we need to add direction attribute to the list itself and fiddle with the paddings:</p>
<pre>/*below for "presence in chat" functionality*/
.presenceList{
   font-size: .8em;
   list-style: none;
   margin: 0;
   <span style="color:#ff0000;">direction:rtl;
   text-align:right;</span>
   <span style="color:#ff0000;">/*padding-left: .1em*/padding-right: .1em;</span>
}

.presenceList li {
   <span style="color:#ff0000;"> /*padding: 0 0 0 .7em;*/padding: 0 .7em 0 0;
</span>    margin-bottom: .2em;
}</pre>
<p>Looks better now:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-presence2.png"><img class="alignnone size-full wp-image-133" title="portal-clean-presence2" src="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-presence2.png?w=258&#038;h=141" alt="" width="258" height="141" /></a></p>
<p>The results this far:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/portal-cleanfinal.png"><img class="alignnone size-large wp-image-148" title="portal-cleanfinal" src="http://gonzalosilverio.files.wordpress.com/2008/10/portal-cleanfinal.png?w=450&#038;h=297" alt="" width="450" height="297" /></a></p>
<p>Next post &#8211; the tools in all their glory.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gonzalosilverio.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gonzalosilverio.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gonzalosilverio.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gonzalosilverio.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gonzalosilverio.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gonzalosilverio.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gonzalosilverio.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gonzalosilverio.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gonzalosilverio.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gonzalosilverio.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=127&subd=gonzalosilverio&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gonzalosilverio.wordpress.com/2008/10/20/rtlng-sakai-from-portal-to-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/53c44f824ee4db9d068fdd4f8c6de656?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gonzalosilverio</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-sitenav2.png?w=450" medium="image">
			<media:title type="html">portal-clean-sitenav2</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-sitenav1.png?w=450" medium="image">
			<media:title type="html">portal-clean-sitenav1</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-port-title1.png" medium="image">
			<media:title type="html">portal-clean-port-title1</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-port-title2.png" medium="image">
			<media:title type="html">portal-clean-port-title2</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-presence1.png" medium="image">
			<media:title type="html">portal-clean-presence1</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/portal-clean-presence2.png" medium="image">
			<media:title type="html">portal-clean-presence2</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/portal-cleanfinal.png?w=450" medium="image">
			<media:title type="html">portal-cleanfinal</media:title>
		</media:content>
	</item>
		<item>
		<title>RTL Sakai</title>
		<link>http://gonzalosilverio.wordpress.com/2008/10/10/rtl-sakai/</link>
		<comments>http://gonzalosilverio.wordpress.com/2008/10/10/rtl-sakai/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 15:19:16 +0000</pubDate>
		<dc:creator>gonzalosilverio</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[sakai]]></category>

		<guid isPermaLink="false">http://gonzalosilverio.wordpress.com/?p=70</guid>
		<description><![CDATA[Back in Sakai 2.0 I went through an attempt to serve up a Right To Left language Sakai experience. At the time this was just an academic exercise, as there were no language resource bundles for Arabic, Hebrew, Farsi, etc. I just wanted to torture test the framework, frankly. It was amazingly simple to modify [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=70&subd=gonzalosilverio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Back in Sakai 2.0 I went through an attempt to serve up a Right To Left language Sakai experience. At the time this was just an academic exercise, as there were no language resource bundles for Arabic, Hebrew, Farsi, etc. I just wanted to torture test the framework, frankly. It was amazingly simple to modify the <strong>portal </strong>framework via the skin to serve up an adequate portal. The tools were a different matter altogether, being so varied, and represented a number of challenges.</p>
<p>Now there <strong>is</strong> a Arabic translation (in trunk), so I thought I would go through the process again and hope it is useful.  The framework has changed substantially also, so it was due.  In this post I will outline the steps to turn a LTR portal (the Michigan CTools) into a RTL portal for some hypothetical university where Arabic is the main language. Disclaimer: I took Arabic in college, but it is long forgotten &#8211; so I am relying on random boilerplate and on iGoogle&#8217;s translator service for example strings. Don&#8217;t read too much into it!</p>
<p>In a future post I will go through one or two tools in a similar fashion.</p>
<ol>
<li>Use trunk. Add &#8216;ar&#8217; to the locales attribute in sakai.properties, start tomcat.</li>
<li>Login as admin. Create a user, give him a RTL name. In this case I used داود سيلڤَر (with a Latin id if you are not a RTL speaker, I used daud).</li>
<li>We will want داود to mess around with tools as &#8216;mantain&#8217; to get the full experience so create a site and add him as mantain. I used boilerplate Arabic for site title and description.</li>
<li>Login as &#8216;daud&#8217;</li>
<li>Change your Preferences &gt; Locales to &#8216;Arabic&#8217;</li>
</ol>
<div>Tada! First impressions &#8211; neat! Second impression &#8211; I cannot read it, it is too small. We will address that later.</div>
<div><a href="http://gonzalosilverio.files.wordpress.com/2008/10/small-font.png"><img class="alignnone size-full wp-image-73" style="border:1px solid #ccc;" title="small-font" src="http://gonzalosilverio.files.wordpress.com/2008/10/small-font.png?w=424&#038;h=303" alt="" width="424" height="303" /></a></div>
<p>First thing &#8211; let&#8217;s add a <code>direction</code> attribute to first child of the portal body:</p>
<pre>#portalOuterContainer{
	<strong><span style="color:#ff0000;">direction: rtl;</span></strong>
}</pre>
<p>This gets us started. All HTML elements that inherit this attribute and <strong>use</strong> it will reverse direction. Now we need to address the elements that are not affected.</p>
<p><span style="text-decoration:underline;"><a href="http://gonzalosilverio.files.wordpress.com/2008/10/rtl-1.png"></a><a href="http://gonzalosilverio.files.wordpress.com/2008/10/rtl-1.png"><img class="alignnone size-large wp-image-76" title="rtl-1" src="http://gonzalosilverio.files.wordpress.com/2008/10/rtl-1.png?w=450&#038;h=314" alt="" width="450" height="314" /></a></span></p>
<p>Some things will need to be addressed substantially: 1) the orientation of the mast head needs to be fixed so that from RTL: logo, banner, login; 2) site list orientation; 3) the portlet title (Announcements) also needs to be reconfigured as well; 4) finally &#8211; the portal content needs to be from RTL: tool links, content.</p>
<p><strong>Reorienting the mast head</strong></p>
<p>We have this mess to contend with:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/masthead11.png"><img class="alignnone size-large wp-image-81" title="masthead11" src="http://gonzalosilverio.files.wordpress.com/2008/10/masthead11.png?w=450&#038;h=47" alt="" width="450" height="47" /></a></p>
<p>I have outlined the three components in red. From LTR: #mastLogo, #mastBanner, #mastLogin. They are all floated. We need to reverse the order, so let&#8217;s reverse the float:</p>
<pre>#mastLogin{
 <span style="color:#ff0000;"> /*float:right*/ float:left</span>
}
#mastBanner{
  <span style="color:#ff0000;">/*float:left*/float:right</span>
}</pre>
<p>That is it &#8211; really. Am omitting all of the other attributes. Which gives us:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/masthead2.png"><img class="alignnone size-large wp-image-82" title="masthead2" src="http://gonzalosilverio.files.wordpress.com/2008/10/masthead2.png?w=450&#038;h=44" alt="" width="450" height="44" /></a></p>
<p>The order of labels and inputs is following the direction <code>attribute</code> of the <code>body</code>. Everything else needs work.  Am going to hide #mastLogo because we do not need it. Any graphic element can be poked in as a background of any of the (embarrassingly numerous) other canvases available. I will also add different logos and background colors.</p>
<p>So &#8211; new image for <code>banner_inst.gif</code> and reverse the padding orientation on <code>#mastLogin:</code></p>
<pre>#mastLogin{
	float: left;
	text-align: right;
	<span style="color:#ff0000;">/*padding-right: 15px;*/padding-left: 15px;</span>
	vertical-align: top;
}</pre>
<p>Which leaves us with:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/masthead3.png"><img class="alignnone size-large wp-image-84" title="masthead3" src="http://gonzalosilverio.files.wordpress.com/2008/10/masthead3.png?w=450&#038;h=59" alt="" width="450" height="59" /></a></p>
<p>The language bundle seems to be missing the Arabic equivalents for the input labels, but the position basics are in place: logo to the right, login to the left.</p>
<p><strong>Reorienting the site navigation</strong></p>
<p>We are left with:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav11.png"><img class="alignnone size-large wp-image-87" title="sitenav11" src="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav11.png?w=450&#038;h=30" alt="" width="450" height="30" /></a></p>
<p>Swapping the floats (links and select) reflect the importance of the 2 in the RTL context:</p>
<pre>#linkNav{
	<span style="color:#ff0000;">/*float:right*/ float:left</span>
}
#selectNav{
	<span style="color:#ff0000;">/*float:left;*/ float:right</span>
}</pre>
<div><span>So (am hiding the banner_inst.gif image):<br />
</span></div>
<div><a href="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav2.png"><img class="alignnone size-large wp-image-89" title="sitenav2" src="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav2.png?w=450&#038;h=45" alt="" width="450" height="45" /></a></div>
<p>Although the the <code>direction:rtl</code> in the <code>body</code> gets us the RTL select, it does not flip the orientation of the inline list that the site links are, a list is a list and has an order. We will need to be more devious&#8230;</p>
<pre>#siteLinkList li{
	display: inline;
	<strong><span style="color:#ff0000;">float:right;</span></strong>
}</pre>
<div><span>Yay &#8211; the order of importance reflected in the original LTR is now reflected in the RTL context: My Workspace, sites, other sites. Some minor touches are still needed such  as the separators between site links, padding, etc.<br />
</span></div>
<div><a href="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav3.png"><img class="alignnone size-large wp-image-90" title="sitenav3" src="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav3.png?w=450&#038;h=45" alt="" width="450" height="45" /></a></div>
<p><strong>Reorienting the content</strong></p>
<div>The site content consists of a container (imaginatively id&#8217;d as #container), with two children: #toolMenuWrap (the tool link upper parent) and #content. Again , we have to tinker with the float of one:</div>
<pre>#toolMenuWrap {
     border-right:2px solid #FFFFFF;
     color:#000000;
    <span style="color:#ff0000;"> /*float:left;*/ float:right</span>
     padding:0 0.5em 0 0;
     text-align:right;
     width:9.6em;
}</pre>
<p>and the margin of the other</p>
<pre>#content{
	padding: 0;
	margin-top: .5em;
	<span style="color:#ff0000;">/*margin-left: 11em;*/ margin-right: 11em;</span>
}</pre>
<p>and the text-align of the #toolMenu list items:</p>
<pre>#toolMenu li{
	margin: 0;
	width: auto;
	padding: 0;
	border: 1px solid #fff;
	<span style="color:#ff0000;">/*text-align: left;*/text-align: right;</span>
}</pre>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/10/portal1-final.png"><img class="alignnone size-large wp-image-120" title="portal1-final" src="http://gonzalosilverio.files.wordpress.com/2008/10/portal1-final.png?w=450&#038;h=322" alt="" width="450" height="322" /></a></p>
<p>Not bad, although quite a bit of clean up left to do (the presence block, the portlet titles (which are in the portal doc of all things) for example, the footers, etc.) And being ignorant of the actual use and needs, quite a few things I have overlooked as well &#8211; do leave comments setting me straight.  I will upload the finished skin later. I will also address soon the skinning of the tools (gulp).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gonzalosilverio.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gonzalosilverio.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gonzalosilverio.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gonzalosilverio.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gonzalosilverio.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gonzalosilverio.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gonzalosilverio.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gonzalosilverio.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gonzalosilverio.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gonzalosilverio.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=70&subd=gonzalosilverio&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gonzalosilverio.wordpress.com/2008/10/10/rtl-sakai/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/53c44f824ee4db9d068fdd4f8c6de656?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gonzalosilverio</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/small-font.png" medium="image">
			<media:title type="html">small-font</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/rtl-1.png?w=450" medium="image">
			<media:title type="html">rtl-1</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/masthead11.png?w=450" medium="image">
			<media:title type="html">masthead11</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/masthead2.png?w=450" medium="image">
			<media:title type="html">masthead2</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/masthead3.png?w=450" medium="image">
			<media:title type="html">masthead3</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav11.png?w=450" medium="image">
			<media:title type="html">sitenav11</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav2.png?w=450" medium="image">
			<media:title type="html">sitenav2</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/sitenav3.png?w=450" medium="image">
			<media:title type="html">sitenav3</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/10/portal1-final.png?w=450" medium="image">
			<media:title type="html">portal1-final</media:title>
		</media:content>
	</item>
		<item>
		<title>Print previews on the cheap</title>
		<link>http://gonzalosilverio.wordpress.com/2008/08/22/print-previews-on-the-cheap/</link>
		<comments>http://gonzalosilverio.wordpress.com/2008/08/22/print-previews-on-the-cheap/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 17:25:49 +0000</pubDate>
		<dc:creator>gonzalosilverio</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[sakai]]></category>

		<guid isPermaLink="false">http://gonzalosilverio.wordpress.com/?p=42</guid>
		<description><![CDATA[1. Put this in the document (as well as a link to the jquery file).
&#60;script type="text/javascript"&#62;
  $(document).ready(function(){
    setupLinks();
    setupPrintPreview();
  });
&#60;/script&#62;
2. Put this in your external javascript:
function setupLinks(){
  $('a.print-window').click(function(){
     var w = window.open(this.href, 'printwindow', 'width=600,
         [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=42&subd=gonzalosilverio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>1. Put this in the document (as well as a link to the jquery file).</p>
<pre>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
    setupLinks();
    setupPrintPreview();
  });
&lt;/script&gt;</pre>
<p>2. Put this in your external javascript:</p>
<pre>function setupLinks(){
  $('a.print-window').click(function(){
     var w = window.open(this.href, 'printwindow', 'width=600,
          height=400,scrollbars=yes,resizable=yes');
     w.focus();
     return false;
  });
}</pre>
<p>3. And this</p>
<pre>function setupPrintPreview(){
  if (window.name == 'printwindow') {
   // all the settings below would need to be edited
    $('.portletBody *').css({
        color: '#000'
    });
    $('.bookList').show();
    $('.collapse').show();
    $('.expand').hide();
    $('.noPrint').hide();
    $('.portletBody').css({
        padding: '1em',
        fontSize: '.85em'
    });
    // provide a print link
    $("h3").append('a link with an
        'javascript:window.print()' href value);
  }
}</pre>
<p>In (1) we are calling a function (2) that bind the onclick event to any link with a class of &#8216;print-window&#8217; &#8211; opening the current document in a named window. In (3) &#8211; if a window  matches the given name, then massage the elements for the print medium, hide elements that were classed as &#8216;noPrint&#8217; (formish things, whatever), and add a link with an &#8216;javascript:window.print()&#8217; href value to the DOM.</p>
<p>The end.  Lots of room for improvement, of course &#8211; the massaging would be done best by swapping the stylesheets, for example.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gonzalosilverio.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gonzalosilverio.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gonzalosilverio.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gonzalosilverio.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gonzalosilverio.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gonzalosilverio.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gonzalosilverio.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gonzalosilverio.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gonzalosilverio.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gonzalosilverio.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gonzalosilverio.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gonzalosilverio.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=42&subd=gonzalosilverio&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gonzalosilverio.wordpress.com/2008/08/22/print-previews-on-the-cheap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/53c44f824ee4db9d068fdd4f8c6de656?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gonzalosilverio</media:title>
		</media:content>
	</item>
		<item>
		<title>A better select one or many</title>
		<link>http://gonzalosilverio.wordpress.com/2008/04/07/a-better-select-one-or-many/</link>
		<comments>http://gonzalosilverio.wordpress.com/2008/04/07/a-better-select-one-or-many/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 15:14:02 +0000</pubDate>
		<dc:creator>gonzalosilverio</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[sakai]]></category>

		<guid isPermaLink="false">http://gonzalosilverio.wordpress.com/?p=23</guid>
		<description><![CDATA[&#8220;Better&#8221; is an exaggeration.  It may be that occasionally it is more appropriate.
At issue is presenting a control to the user where she can select one of many, or several of many. When the selection is fairly small (arbitrary at 7 items) &#8211; radio and checkbox groups are standard. But when the choice number [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=23&subd=gonzalosilverio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>&#8220;Better&#8221; is an exaggeration.  It may be that occasionally it is more appropriate.</p>
<p>At issue is presenting a control to the user where she can select one of many, or several of many. When the selection is fairly small (arbitrary at 7 items) &#8211; radio and checkbox groups are standard. But when the choice number goes over a certain number, there are various mechanisms to be seen, of which the most common are single select <code>&lt;select /&gt;</code> and multiple select <code>&lt;select /&gt;</code> &#8211; the problem  is how to fit large number of choices into a cramped area.</p>
<p>This came up in the context of the Sakai Course Evaluation tool,  where any number of question types need to be constructed and presented to the user. One of these questions, used in a  Cambridge course evaluation, involved a really long list of choices.</p>
<p>Occasionally you might want a control that is a bit friendlier and stylable than a &lt;select /&gt;. A colleague alerted me to: <a href="http://c82.net/posts.php?id=25" target="_blank">http://c82.net/posts.php?id=25</a></p>
<p>Here is an example from C82:</p>
<p><a href="http://gonzalosilverio.files.wordpress.com/2008/04/multi-select.jpg"><img class="alignnone size-medium wp-image-24" src="http://gonzalosilverio.files.wordpress.com/2008/04/multi-select.jpg?w=450&#038;h=154" alt="" width="450" height="154" /></a></p>
<p>Nice! The clickable area indicated by the dark green hover is created by the <code>&lt;label /&gt; </code>element, wrapping the <code>&lt;input /&gt;</code> and the text and set to display:block.  The height and width of the top container (a <code>&lt;ul /&gt;</code>) are fixed and the overflow:auto for the scroll.</p>
<p>There are three possible improvements to the excellent widget.</p>
<ol>
<li>Having the overflow and height attributes set  only if the height goes over a certain number (template or system set) &#8211; so scrollbars appear after a certain height, and groups of less than that height size automatically.</li>
<li>Having the &#8220;checked&#8221; attribute of the input  reflected in the style of the parent label</li>
<li>Having a message display of the &#8220;you have made x selections&#8221; or something like that.</li>
</ol>
<p><strong>Setting the scroll and height dynamically</strong></p>
<p>The markup looks like this:</p>
<pre>&lt;ol class="multchoiceholder"&gt;
&lt;li&gt;
&lt;label for="1"&gt;
&lt;input value="1" name="1" id="1" type="checkbox"&gt;
&lt;/label&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;label for="2"&gt;
&lt;input value="2" name="2" id="2" type="checkbox"&gt;
&lt;/label&gt;
&lt;/li&gt;
(etc)
&lt;/ol&gt;</pre>
<p>And the CSS is pretty much what the C82 article above is using, except no height is set for the container, allowing it to grow to fit the contents. To get the &#8220;intelligence&#8221; about the height I added jquery.js to the &lt;head /&gt;</p>
<pre>&lt;<span class="start-tag">script</span><span class="attribute-name"> src</span>=<span class="attribute-value">"jquery.js" </span><span class="attribute-name">language</span>=<span class="attribute-value">"JavaScript" </span><span class="attribute-name">type</span>=<span class="attribute-value">"text/javascript"</span>&gt;</pre>
<p>And the following at the end of the document:</p>
<pre>&lt;script type="text/javascript"&gt;
$(".multchoiceholder").each(function(){
if ($(this).height() &gt; 180) {
// if ($(this).children("li").size()  &gt;  9) {
$(this).addClass("oversize")
}
})
&lt;/script&gt;</pre>
<p>This essentially adds the &#8220;oversize&#8221; class to the parent container if the parent container contents go over 180 pixels in height. This class, below, sets the height and the overflow that we need. I played around with counting the &lt;li /&gt; child nodes (commented above), but since a given list item could span multiple lines the pixel height seemed best.</p>
<pre>ol.oversize{
border: 1px solid #ccc !important;
height: 12em !important;
overflow: auto !important
}</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gonzalosilverio.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gonzalosilverio.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gonzalosilverio.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gonzalosilverio.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gonzalosilverio.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gonzalosilverio.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gonzalosilverio.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gonzalosilverio.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gonzalosilverio.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gonzalosilverio.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gonzalosilverio.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gonzalosilverio.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=23&subd=gonzalosilverio&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gonzalosilverio.wordpress.com/2008/04/07/a-better-select-one-or-many/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/53c44f824ee4db9d068fdd4f8c6de656?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gonzalosilverio</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/04/multi-select.jpg?w=450" medium="image" />
	</item>
		<item>
		<title>Setting up a Sakai toolbar and styling it</title>
		<link>http://gonzalosilverio.wordpress.com/2008/03/13/setting-up-a-sakai-toolbar-and-styling-it/</link>
		<comments>http://gonzalosilverio.wordpress.com/2008/03/13/setting-up-a-sakai-toolbar-and-styling-it/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 16:16:00 +0000</pubDate>
		<dc:creator>gonzalosilverio</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[sakai]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[Toolbar]]></category>

		<guid isPermaLink="false">http://gonzalosilverio.wordpress.com/?p=7</guid>
		<description><![CDATA[See Previous post: Marking Up the Sakai ToolBar.
Setting up a toolbar will depend on the templating technology.  Velocity based tools will be using the #menu macro. JSF tools will be using either the ToolBar and ToolBarItem tags, or just the ToolBar + valid JSF tag children. Hand crafted markup should follow the same pattern:
&#60;ul [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=7&subd=gonzalosilverio&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>See <a href="http://gonzalosilverio.wordpress.com/2008/03/11/sakai-toolbar-saga/">Previous post: Marking Up the Sakai ToolBar.</a></p>
<p>Setting up a toolbar will depend on the templating technology.  Velocity based tools will be using the #menu macro. JSF tools will be using either the <a href="https://source.sakaiproject.org/svn/jsf/trunk/widgets/src/java/org/sakaiproject/jsf/renderer/ToolBarRenderer.java">ToolBar</a> and <a href="https://source.sakaiproject.org/svn/jsf/trunk/widgets/src/java/org/sakaiproject/jsf/renderer/ToolBarItemRenderer.java">ToolBarItem</a> tags, or just the <a href="https://source.sakaiproject.org/svn/jsf/trunk/widgets/src/java/org/sakaiproject/jsf/renderer/ToolBarRenderer.java">ToolBar</a> + valid JSF tag children. Hand crafted markup should follow the same pattern:</p>
<pre>&lt;ul <span style="color:#ff0000;">r<strong>ole=”menu”</strong></span> class=”navIntraTool actionToolBar”&gt;
 &lt;li <strong><span style="color:#ff0000;">role=”menuitem”</span></strong> class=”firstToolBarItem”&gt;
  &lt;span&gt;
   &lt;a href=”#”&gt;A link&lt;/a&gt;
  &lt;/span&gt;
 &lt;li <span style="color:#ff0000;"><strong>role=”menuitem”</strong></span>&gt;
  &lt;span <span style="color:#ff0000;"><strong>aria-disabled=”true”</strong></span> class=”inactive”&gt;A string&lt;/span&gt;
 &lt;/li&gt;

 &lt;li <span style="color:#ff0000;"><strong>role=”menuitem”</strong></span>&gt;
  &lt;span&gt;
   &lt;a href=”#”&gt;A link&lt;/a&gt;
  &lt;/span&gt;
 &lt;/li&gt;
&lt;/ul&gt;</pre>
<p>Styling this markup offers many possibilities since it is sstandard markup for toolbars and navigation lists.  See  the absurdly rich <a href="http://css.maxdesign.com.au/listamatic/">Listamatic </a> for options.</p>
<p>The default Sakai (as of today) rendering uses the following CSS:</p>
<pre>/*toolbar - turn into a list for 2.6 - default list render here, style in tool.css*/
.navIntraTool li{
     list-style: none;
     display: inline;
     margin:0 !important;
     padding:0 !important;
}
.navIntraTool li span a{
     margin:0 !important;
     padding:0 !important;
}
.navIntraTool li span a img{
     vertical-align: bottom;
}
.navIntraTool li span,
  .navIntraTool li span.current,
  .navIntraTool li span.inactive{
     border-left:1px solid #ccc;
     margin:0;
     padding:0 5px 0 8px
}
/*special style for the first item, namely no border-left*/
.navIntraTool li.firstToolBarItem span{
     border:none;
     margin:0;
     padding: 0 5px 0 8px;
}
/*some toolbars have input type=text, and the next
   item (fieldSibling) is a submit link*/
.navIntraTool li span.formItem,
   .navIntraTool li span.fieldSibling  {
     margin:0;
     border:none;
     padding:0;
}
.navIntraTool li span.fieldSibling {
     padding: 0 5px 0 0;
}

/*style for item that would be a link
   if you were not at the page already*/
.navIntraTool li span.current{
     color:#777;
}
.navIntraTool li span.inactive{
     color:#777;
}</pre>
<p>And this is what it looks like in th e Chat tool:</p>
<p><a title="Default Sakai Style" href="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-default1.jpg"><img src="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-default1.jpg" alt="Default Sakai Style" /></a></p>
<p>Not much to note, is so simple. The &#8220;pipe&#8221; is actually the left border of the &lt;span&gt;. The first element does not get one. The end.</p>
<p>For something a bit more different here is the CSS (am just including the selectors that have changed from above).</p>
<pre>ul.navIntraTool{
     background:#eee;
     padding: 5px !important
}.navIntraTool li span a, .navIntraTool li span a:visited,
   .navIntraTool li span a, .navIntraTool li span a:hover{
     color:#000;
     margin:0 !important;
     padding:0 !important;
     text-decoration: none !important
}

.navIntraTool li span, .navIntraTool li span.current,
   .navIntraTool li span.inactive,
   .navIntraTool li.firstToolBarItem span{
     border-top:1px solid #aaa;
     border-right:1px solid #333;
     border-bottom:1px solid #333;
     border-left:1px solid #aaa;
     margin:0;
     padding:3px 5px 3px 5px;
     background: #ddd
}
/*style for item that would be a link if you were
    not at the page already, and for inactive links*/

.navIntraTool li span.current, .navIntraTool li span.inactive{
     color:#777;
     border:1px solid #ddd;
     background: transparent;
}</pre>
<p><a title="toolbar-redmond.jpg" href="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-redmond.jpg"><img src="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-redmond.jpg" alt="toolbar-redmond.jpg" /></a></p>
<p>You can use a background image:</p>
<pre>.navIntraTool li span, .navIntraTool li span.current,
    .navIntraTool li span.inactive, .navIntraTool li.firstToolBarItem span{
       border-top:1px solid #aaa;
       border-right:1px solid #333;
       border-bottom:1px solid #333;
       border-left:1px solid #aaa;
       margin:0;
       padding:3px 5px 3px 5px;
       background: #ddd url(default/images/tb-bk1.gif) top left repeat-x
}</pre>
<p><a title="toolbar-redmond2.jpg" href="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-redmond2.jpg"><img src="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-redmond2.jpg" alt="toolbar-redmond2.jpg" /></a></p>
<p>Etc&#8230;&#8230; I think the markup now is fairly adaptable style wise. The  examples above have just used one of the available canvases &#8211; the &lt;span&gt;, a lot more rich possibilities offer themselves if you want to style the four that are available to you (ul &gt; li &gt; span &gt; a)&#8230;.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gonzalosilverio.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gonzalosilverio.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gonzalosilverio.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gonzalosilverio.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gonzalosilverio.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gonzalosilverio.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gonzalosilverio.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gonzalosilverio.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gonzalosilverio.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gonzalosilverio.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gonzalosilverio.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gonzalosilverio.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gonzalosilverio.wordpress.com&blog=3110789&post=7&subd=gonzalosilverio&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://gonzalosilverio.wordpress.com/2008/03/13/setting-up-a-sakai-toolbar-and-styling-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/53c44f824ee4db9d068fdd4f8c6de656?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gonzalosilverio</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-default1.jpg" medium="image">
			<media:title type="html">Default Sakai Style</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-redmond.jpg" medium="image">
			<media:title type="html">toolbar-redmond.jpg</media:title>
		</media:content>

		<media:content url="http://gonzalosilverio.files.wordpress.com/2008/03/toolbar-redmond2.jpg" medium="image">
			<media:title type="html">toolbar-redmond2.jpg</media:title>
		</media:content>
	</item>
	</channel>
</rss>