<?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/"
	>

<channel>
	<title>Sunfox &#187; ui</title>
	<atom:link href="http://sunfox.org/blog/tags/ui/feed/" rel="self" type="application/rss+xml" />
	<link>http://sunfox.org</link>
	<description>Le blogue de Sunny Ripert</description>
	<lastBuildDate>Tue, 10 Apr 2012 14:10:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Rédécouvrons cursor:progress</title>
		<link>http://sunfox.org/blog/2008/04/23/css-cursor-progress/</link>
		<comments>http://sunfox.org/blog/2008/04/23/css-cursor-progress/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 09:30:20 +0000</pubDate>
		<dc:creator>Sunny</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://sunfox.org/?p=914</guid>
		<description><![CDATA[L&#8217;interface utilisateur passe aussi par la forme du curseur. Peu utilisée en CSS, la propriété cursor regorge pourtant de valeurs dont on peut se servir pour aider l&#8217;utilisateur dans une application web (wait progress help default pointer text vertical-text crosshair move -moz-grab -moz-grabbing -moz-copy -moz-alias -moz-zoom-in -moz-zoom-out -moz-cell -moz-context-menu not-allowed no-drop nw-resize n-resize se-resize sw-resize [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://sunfox.org/blog/wp-content/uploads/2008/04/wait.gif" alt="" width="150" height="150" style="float:right;cursor:wait" /></p>
<p>L&#8217;interface utilisateur passe aussi par la forme du curseur. Peu utilisée en <abbr>CSS</abbr>, la propriété <tt>cursor</tt> regorge pourtant de valeurs dont on peut se servir pour aider l&#8217;utilisateur dans une application web (<tt style="cursor:wait">wait</tt> <tt style="cursor:progress">progress</tt> <tt style="cursor:help">help</tt> <tt style="cursor:default">default</tt> <tt style="cursor:pointer">pointer</tt> <tt style="cursor:text">text</tt> <tt style="cursor:vertical-text">vertical-text</tt> <tt style="cursor:crosshair">crosshair</tt> <tt style="cursor:move">move</tt> <tt style="cursor:-moz-grab">-moz-grab</tt> <tt style="cursor:-moz-grabbing">-moz-grabbing</tt> <tt style="cursor:-moz-copy">-moz-copy</tt> <tt style="cursor:-moz-alias">-moz-alias</tt> <tt style="cursor:-moz-zoom-in">-moz-zoom-in</tt> <tt style="cursor:-moz-zoom-out">-moz-zoom-out</tt> <tt style="cursor:-moz-cell">-moz-cell</tt> <tt style="cursor:-moz-context-menu">-moz-context-menu</tt> <tt style="cursor:not-allowed">not-allowed</tt> <tt style="cursor:no-drop">no-drop</tt> <tt style="cursor:nw-resize">nw-resize</tt> <tt style="cursor:n-resize">n-resize</tt> <tt style="cursor:se-resize">se-resize</tt> <tt style="cursor:sw-resize">sw-resize</tt> <tt style="cursor:s-resize">s-resize</tt> <tt style="cursor:e-resize">e-resize</tt> <tt style="cursor:w-resize">w-resize</tt> <tt style="cursor:ne-resize">ne-resize</tt> <tt style="cursor:col-resize">col-resize</tt> <tt style="cursor:row-resize">row-resize</tt>). </p>
<p>Par exemple, pour indiquer qu&#8217;un chargement a lieu <i lang="la">via</i> Ajax, plutôt que d&#8217;afficher une image de <i lang="en">loader</i> animée, un style <abbr>CSS</abbr> peu suffire&nbsp;:</p>
<pre class="css"><code>.loading, .loading a, .loading input, .loading textarea {
	cursor: progress;
}</code></pre>
<p>Ne reste plus qu&#8217;à appliquer la classe <tt lang="en">loading</tt> au <tt>body</tt> dès que la page fait un appel Ajax ou un long traitement.</p>
<p>Si vous utilisez <a href="http://prototypejs.org" title="Librairie JavaScript Prototype" hreflang="en" lang="en">Prototype</a> ajoutez ces quelques lignes pour que la classe soit appliquée automatiquement tant qu&#8217;un appel Ajax a lieu&nbsp;:</p>
<pre class="js"><code>Ajax.Responders.register({
  onCreate: function() {
    $$('body').first().addClassName('loading');
  },
  onComplete: function() {
    if (Ajax.activeRequestCount == 0)
      $$('body').first().removeClassName('loading');
  }
});</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://sunfox.org/blog/2008/04/23/css-cursor-progress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

