<?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>Programatori.info &#187; Google</title>
	<atom:link href="http://programatori.info/blog/category/google/feed/" rel="self" type="application/rss+xml" />
	<link>http://programatori.info/blog</link>
	<description>web programming blog</description>
	<lastBuildDate>Sun, 10 Jul 2011 07:47:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How Gmail’s Drag and Drop from the Desktop Works</title>
		<link>http://programatori.info/blog/2010/09/how-gmail%e2%80%99s-drag-and-drop-from-the-desktop-works/</link>
		<comments>http://programatori.info/blog/2010/09/how-gmail%e2%80%99s-drag-and-drop-from-the-desktop-works/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 11:00:06 +0000</pubDate>
		<dc:creator>Web Design CLuj</dc:creator>
				<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[WEB 2.0]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=10242</guid>
		<description><![CDATA[The CSS Ninja details how Gmail's drag and drop from the desktop works; when you drag a file from the desktop into Gmail the file will automatically start uploading.
The CSS Ninja recreated the code in a demo (source code [zip]).
The code works in Firefox and Chrome. On Firefox the File API is used (detailed in [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://ajaxian.com/wp-content/images/cssninja.gif"><img class="aligncenter size-full wp-image-10243" title="cssninja" src="http://ajaxian.com/wp-content/images/cssninja.gif" alt="" width="140" height="144" /></a></p>
<p style="text-align: left;"><a href="http://www.thecssninja.com/javascript/gmail-upload">The CSS Ninja details</a> how Gmail's drag and drop from the desktop works; when you drag a file from the desktop into Gmail the file will automatically start uploading.</p>
<p>The CSS Ninja recreated the code in a <a href="http://www.thecssninja.com/demo/gmail_upload/">demo</a> (<a href="http://www.thecssninja.com/demo/gmail_upload/gmail_upload.zip">source code [zip]</a>).</p>
<p>The code works in Firefox and Chrome. On Firefox the File API is used (<a href="http://www.thecssninja.com/javascript/fileapi">detailed in another blog post</a>) while on Chrome a different API is used.</p>
<p>How does Chrome work?</p>
<blockquote><p>Using a bit of CSS trickery we can create the illusion of having File API support and still allow users to drag and drop files from the desktop into Gmail. I accomplish this by having the drop zone, which becomes visible on a dragenter event, contain an invisible file input with a 100% width and height of the drop zone area. The file input also has the attribute multiple on it allowing a user to drop multiple files.</p></blockquote>
<div class="igBar"><a href="javascript:showCodeTxt('html-24');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">HTML:</span>
<div id="html-24">
<div class="html">
<span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"drop"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><br />
<span style="color: #009900;"><a href="http://december.com/html/4/element/h1.html"><span style="color: #000000; font-weight: bold;">&lt;h1&gt;</span></a></span>Drop files here<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/h1&gt;</span></span><br />
To add them as attachments</p>
<p><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"filesUpload"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"file"</span> /<span style="color: #000000; font-weight: bold;">&gt;</span></a></span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span><br />
&nbsp;</div>
</div>
</div>
<p>The drop zone is hidden by default until a dragenter event happens on the BODY tag:</p>
<div class="igBar"><a href="javascript:showCodeTxt('css-25');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">CSS:</span>
<div id="css-25">
<div class="css">
<span style="color: #cc00cc;">#drop <span style="color:#006600; font-weight:bold;">&#123;</span></span><br />
<span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">relative</span>;<br />
<span style="color:#006600; font-weight:bold;">&#125;</span><br />
#drop input <span style="color:#006600; font-weight:bold;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">position</span>: <span style="color: #993333;">absolute</span>;<br />
<span style="color: #000000; font-weight: bold;">width</span>: <span style="color:#800000;">100</span>%;<br />
<span style="color: #000000; font-weight: bold;">height</span>: <span style="color:#800000;">100</span>%;<br />
<span style="color: #000000; font-weight: bold;">top</span>: <span style="color:#800000;">0</span>;<br />
<span style="color: #000000; font-weight: bold;">left</span>: <span style="color:#800000;">0</span>;<br />
opacity: <span style="color:#800000;">0</span>;<br />
<span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp;</div>
</div>
</div>
<p>When the drop input is activated a change event is fired and the files can be enumerated:</p>
<div class="igBar"><a href="javascript:showCodeTxt('javascript-26');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">JAVASCRIPT:</span>
<div id="javascript-26">
<div class="javascript">
dropArea.<span style="color: #006600;">addEventListener</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #3366CC;">"change"</span>, TCNDDU.<span style="color: #006600;">handleDrop</span>, <span style="color: #003366; font-weight: bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</p>
<p>TCNDDU.<span style="color: #006600;">handleDrop</span> = <span style="color: #003366; font-weight: bold;">function</span> <span style="color:#006600; font-weight:bold;">&#40;</span>evt<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> files = evt.<span style="color: #006600;">target</span>.<span style="color: #006600;">files</span>;<br />
dropArea.<span style="color: #006600;">style</span>.<span style="color: #006600;">display</span> = <span style="color: #3366CC;">"none"</span>;<br />
<span style="color: #000066; font-weight: bold;">for</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i = <span style="color:#800000;">0</span>, len = files.<span style="color: #006600;">length</span>; i &amp;lt;len; i++<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span><br />
<span style="color: #009900; font-style: italic;">// iterate over file(s) and process them for uploading</span><br />
<span style="color:#006600; font-weight:bold;">&#125;</span><br />
<span style="color:#006600; font-weight:bold;">&#125;</span>;<br />
&nbsp;</div>
</div>
</div>
<div>The actual uploading is handled by XHR2:</p>
<blockquote><p>Using XHR2 and the <a href="http://www.w3.org/TR/2009/WD-XMLHttpRequest2-20090820/#the-upload-attribute">upload attribute</a> to attach progress events so we can do a real progress bar that indicates to the user how much the file has uploaded.</p></blockquote>
<div><a href="http://www.thecssninja.com/javascript/gmail-upload">Read the full blog post</a>.</div>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=Jd2jQLBpzgY:TkJcS_5CPLo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=Jd2jQLBpzgY:TkJcS_5CPLo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=Jd2jQLBpzgY:TkJcS_5CPLo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=Jd2jQLBpzgY:TkJcS_5CPLo:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://programatori.info/blog/2010/09/how-gmail%e2%80%99s-drag-and-drop-from-the-desktop-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chrome Frame is out of Beta!</title>
		<link>http://programatori.info/blog/2010/09/chrome-frame-is-out-of-beta/</link>
		<comments>http://programatori.info/blog/2010/09/chrome-frame-is-out-of-beta/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 19:47:32 +0000</pubDate>
		<dc:creator>Web Design CLuj</dc:creator>
				<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Chrome Frame]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[WEB 2.0]]></category>

		<guid isPermaLink="false">http://ajaxian.com/?p=10361</guid>
		<description><![CDATA[Big news: Chrome Frame is now stable and out of beta!
Today, we’re very happy to take the Beta tag off of Google Chrome Frame and promote it to the Stable channel. This stable channel release provides our most polished version of Google Chrome Frame to date, allowing users to access modern web technologies like HTML5 [...]]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/WP3N1bgjiek?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/WP3N1bgjiek?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>Big news: <a href="http://blog.chromium.org/2010/09/google-chrome-frame-stable-and-speedy.html">Chrome Frame is now stable and out of beta</a>!</p>
<blockquote><p>Today, we’re very happy to take the Beta tag off of Google Chrome Frame and promote it to the Stable channel. This stable channel release provides our most polished version of Google Chrome Frame to date, allowing users to access modern web technologies like HTML5 on legacy browsers. You now can <a href="http://www.google.com/chromeframe/">download the stable version of Google Chrome Frame</a> and users of the Beta will be automatically updated to it in the days ahead. If you’re an IT administrator, we’ve also posted an <a href="http://www.google.com/chromeframe/eula.html?msi=true">MSI installer</a> for deploying Google Chrome Frame in your network.</p></blockquote>
<p>Chrome Frame is now much faster and stable. It's <a href="http://www.chromium.org/developers/how-tos/chrome-frame-getting-started">extremely simple</a> to have a site use Chrome Frame:</p>
<div class="igBar"><a href="javascript:showCodeTxt('html-28');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">HTML:</span>
<div id="html-28">
<div class="html">
<span style="color: #009900;"><a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">&lt;meta</span></a> <span style="color: #000066;">http-equiv</span>=<span style="color: #ff0000;">"X-UA-Compatible"</span> <span style="color: #000066;">content</span>=<span style="color: #ff0000;">"chrome=1"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span><br />
&nbsp;</div>
</div>
</div>
<p>For the next step the Chrome Frame team is focusing on making start-up speed even faster and removing the need for administrator rights when installing the plug-in.</p>
<p>Congrats to the Chrome Frame team!</p>
<p>[<em>Disclosure: Alex Russell, the chipper-looking fellow in the video, and I have worked together at Google and on Dojo before.</em>]</meta></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/ajaxian?a=in8AgKK_gs8:0IAB_OZcunE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=in8AgKK_gs8:0IAB_OZcunE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/ajaxian?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/ajaxian?a=in8AgKK_gs8:0IAB_OZcunE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/ajaxian?i=in8AgKK_gs8:0IAB_OZcunE:D7DqB2pKExk" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://programatori.info/blog/2010/09/chrome-frame-is-out-of-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

