<?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>fatkun&#039;s blog &#187; 网页前端</title>
	<atom:link href="http://fatkun.com/category/web/feed" rel="self" type="application/rss+xml" />
	<link>http://fatkun.com</link>
	<description>又一个 WordPress 站点</description>
	<lastBuildDate>Sun, 05 Feb 2012 15:21:33 +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>Fatkun图片批量下载谷歌浏览器扩展1.0版更新了！</title>
		<link>http://fatkun.com/2012/02/batch-image-download-1-0.html</link>
		<comments>http://fatkun.com/2012/02/batch-image-download-1-0.html#comments</comments>
		<pubDate>Thu, 02 Feb 2012 16:25:28 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[Batch Image Download]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=1025</guid>
		<description><![CDATA[乱码的问题今天晚上更新，非常抱歉。将会自动更新，不需要任何操作。 已更新到服务器，可以等自动更新也可以下载下面链接立即更新。 （尝试解决乱码）1.1版插件地址：https://bath-image-download.googlecode.com/files/batch1_1.crx &#160; Fatkun图片批量下载谷歌浏览器扩展是一个从网页批量下载图片的扩展，提供方便简单的筛选功能，快速的批量下载图片。 &#160; 1.0版update:2012-02-03 完全重构了一次代码，以前的代码写的很乱，趁春节在家重写一遍代码 支持框架网页获取图片（例如猫扑） 支持直接链接是图片的文本链接图片 重新自己画了一个图标：） &#160; 下一次更新将加入一些特定代码针对特定网站取得大图片。 做这个扩展，刚开始是因为当时的扩展并不好用，自己写了一个简单的自己用着爽。现在还花时间更新这个扩展，一是想通过做学习多一点js，二是这个扩展也还不算完善。如果你喜欢这个扩展并愿意捐赠作者，给一点点鼓励也好。。。点此给我买瓶汽水（支付宝）。 &#160; 更多内容见此：http://fatkun.com/2010/09/batch-image-download.html]]></description>
			<content:encoded><![CDATA[<h3><del><span style="color: #ff0000;"><strong>乱码的问题今天晚上更新，非常抱歉。将会自动更新，不需要任何操作。</strong></span></del></h3>
<p>已更新到服务器，可以等自动更新也可以下载下面链接立即更新。</p>
<p>（尝试解决乱码）1.1版插件地址：<a href="http://bath-image-download.googlecode.com/files/batch1_0.crx" target="_blank">https://bath-image-download.googlecode.com/files/batch1_1.crx</a></p>
<p>&nbsp;</p>
<p>Fatkun图片批量下载谷歌浏览器扩展是一个从网页批量下载图片的扩展，提供方便简单的筛选功能，快速的批量下载图片。</p>
<p>&nbsp;</p>
<p><strong>1.0版<strong>update:2012-02-03</strong></strong></p>
<ol>
<li>完全重构了一次代码，以前的代码写的很乱，趁春节在家重写一遍代码</li>
<li>支持框架网页获取图片（例如猫扑）</li>
<li>支持直接链接是图片的文本链接图片</li>
<li>重新自己画了一个图标：）</li>
</ol>
<p>&nbsp;</p>
<p>下一次更新将加入一些特定代码针对特定网站取得大图片。</p>
<p>做这个扩展，刚开始是因为当时的扩展并不好用，自己写了一个简单的自己用着爽。现在还花时间更新这个扩展，一是想通过做学习多一点js，二是这个扩展也还不算完善。如果你喜欢这个扩展并愿意捐赠作者，给一点点鼓励也好。。。<a href="https://me.alipay.com/fatkun" target="_blank">点此给我买瓶汽水</a>（支付宝）。</p>
<p>&nbsp;</p>
<p>更多内容见此：<a href="http://fatkun.com/2010/09/batch-image-download.html">http://fatkun.com/2010/09/batch-image-download.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2012/02/batch-image-download-1-0.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>WP-Syntax代码编辑器插件</title>
		<link>http://fatkun.com/2012/01/wp-syntax-code-editor.html</link>
		<comments>http://fatkun.com/2012/01/wp-syntax-code-editor.html#comments</comments>
		<pubDate>Sun, 01 Jan 2012 07:54:49 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp-syntax]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=985</guid>
		<description><![CDATA[升级到WP3.3后，之前的那些插入代码按钮都没有用啦。。上去找插件没找到，自己改了一个syntanx-highlighter的。 感谢原作者leo108，http://leo108.com/ 把下面的代码保存下来，放在一个文件夹里，打包成zip文件，然后就可以在插件处上传安装了。 或者下载这个文件：http://fatkun.googlecode.com/files/wp-syntax-editor.zip &#60;?php /* Plugin Name: WP-Syntax Code Editor Plugin URI: http://fatkun.com/2012/01/wp-syntax-code-editor.html Description: 在编辑框加入一个插入wp-syntax代码的按钮，修改自syntax-highlighter-with-add-button-in-editor（原作者leo108） Version: 1.0.0 Original Author: leo108 Author URI: http://fatkun.com/ */ function codebox_init&#40;&#41;&#123; ?&#62; &#60;div id=&#34;codebox&#34; class=&#34;meta-box-sortables ui-sortable&#34; style=&#34;position: relative;&#34;&#62;&#60;div class=&#34;postbox&#34;&#62; &#60;div class=&#34;handlediv&#34; title=&#34;Click to toggle&#34;&#62;&#60;/div&#62; &#60;h3 class=&#34;hndle&#34;&#62;&#60;span&#62;WP-Syntax&#60;/span&#62;&#60;/h3&#62; &#60;div class=&#34;inside&#34;&#62; Language: &#60;select id=&#34;language&#34;&#62; &#60;option value=&#34;other&#34;&#62;Other&#60;/option&#62; &#60;option value=&#34;bash&#34;&#62;Bash&#60;/option&#62; &#60;option value=&#34;c&#34;&#62;C&#60;/option&#62; &#60;option value=&#34;cpp&#34;&#62;C++&#60;/option&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>升级到WP3.3后，之前的那些插入代码按钮都没有用啦。。上去找插件没找到，自己改了一个syntanx-highlighter的。<br />
感谢原作者leo108，http://leo108.com/</p>
<p>把下面的代码保存下来，放在一个文件夹里，打包成zip文件，然后就可以在插件处上传安装了。<br />
或者下载这个文件：<a href="http://fatkun.googlecode.com/files/wp-syntax-editor.zip" title="http://fatkun.googlecode.com/files/wp-syntax-editor.zip" target="_blank">http://fatkun.googlecode.com/files/wp-syntax-editor.zip</a></p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;"><span style="color: #339933;">&lt;?</span>php
<span style="color: #006600; font-style: italic;">/*
Plugin Name: WP-Syntax Code Editor
Plugin URI: http://fatkun.com/2012/01/wp-syntax-code-editor.html
Description: 在编辑框加入一个插入wp-syntax代码的按钮，修改自syntax-highlighter-with-add-button-in-editor（原作者leo108）
Version: 1.0.0
Original Author: leo108
Author URI: http://fatkun.com/
*/</span>
<span style="color: #003366; font-weight: bold;">function</span> codebox_init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
<span style="color: #339933;">?&gt;</span>
<span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;codebox&quot;</span> <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;meta-box-sortables ui-sortable&quot;</span> style<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;position: relative;&quot;</span><span style="color: #339933;">&gt;&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;postbox&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;handlediv&quot;</span> title<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Click to toggle&quot;</span><span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>h3 <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;hndle&quot;</span><span style="color: #339933;">&gt;&lt;</span>span<span style="color: #339933;">&gt;</span>WP<span style="color: #339933;">-</span>Syntax<span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>h3<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;inside&quot;</span><span style="color: #339933;">&gt;</span>
Language<span style="color: #339933;">:</span>
<span style="color: #339933;">&lt;</span>select id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;language&quot;</span><span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;other&quot;</span><span style="color: #339933;">&gt;</span>Other<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;bash&quot;</span><span style="color: #339933;">&gt;</span>Bash<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;c&quot;</span><span style="color: #339933;">&gt;</span>C<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;cpp&quot;</span><span style="color: #339933;">&gt;</span>C<span style="color: #339933;">++&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;csharp&quot;</span><span style="color: #339933;">&gt;</span>C#<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;css&quot;</span><span style="color: #339933;">&gt;</span>CSS<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;delphi&quot;</span><span style="color: #339933;">&gt;</span>Delphi<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;diff&quot;</span><span style="color: #339933;">&gt;</span>Diff<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;erl&quot;</span><span style="color: #339933;">&gt;</span>Erlang<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;groovy&quot;</span><span style="color: #339933;">&gt;</span>Groovy<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;html&quot;</span><span style="color: #339933;">&gt;</span>HTML<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;java&quot;</span><span style="color: #339933;">&gt;</span>Java<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;js&quot;</span><span style="color: #339933;">&gt;</span>Javascript<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;perl&quot;</span><span style="color: #339933;">&gt;</span>Perl<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;php&quot;</span><span style="color: #339933;">&gt;</span>PHP<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;ps&quot;</span><span style="color: #339933;">&gt;</span>PowerShell<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;python&quot;</span><span style="color: #339933;">&gt;</span>Python<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;ruby&quot;</span><span style="color: #339933;">&gt;</span>Ruby<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;sql&quot;</span><span style="color: #339933;">&gt;</span>SQL<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;vb&quot;</span><span style="color: #339933;">&gt;</span>VisualBasic<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;vb&quot;</span><span style="color: #339933;">&gt;</span>VB.<span style="color: #660066;">NET</span><span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
	<span style="color: #339933;">&lt;</span>option value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;xml&quot;</span><span style="color: #339933;">&gt;</span>XML<span style="color: #339933;">&lt;/</span>option<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>select<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>br<span style="color: #339933;">&gt;</span>
Code<span style="color: #339933;">:&lt;</span>br<span style="color: #339933;">&gt;&lt;</span>textarea id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;code&quot;</span> rows<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;8&quot;</span> cols<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;70&quot;</span> style<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;width:97%;&quot;</span><span style="color: #339933;">&gt;&lt;/</span>textarea<span style="color: #339933;">&gt;&lt;</span>br<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>input type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;button&quot;</span> value<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;INSERT&quot;</span> onclick<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript:settext();&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">function</span> settext<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span> 
	<span style="color: #003366; font-weight: bold;">var</span> str<span style="color: #339933;">=</span><span style="color: #3366CC;">'&lt;pre escaped=&quot;true&quot; lang=&quot;'</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> lang<span style="color: #339933;">=</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;language&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> code<span style="color: #339933;">=</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;code&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">;</span>
	str<span style="color: #339933;">=</span>str<span style="color: #339933;">+</span>lang<span style="color: #339933;">;</span>
	str<span style="color: #339933;">=</span>str<span style="color: #339933;">+</span><span style="color: #3366CC;">'&quot;&gt;'</span><span style="color: #339933;">;</span>
	str<span style="color: #339933;">=</span>str<span style="color: #339933;">+</span>filter<span style="color: #009900;">&#40;</span>code<span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;&lt;/pre&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> win <span style="color: #339933;">=</span> window.<span style="color: #660066;">dialogArguments</span> ¦¦ opener ¦¦ parent ¦¦ top<span style="color: #339933;">;</span>
	win.<span style="color: #660066;">send_to_editor</span><span style="color: #009900;">&#40;</span>str<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;code&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">value</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> filter <span style="color: #009900;">&#40;</span>str<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	str <span style="color: #339933;">=</span> str.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/&amp;/g</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&amp;amp;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	str <span style="color: #339933;">=</span> str.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/&lt;/g</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&amp;lt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	str <span style="color: #339933;">=</span> str.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/&gt;/g</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&amp;gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	str <span style="color: #339933;">=</span> str.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/'/g</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&amp;#39;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	str <span style="color: #339933;">=</span> str.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/&quot;/g</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&amp;quot;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	str <span style="color: #339933;">=</span> str.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\¦/g</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'&amp;brvbar;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">return</span> str<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;postdivrich&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;codebox&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;&lt;/</span>script<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;?</span>php
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'dbx_post_sidebar'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'codebox_init'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2012/01/wp-syntax-code-editor.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fatkun图片批量下载谷歌浏览器扩展0.5版更新了</title>
		<link>http://fatkun.com/2011/12/batch-image-download-0-5.html</link>
		<comments>http://fatkun.com/2011/12/batch-image-download-0-5.html#comments</comments>
		<pubDate>Thu, 15 Dec 2011 15:45:21 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[图片批量下载]]></category>
		<category><![CDATA[谷歌浏览器扩展]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=967</guid>
		<description><![CDATA[0.5版插件地址：https://bath-image-download.googlecode.com/files/batch0_5.crx &#160; 主要是修复性更新。。最近都感觉很累，晚上回来就不想做什么了~很久没更新博客了。 0.5版更新 修复CHROMEV15点击图片不删除的问题 图片居中显示 更多信息围观Fatkun图片批量下载谷歌浏览器扩展（Chrome Extensions）(0.5版)]]></description>
			<content:encoded><![CDATA[<p><strong>0.5版插件地址：<a href="http://bath-image-download.googlecode.com/files/batch0_5.crx" target="_blank">https://bath-image-download.googlecode.com/files/batch0_5.crx</a></strong></p>
<p>&nbsp;</p>
<p>主要是修复性更新。。最近都感觉很累，晚上回来就不想做什么了~很久没更新博客了。</p>
<p><strong>0.5版<strong>更新</strong></strong></p>
<ol>
<li>修复CHROMEV15点击图片不删除的问题</li>
<li>图片居中显示</li>
</ol>
<div>更多信息围观<a title="Fatkun图片批量下载谷歌浏览器扩展（Chrome Extensions）(0.5版)" href="http://fatkun.com/2010/09/batch-image-download.html">Fatkun图片批量下载谷歌浏览器扩展（Chrome Extensions）(0.5版)</a></div>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2011/12/batch-image-download-0-5.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>在Extjs Grid扩展一个链接按钮列</title>
		<link>http://fatkun.com/2011/10/extjs-grid-link-column.html</link>
		<comments>http://fatkun.com/2011/10/extjs-grid-link-column.html#comments</comments>
		<pubDate>Sun, 30 Oct 2011 06:19:29 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[按钮列]]></category>
		<category><![CDATA[链接按钮列]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=960</guid>
		<description><![CDATA[问题 想要在Extjs grid每一行添加一个链接或者添加一个按钮，怎么办？ 解决方法 实现方法一是用renderer，但是这个链接的方法必须调用全局的变量。 方法二就是我将要介绍的。 ActionColumn是显示一个图标按钮，而我需要一个链接按钮呢？改写ActionColumn代码即可。 代码如下，主要是修改了renderer，如果你想改成button也是可以的： /*! * Ext JS Library 3.3.1 * Copyright(c) 2006-2010 Sencha Inc. * licensing@sencha.com * http://www.sencha.com/license */ Ext.grid.LinkColumn = Ext.extend&#40;Ext.grid.Column, &#123; header: '&#38;#160;', linkIdRe: /x-link-col-(\d+)/, &#160; constructor: function&#40;cfg&#41; &#123; var me = this, items = cfg.items &#124;&#124; &#40;me.items = &#91;me&#93;&#41;, l = items.length, i, item; &#160; Ext.grid.LinkColumn.superclass.constructor.call&#40;me, cfg&#41;; [...]]]></description>
			<content:encoded><![CDATA[<h2>问题</h2>
<p>想要在Extjs grid每一行添加一个链接或者添加一个按钮，怎么办？<br />
<a href="http://fatkun.com/wp-content/uploads/2011/10/extjs.bmp"><img class="alignnone size-full wp-image-963" title="extjs" src="http://fatkun.com/wp-content/uploads/2011/10/extjs.bmp" alt="" /></a></p>
<h2>解决方法</h2>
<p>实现方法一是用renderer，但是这个链接的方法必须调用全局的变量。<br />
方法二就是我将要介绍的。</p>
<p>ActionColumn是显示一个图标按钮，而我需要一个链接按钮呢？改写ActionColumn代码即可。<br />
代码如下，主要是修改了renderer，如果你想改成button也是可以的：</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*!
 * Ext JS Library 3.3.1
 * Copyright(c) 2006-2010 Sencha Inc.
 * licensing@sencha.com
 * http://www.sencha.com/license
 */</span>
Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">LinkColumn</span> <span style="color: #339933;">=</span> Ext.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span>Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">Column</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
    header<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&amp;#160;'</span><span style="color: #339933;">,</span>
    linkIdRe<span style="color: #339933;">:</span> <span style="color: #009966; font-style: italic;">/x-link-col-(\d+)/</span><span style="color: #339933;">,</span>
&nbsp;
    constructor<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>cfg<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> me <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span>
            items <span style="color: #339933;">=</span> cfg.<span style="color: #660066;">items</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>me.<span style="color: #660066;">items</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>me<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            l <span style="color: #339933;">=</span> items.<span style="color: #660066;">length</span><span style="color: #339933;">,</span>
            i<span style="color: #339933;">,</span>
            <span style="color: #000066; font-weight: bold;">item</span><span style="color: #339933;">;</span>
&nbsp;
        Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">LinkColumn</span>.<span style="color: #660066;">superclass</span>.<span style="color: #660066;">constructor</span>.<span style="color: #660066;">call</span><span style="color: #009900;">&#40;</span>me<span style="color: #339933;">,</span> cfg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        me.<span style="color: #660066;">renderer</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>v<span style="color: #339933;">,</span> meta<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #006600; font-style: italic;">//          Allow a configured renderer to create initial value (And set the other values in the &quot;metadata&quot; argument!)</span>
            v <span style="color: #339933;">=</span> Ext.<span style="color: #660066;">isFunction</span><span style="color: #009900;">&#40;</span>cfg.<span style="color: #660066;">renderer</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> cfg.<span style="color: #660066;">renderer</span>.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span> arguments<span style="color: #009900;">&#41;</span><span style="color: #339933;">||</span><span style="color: #3366CC;">''</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #339933;">;</span>
&nbsp;
            meta.<span style="color: #660066;">css</span> <span style="color: #339933;">+=</span> <span style="color: #3366CC;">' x-link-col-cell'</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> l<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">item</span> <span style="color: #339933;">=</span> items<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                v <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&lt;a href=&quot;javascript:;&quot; class=&quot;x-link-col-icon x-link-col-'</span> <span style="color: #339933;">+</span> String<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">' '</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>Ext.<span style="color: #660066;">isFunction</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">getClass</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">getClass</span>.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">scope</span><span style="color: #339933;">||</span>this.<span style="color: #660066;">scope</span><span style="color: #339933;">||</span>this<span style="color: #339933;">,</span> arguments<span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;'</span> <span style="color: #339933;">+</span>
                    <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">tooltip</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> <span style="color: #3366CC;">' ext:qtip=&quot;'</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">tooltip</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&quot;'</span> <span style="color: #339933;">:</span> <span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&gt;'</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">text</span><span style="color: #339933;">||</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">'&lt;/a&gt;'</span><span style="color: #339933;">;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">&lt;</span> l <span style="color: #339933;">-</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> v <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000066; font-weight: bold;">return</span> v<span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    destroy<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">delete</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">items</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">delete</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">renderer</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">LinkColumn</span>.<span style="color: #660066;">superclass</span>.<span style="color: #660066;">destroy</span>.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span> arguments<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">/**
     * @private
     * Process and refire events routed from the GridView's processEvent method.
     * Also fires any configured click handlers. By default, cancels the mousedown event to prevent selection.
     * Returns the event handler's status to allow cancelling of GridView's bubbling process.
     */</span>
    processEvent <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span><span style="color: #339933;">,</span> e<span style="color: #339933;">,</span> grid<span style="color: #339933;">,</span> rowIndex<span style="color: #339933;">,</span> colIndex<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> m <span style="color: #339933;">=</span> e.<span style="color: #660066;">getTarget</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">className</span>.<span style="color: #660066;">match</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">linkIdRe</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            <span style="color: #000066; font-weight: bold;">item</span><span style="color: #339933;">,</span> fn<span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>m <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">items</span><span style="color: #009900;">&#91;</span>parseInt<span style="color: #009900;">&#40;</span>m<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">10</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'click'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #009900;">&#40;</span>fn <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">handler</span> <span style="color: #339933;">||</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">handler</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> fn.<span style="color: #660066;">call</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">scope</span><span style="color: #339933;">||</span>this.<span style="color: #660066;">scope</span><span style="color: #339933;">||</span>this<span style="color: #339933;">,</span> grid<span style="color: #339933;">,</span> rowIndex<span style="color: #339933;">,</span> colIndex<span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">item</span><span style="color: #339933;">,</span> e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000066;">name</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'mousedown'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>.<span style="color: #660066;">stopSelection</span> <span style="color: #339933;">!==</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">return</span> Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">LinkColumn</span>.<span style="color: #660066;">superclass</span>.<span style="color: #660066;">processEvent</span>.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span> arguments<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">//register ptype</span>
Ext.<span style="color: #660066;">preg</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'linkcolumn'</span><span style="color: #339933;">,</span> Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">LinkColumn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// register Column xtype</span>
Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">Column</span>.<span style="color: #660066;">types</span>.<span style="color: #660066;">linkcolumn</span> <span style="color: #339933;">=</span> Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">LinkColumn</span><span style="color: #339933;">;</span></pre></div></div>

<h2>使用方法</h2>
<p>引用扩展的文件后，在grid columns加一个xtype: &#8216;linkcolumn&#8217;的列</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">    <span style="color: #009900;">&#123;</span>
            xtype<span style="color: #339933;">:</span> <span style="color: #3366CC;">'linkcolumn'</span><span style="color: #339933;">,</span>
            header<span style="color: #339933;">:</span> <span style="color: #3366CC;">'操作'</span><span style="color: #339933;">,</span>
            width<span style="color: #339933;">:</span> <span style="color: #CC0000;">100</span><span style="color: #339933;">,</span>
            sortable<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span>
            items<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#123;</span>
                text<span style="color: #339933;">:</span> <span style="color: #3366CC;">'查看'</span><span style="color: #339933;">,</span>
                handler<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>grid<span style="color: #339933;">,</span> rowIndex<span style="color: #339933;">,</span> colIndex<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> record <span style="color: #339933;">=</span> grid.<span style="color: #660066;">store</span>.<span style="color: #660066;">getAt</span><span style="color: #009900;">&#40;</span>rowIndex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #003366; font-weight: bold;">new</span> stat_task_his_win<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                        record<span style="color: #339933;">:</span> record
                    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#93;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2011/10/extjs-grid-link-column.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Extjs combobox下拉框模糊匹配</title>
		<link>http://fatkun.com/2011/10/extjs-combobox-filter.html</link>
		<comments>http://fatkun.com/2011/10/extjs-combobox-filter.html#comments</comments>
		<pubDate>Fri, 21 Oct 2011 17:30:28 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[Combobox]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=957</guid>
		<description><![CDATA[Ext中的combobox有属性typeAhead：true 可以实现模糊匹配，但是是从开始匹配的，如果需要自定的的匹配，则需要监听beforequery方法，实现自己的匹配查询方法： // 判断某个值str是否存在store里,field是store的字段 var checkIfInStore = function&#40;str, store, field, ignoreCase&#41; &#123; var count = store.getCount&#40;&#41;; for&#40; var i = 0; i &#60; count; i++&#41; &#123; var val = store.getAt&#40;i&#41;.get&#40;field&#41;; if &#40;ignoreCase&#41; &#123; str = str.toUpperCase&#40;&#41;; val = val.toUpperCase&#40;&#41;; &#125; if &#40;str == val&#41; &#123; return true; &#125; &#125; return false; &#125;; &#160; var ComboSearchPlugin [...]]]></description>
			<content:encoded><![CDATA[<p>Ext中的combobox有属性typeAhead：true 可以实现模糊匹配，但是是从开始匹配的，如果需要自定的的匹配，则需要监听beforequery方法，实现自己的匹配查询方法：</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// 判断某个值str是否存在store里,field是store的字段</span>
<span style="color: #003366; font-weight: bold;">var</span> checkIfInStore <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>str<span style="color: #339933;">,</span> store<span style="color: #339933;">,</span> field<span style="color: #339933;">,</span> ignoreCase<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> count <span style="color: #339933;">=</span> store.<span style="color: #660066;">getCount</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> count<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> val <span style="color: #339933;">=</span> store.<span style="color: #660066;">getAt</span><span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span>field<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ignoreCase<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            str <span style="color: #339933;">=</span> str.<span style="color: #660066;">toUpperCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            val <span style="color: #339933;">=</span> val.<span style="color: #660066;">toUpperCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>str <span style="color: #339933;">==</span> val<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> ComboSearchPlugin <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
    init<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>combo<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        combo.<span style="color: #660066;">addListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'blur'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>combo<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #006600; font-style: italic;">// 如果没有写完整则设置为空</span>
            <span style="color: #003366; font-weight: bold;">var</span> isValid <span style="color: #339933;">=</span> checkIfInStore<span style="color: #009900;">&#40;</span>combo.<span style="color: #660066;">getRawValue</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> combo.<span style="color: #660066;">store</span><span style="color: #339933;">,</span> combo.<span style="color: #660066;">displayField</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>isValid<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                combo.<span style="color: #660066;">setValue</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        combo.<span style="color: #660066;">addListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'beforequery'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>qe<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> combo <span style="color: #339933;">=</span> qe.<span style="color: #660066;">combo</span><span style="color: #339933;">;</span>
            <span style="color: #003366; font-weight: bold;">var</span> q <span style="color: #339933;">=</span> qe.<span style="color: #660066;">query</span><span style="color: #339933;">;</span>
            <span style="color: #003366; font-weight: bold;">var</span> forceAll <span style="color: #339933;">=</span> qe.<span style="color: #660066;">forceAll</span><span style="color: #339933;">;</span>
            <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>forceAll <span style="color: #339933;">===</span> <span style="color: #003366; font-weight: bold;">true</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>q.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;=</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">minChars</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">lastQuery</span> <span style="color: #339933;">!==</span> q<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">lastQuery</span> <span style="color: #339933;">=</span> q<span style="color: #339933;">;</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">mode</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'local'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">selectedIndex</span> <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
                        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>forceAll<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">store</span>.<span style="color: #660066;">clearFilter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #006600; font-style: italic;">// 检索的正则</span>
                            <span style="color: #003366; font-weight: bold;">var</span> regExp <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> RegExp<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;.*&quot;</span> <span style="color: #339933;">+</span> q <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;.*&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;i&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                            <span style="color: #006600; font-style: italic;">// 执行检索</span>
                            <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">store</span>.<span style="color: #660066;">filterBy</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>record<span style="color: #339933;">,</span> id<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                <span style="color: #006600; font-style: italic;">// 得到每个record的项目名称值</span>
                                <span style="color: #003366; font-weight: bold;">var</span> text <span style="color: #339933;">=</span> record.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span>combo.<span style="color: #660066;">displayField</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                                <span style="color: #000066; font-weight: bold;">return</span> regExp.<span style="color: #660066;">test</span><span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">onLoad</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">store</span>.<span style="color: #660066;">baseParams</span><span style="color: #009900;">&#91;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">queryParam</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> q<span style="color: #339933;">;</span>
                        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">store</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                            params<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">getParams</span><span style="color: #009900;">&#40;</span>q<span style="color: #009900;">&#41;</span>
                        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">expand</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">selectedIndex</span> <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #339933;">;</span>
                    <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">onLoad</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>参考文章：http://weibaojun.iteye.com/blog/1098731<br />
原文我试了一下有问题，第一次输入时会不显示结果，主要差别在onLoad上</p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2011/10/extjs-combobox-filter.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>下载新浪音乐</title>
		<link>http://fatkun.com/2011/09/download-sina-music.html</link>
		<comments>http://fatkun.com/2011/09/download-sina-music.html#comments</comments>
		<pubDate>Mon, 12 Sep 2011 07:48:21 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[下载地址]]></category>
		<category><![CDATA[新浪]]></category>
		<category><![CDATA[新浪音乐]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=945</guid>
		<description><![CDATA[新浪音乐没有直接下载音乐的地方。。听到一首好歌想要下载怎么办呢··找出它的下载地址 只要你得到新浪音乐的短地址，就行啦。（你可以分享一条歌曲获得短地址） http://fatkun.com/sina.php 这样就可以找出新浪音乐的下载地址，从此爽歪歪.. &#160;]]></description>
			<content:encoded><![CDATA[<p>新浪音乐没有直接下载音乐的地方。。听到一首好歌想要下载怎么办呢··找出它的下载地址</p>
<p>只要你得到新浪音乐的短地址，就行啦。（你可以分享一条歌曲获得短地址）</p>
<p><a title="http://fatkun.com/sina.php" href="http://fatkun.com/sina.php" target="_blank">http://fatkun.com/sina.php</a></p>
<p>这样就可以找出新浪音乐的下载地址，从此爽歪歪..</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2011/09/download-sina-music.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>更换新主题</title>
		<link>http://fatkun.com/2011/08/change-theme.html</link>
		<comments>http://fatkun.com/2011/08/change-theme.html#comments</comments>
		<pubDate>Sat, 20 Aug 2011 18:39:25 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[主题]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=933</guid>
		<description><![CDATA[把Zindi主题改了一下，主要是改了页面宽度，文字大小。。我还是喜欢14px的文字，看起来容易阅读。 悲剧的是发现评论不是嵌套的···o(╯□╰)o这个还没改。。 嵌套评论是必须的··怎么能木有呢···迟点试着改一下。。]]></description>
			<content:encoded><![CDATA[<p>把<a title="Fadonet WordPress Themes: Zindi" href="http://www.fadonet.net/2008/11/08/wordpress-theme-zindi/">Zindi</a>主题改了一下，主要是改了页面宽度，文字大小。。我还是喜欢14px的文字，看起来容易阅读。</p>
<p>悲剧的是发现评论不是嵌套的···o(╯□╰)o这个还没改。。</p>
<p>嵌套评论是必须的··怎么能木有呢···迟点试着改一下。。</p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2011/08/change-theme.html/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Extjs FormPanel.getForm().getValues()对下拉框(Combobox)取值的问题</title>
		<link>http://fatkun.com/2011/06/formpanel-get-combobox-value.html</link>
		<comments>http://fatkun.com/2011/06/formpanel-get-combobox-value.html#comments</comments>
		<pubDate>Mon, 27 Jun 2011 05:36:01 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[Combobox]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[getValues]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=922</guid>
		<description><![CDATA[遇到的问题 我使用的是Extjs3.3 在FormPanel中，可以通过 FormPanel.getForm().getValues()取得这个FormPanel下的所有值。 但是，在取下拉框值时，得到的是显示名称（displayValue），而不是真正的值（value） 解决方法 原因是没有在下拉框指定hiddenName，指定hiddenName 和 name的值一样就可以了。 2011-8-30update : 用FormPanel.getForm().getFieldValues()可以不用设置hiddenName。]]></description>
			<content:encoded><![CDATA[<h2>遇到的问题</h2>
<p>我使用的是Extjs3.3<br />
在FormPanel中，可以通过 FormPanel.getForm().getValues()取得这个FormPanel下的所有值。<br />
但是，在取下拉框值时，得到的是显示名称（displayValue），而不是真正的值（value）</p>
<h2>解决方法</h2>
<p>原因是没有在下拉框指定hiddenName，指定hiddenName 和 name的值一样就可以了。</p>
<p><span style="color: #ff0000;">2011-8-30update : 用FormPanel.getForm().getFieldValues()可以不用设置hiddenName。</span></p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2011/06/formpanel-get-combobox-value.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Extjs3 EditorGridPanel的beforeedit事件参数</title>
		<link>http://fatkun.com/2011/06/extjs-editorgridpanel-beforeedit.html</link>
		<comments>http://fatkun.com/2011/06/extjs-editorgridpanel-beforeedit.html#comments</comments>
		<pubDate>Thu, 02 Jun 2011 02:21:37 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[beforeedit]]></category>
		<category><![CDATA[EditorGridPanel]]></category>
		<category><![CDATA[extjs]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=918</guid>
		<description><![CDATA[beforeedit : ( Object e ) 只有一个事件(edit event)参数，但这个参数内容很丰富，可以满足很多需求。 参数分别如下： grid &#8211; 表格本身 record &#8211; 你要编辑的那一行记录 field &#8211; 你编辑的列名 value &#8211; 你编辑的值 row &#8211; 行号 column &#8211; 列号 cancel &#8211; 设这个为true或者return false可以取消编辑（不显示那个编辑框）]]></description>
			<content:encoded><![CDATA[<h2>beforeedit : ( Object e )</h2>
<p>只有一个事件(edit event)参数，但这个参数内容很丰富，可以满足很多需求。<br />
参数分别如下：<br />
grid &#8211; 表格本身<br />
record &#8211; 你要编辑的那一行记录<br />
field &#8211; 你编辑的列名<br />
value &#8211; 你编辑的值<br />
row &#8211; 行号<br />
column &#8211; 列号<br />
cancel &#8211; 设这个为true或者return false可以取消编辑（不显示那个编辑框）</p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2011/06/extjs-editorgridpanel-beforeedit.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Extjs renderer参数</title>
		<link>http://fatkun.com/2011/05/extjs-renderer.html</link>
		<comments>http://fatkun.com/2011/05/extjs-renderer.html#comments</comments>
		<pubDate>Tue, 31 May 2011 09:05:24 +0000</pubDate>
		<dc:creator>fatkun</dc:creator>
				<category><![CDATA[网页前端]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[renderer]]></category>

		<guid isPermaLink="false">http://fatkun.com/?p=916</guid>
		<description><![CDATA[function myRenderer(value, cellmeta, record, rowIndex, columnIndex, store) { [...] } 看上面的myRenderer，依次最多有6个参数 1 value： 当前单元格的值 2 cellmeta里保存的是cellId单元格id，id不知道是干啥的，似乎是列号，css是这个单元格的css样式。（没看懂？？？） 3 record：这行的所有数据，可以通过record.data["id"]获得本行中“id”字段的值。 4 rowIndex：行号，不是从头往下数的意思，而是计算了分页以后的结果。 5 columnIndex：列号 6 store：整个grid关联的数据 来源：http://blog.sina.com.cn/s/blog_5140a6a50100bfat.html 关于该store的访问，可以看http://blog.chinaunix.net/u1/37472/showart_2190023.html]]></description>
			<content:encoded><![CDATA[<p>function myRenderer(value, cellmeta, record, rowIndex, columnIndex, store) {<br />
[...]<br />
}<br />
看上面的myRenderer，依次最多有6个参数<br />
1 value： 当前单元格的值<br />
2 cellmeta里保存的是cellId单元格id，id不知道是干啥的，似乎是列号，css是这个单元格的css样式。（没看懂？？？）<br />
3 record：这行的所有数据，可以通过record.data["id"]获得本行中“id”字段的值。<br />
4 rowIndex：行号，不是从头往下数的意思，而是计算了分页以后的结果。<br />
5 columnIndex：列号<br />
6 store：整个grid关联的数据</p>
<p>来源：<a href="http://blog.sina.com.cn/s/blog_5140a6a50100bfat.html">http://blog.sina.com.cn/s/blog_5140a6a50100bfat.html</a><br />
关于该store的访问，可以看<a href="http://blog.chinaunix.net/u1/37472/showart_2190023.html">http://blog.chinaunix.net/u1/37472/showart_2190023.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://fatkun.com/2011/05/extjs-renderer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

