<?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>Saki's Blog &#187; pattern</title>
	<atom:link href="http://blog.extjs.eu/tag/pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.extjs.eu</link>
	<description>For good of all productive developers</description>
	<lastBuildDate>Sun, 21 Nov 2010 01:36:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Keeping modified records of EditorGridPanel while paging</title>
		<link>http://blog.extjs.eu/patterns/code-patterns/keeping-modified-records-of-editorgridpanel-while-paging/</link>
		<comments>http://blog.extjs.eu/patterns/code-patterns/keeping-modified-records-of-editorgridpanel-while-paging/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 08:59:44 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[Code Patterns]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[Know-how]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=498</guid>
		<description><![CDATA[<br/>If you modify records of an editable grid with paging and if you then page-out, your changes are lost. Well, they are not lost in fact unless you have set pruneModifiedRecords:true on the strore. The modifications are still available so we just need to apply them. Here is the code fragment that does it:

var grid [...]]]></description>
			<content:encoded><![CDATA[<br/><p>If you modify records of an editable grid with paging and if you then page-out, your changes are lost. Well, they are not lost in fact unless you have set <code><a target="_blank" href="http://www.extjs.com/deploy/dev/docs/?class=Ext.data.Store&#038;member=pruneModifiedRecords">pruneModifiedRecords:true</a></code> on the strore. The modifications are still available so we just need to apply them. Here is the code fragment that does it:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> grid <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Ext.<span style="color: #660066;">grid</span>.<span style="color: #660066;">EditorGridPanel</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
    store<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">new</span> Ext.<span style="color: #660066;">data</span>.<span style="color: #660066;">Store</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
         listeners<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>
            load<span style="color: #339933;">:</span><span style="color: #009900;">&#123;</span>scope<span style="color: #339933;">:</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span> fn<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>store<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                <span style="color: #006600; font-style: italic;">// loop through modified records</span>
                <span style="color: #003366; font-weight: bold;">var</span> modified <span style="color: #339933;">=</span> store.<span style="color: #660066;">getModifiedRecords</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> modified.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
                    <span style="color: #006600; font-style: italic;">// see if we have a record with same id </span>
                    <span style="color: #006600; font-style: italic;">// and apply changes if yes</span>
                    <span style="color: #003366; font-weight: bold;">var</span> r <span style="color: #339933;">=</span> store.<span style="color: #660066;">getById</span><span style="color: #009900;">&#40;</span>modified<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">id</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>r<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #003366; font-weight: bold;">var</span> changes <span style="color: #339933;">=</span> modified<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">getChanges</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>p <span style="color: #000066; font-weight: bold;">in</span> changes<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>changes.<span style="color: #660066;">hasOwnProperty</span><span style="color: #009900;">&#40;</span>p<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                r.<span style="color: #660066;">set</span><span style="color: #009900;">&#40;</span>p<span style="color: #339933;">,</span> changes<span style="color: #009900;">&#91;</span>p<span style="color: #009900;">&#93;</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: #006600; font-style: italic;">// eo changes loop</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo modified loop</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo load listener</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo listeners</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// rest of store configuration</span>
&nbsp;
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// rest of grid configuration</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// eo grid</span></pre></div></div>

<p><b>pruneModifiedRecords must be false (the default) for this to work.</b></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/code-patterns/keeping-modified-records-of-editorgridpanel-while-paging/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>CSS File Pattern</title>
		<link>http://blog.extjs.eu/patterns/file-patters/css-file-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/file-patters/css-file-pattern/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 03:28:40 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[File Patters]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=18</guid>
		<description><![CDATA[<br/>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/** vim: ts=4:sw=4:nu:fdc=4:nospell
 *
 * A CSS File
 *
 * @author    Ing.Jozef Sakáloš
 * @copyright (c) 2008, by Ing. Jozef Sakáloš
 * @date      5. April 2008
 * @version   $Id$
 *
 * @license A CSS File is licensed under the terms of the Open Source
 * [...]]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/** vim: ts=4:sw=4:nu:fdc=4:nospell
 *
 * A CSS File
 *
 * @author    Ing.Jozef Sakáloš
 * @copyright (c) 2008, by Ing. Jozef Sakáloš
 * @date      5. April 2008
 * @version   $Id$
 *
 * @license A CSS File is licensed under the terms of the Open Source
 * LGPL 3.0 license. Commercial use is permitted to the extent that the 
 * code/component(s) do NOT become part of another Open Source or Commercially
 * licensed development library or toolkit without explicit permission.
 * 
 * License details: http://www.gnu.org/licenses/lgpl.html
 */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* eof */</span></pre></td></tr></table></div>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><div class="paypal-donations"><input type="hidden" name="cmd" value="_donations" /><input type="hidden" name="business" value="js02@aariadne.com" /><input type="hidden" name="item_number" value="Blog Donation" /><input type="hidden" name="currency_code" value="EUR" /><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" name="submit" alt="PayPal - The safer, easier way to pay online." /><img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /></div></form>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/file-patters/css-file-pattern/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Inline Anonymous Funcion Pattern</title>
		<link>http://blog.extjs.eu/patterns/code-patterns/inline-anonymous-funcion-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/code-patterns/inline-anonymous-funcion-pattern/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 11:41:09 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[Code Patterns]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=16</guid>
		<description><![CDATA[<br/>
1
2
3
4
5
6
var msg = &#34;From inline function&#34;;
var result = &#40;function&#40;m&#41; &#123;
    alert&#40;m&#41;;
    return &#34;Result of inline function&#34;;
&#125;&#40;msg&#41;&#41;;
alert&#40;result&#41;;

]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> msg <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;From inline function&quot;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">var</span> result <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>m<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>m<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">&quot;Result of inline function&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span>msg<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>result<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/code-patterns/inline-anonymous-funcion-pattern/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JavaScript Extension File Pattern</title>
		<link>http://blog.extjs.eu/patterns/file-patters/javascript-extension-file-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/file-patters/javascript-extension-file-pattern/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 02:13:35 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[File Patters]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=15</guid>
		<description><![CDATA[<br/>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// vim: ts=4:sw=4:nu:fdc=4:nospell
/*global Ext, AnExtension */
/**
 * @class AnExtension
 * @extends Ext.Panel
 *
 * AnExtension description
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2010, by Ing. Jozef Sakáloš
 * @date      &#60;ul&#62;
 * &#60;li&#62;11. March 2010&#60;/li&#62;
 * &#60;/ul&#62;
 * @version   1.0
 * @revision  [...]]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// vim: ts=4:sw=4:nu:fdc=4:nospell</span>
<span style="color: #009966; font-style: italic;">/*global Ext, AnExtension */</span>
<span style="color: #006600; font-style: italic;">/**
 * @class AnExtension
 * @extends Ext.Panel
 *
 * AnExtension description
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2010, by Ing. Jozef Sakáloš
 * @date      &lt;ul&gt;
 * &lt;li&gt;11. March 2010&lt;/li&gt;
 * &lt;/ul&gt;
 * @version   1.0
 * @revision  $Id$
 *
 * @license AnExtension.js is released under the 
 * &lt;a target=&quot;_blank&quot; href=&quot;http://www.gnu.org/licenses/gpl.html&quot;&gt;GNU GPL 3.0&lt;/a&gt;
 * license. It’s free for use in GPL and GPL compatible open source software, 
 * but if you want to use the component in a commercial software (closed source),
 * you have to get a commercial license.
 */</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// create namespace</span>
Ext.<span style="color: #660066;">ns</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'AnExtension'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/**
 * Creates new AnExtension
 * @constructor
 * @param {Object} config A config object
 */</span>
AnExtension <span style="color: #339933;">=</span> Ext.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span>Ext.<span style="color: #660066;">Panel</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// default config (it can be changed while instantiating)</span>
    border<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">false</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// {{{</span>
    <span style="color: #006600; font-style: italic;">// uncomment constructor if you need it, e.g. if you need listeners</span>
<span style="color: #006600; font-style: italic;">//    ,constructor:function(config) {</span>
<span style="color: #006600; font-style: italic;">//        // parent constructor call pre-processing - configure listeners here</span>
<span style="color: #006600; font-style: italic;">//        config = config || {};</span>
<span style="color: #006600; font-style: italic;">//        config.listeners = config.listeners || {};</span>
<span style="color: #006600; font-style: italic;">//        Ext.applyIf(config.listeners, {</span>
<span style="color: #006600; font-style: italic;">//            // add listeners config here</span>
<span style="color: #006600; font-style: italic;">//        });</span>
<span style="color: #006600; font-style: italic;">//</span>
<span style="color: #006600; font-style: italic;">//        // call parent constructor</span>
<span style="color: #006600; font-style: italic;">//        AnExtension.superclass.constructor.call(this, config);</span>
<span style="color: #006600; font-style: italic;">//</span>
<span style="color: #006600; font-style: italic;">//        // parent constructor call post-processing</span>
<span style="color: #006600; font-style: italic;">//</span>
<span style="color: #006600; font-style: italic;">//    } // eo function constructor</span>
    <span style="color: #006600; font-style: italic;">// }}}</span>
    <span style="color: #006600; font-style: italic;">// {{{</span>
    <span style="color: #339933;">,</span>initComponent<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>
&nbsp;
        <span style="color: #006600; font-style: italic;">// hard coded config (it cannot be changed while instantiating)</span>
        <span style="color: #006600; font-style: italic;">// {{{</span>
        <span style="color: #003366; font-weight: bold;">var</span> config <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// eo config object</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// apply config</span>
        Ext.<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> Ext.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">initialConfig</span><span style="color: #339933;">,</span> config<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #006600; font-style: italic;">// }}}</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// call parent</span>
        AnExtension.<span style="color: #660066;">superclass</span>.<span style="color: #660066;">initComponent</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>
&nbsp;
        <span style="color: #006600; font-style: italic;">// parent call post-processing, e.g. install event handlers</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function initComponent</span>
    <span style="color: #006600; font-style: italic;">// }}}</span>
    <span style="color: #006600; font-style: italic;">// {{{</span>
    <span style="color: #339933;">,</span>afterRender<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>
&nbsp;
        <span style="color: #006600; font-style: italic;">// parent call pre-processing</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// call parent</span>
        AnExtension.<span style="color: #660066;">superclass</span>.<span style="color: #660066;">afterRender</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>
&nbsp;
        <span style="color: #006600; font-style: italic;">// parent call post-processing, e.g. install event handlers on rendered components</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function afterRender</span>
    <span style="color: #006600; font-style: italic;">// }}}</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// any other added/overriden methods</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// eo extend</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// register xtype</span>
Ext.<span style="color: #660066;">reg</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'anextension'</span><span style="color: #339933;">,</span> AnExtension<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #006600; font-style: italic;">// eof</span></pre></td></tr></table></div>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><div class="paypal-donations"><input type="hidden" name="cmd" value="_donations" /><input type="hidden" name="business" value="js02@aariadne.com" /><input type="hidden" name="item_number" value="Blog Donation" /><input type="hidden" name="currency_code" value="EUR" /><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" name="submit" alt="PayPal - The safer, easier way to pay online." /><img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /></div></form>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/file-patters/javascript-extension-file-pattern/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JavaScript Plugin File Pattern</title>
		<link>http://blog.extjs.eu/patterns/file-patters/javascript-plugin-file-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/file-patters/javascript-plugin-file-pattern/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 01:37:23 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[File Patters]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=13</guid>
		<description><![CDATA[<br/>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// vim: sw=4:ts=4:nu:nospell:fdc=4
/**
 * A Plugin
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2008, by Ing. Jozef Sakáloš
 * @date      3. April 2008
 * @version   $Id$
 *
 * @license plugin.js is licensed under the terms of the Open Source
 * LGPL 3.0 license. [...]]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// vim: sw=4:ts=4:nu:nospell:fdc=4</span>
<span style="color: #006600; font-style: italic;">/**
 * A Plugin
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2008, by Ing. Jozef Sakáloš
 * @date      3. April 2008
 * @version   $Id$
 *
 * @license plugin.js is licensed under the terms of the Open Source
 * LGPL 3.0 license. Commercial use is permitted to the extent that the 
 * code/component(s) do NOT become part of another Open Source or Commercially
 * licensed development library or toolkit without explicit permission.
 * 
 * License details: http://www.gnu.org/licenses/lgpl.html
 */</span>
&nbsp;
<span style="color: #009966; font-style: italic;">/*global Ext */</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/**
 * @class APlugin
 * @extends Ext.util.Observable
 *
 * Creates new APlugin object
 * @constructor
 * @param {Object} config The config object
 */</span>
APlugin <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    Ext.<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> config<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// call parent</span>
    APlugin.<span style="color: #660066;">superclass</span>.<span style="color: #660066;">constructor</span>.<span style="color: #660066;">call</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// eo constructor</span>
&nbsp;
Ext.<span style="color: #660066;">extend</span><span style="color: #009900;">&#40;</span>APlugin<span style="color: #339933;">,</span> Ext.<span style="color: #660066;">util</span>.<span style="color: #660066;">Observable</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// defaults - can be configured from outside</span>
&nbsp;
    init<span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>parent<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;">parent</span> <span style="color: #339933;">=</span> parent<span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// rest of plugin init code</span>
&nbsp;
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function init</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// other plugin functions</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// eo extend</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// register xtype</span>
Ext.<span style="color: #660066;">reg</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'apluginxtype'</span><span style="color: #339933;">,</span> APlugin<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #006600; font-style: italic;">// eof</span></pre></td></tr></table></div>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><div class="paypal-donations"><input type="hidden" name="cmd" value="_donations" /><input type="hidden" name="business" value="js02@aariadne.com" /><input type="hidden" name="item_number" value="Blog Donation" /><input type="hidden" name="currency_code" value="EUR" /><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" name="submit" alt="PayPal - The safer, easier way to pay online." /><img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /></div></form>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/file-patters/javascript-plugin-file-pattern/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Return Value of Function as items Pattern</title>
		<link>http://blog.extjs.eu/patterns/code-patterns/return-value-of-function-as-items-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/code-patterns/return-value-of-function-as-items-pattern/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 15:37:14 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[Code Patterns]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Know-how]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=11</guid>
		<description><![CDATA[<br/>
,items:&#40;function&#40;&#41;&#123;
    var items = &#91;&#93;;
&#160;
    // populate items array
&#160;
    return items;
&#125;&#41;.createDelegate&#40;this&#41;&#40;&#41;

]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">,</span>items<span style="color: #339933;">:</span><span style="color: #009900;">&#40;</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: #003366; font-weight: bold;">var</span> items <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// populate items array</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">return</span> items<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">createDelegate</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/code-patterns/return-value-of-function-as-items-pattern/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Defer Inline Anonymous Function Pattern</title>
		<link>http://blog.extjs.eu/patterns/code-patterns/defer-inline-anonymous-function-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/code-patterns/defer-inline-anonymous-function-pattern/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 15:26:52 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[Code Patterns]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=10</guid>
		<description><![CDATA[<br/>
1
2
3
4
var text = 'Deferred';
&#40;function&#40;&#41; &#123;
    alert&#40;text&#41;;
&#125;.defer&#40;2000, this&#41;&#41;;

]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> text <span style="color: #339933;">=</span> <span style="color: #3366CC;">'Deferred'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#40;</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;">alert</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: #660066;">defer</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">2000</span><span style="color: #339933;">,</span> <span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/code-patterns/defer-inline-anonymous-function-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP File Pattern</title>
		<link>http://blog.extjs.eu/patterns/file-patters/php-file-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/file-patters/php-file-pattern/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 15:20:05 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[File Patters]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=9</guid>
		<description><![CDATA[<br/>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
&#60;?
// vim: ts=4:sw=4:fdc=4:nu:nospell
/**
 * An Application
 * 
 * @author     Ing. Jozef Sakáloš
 * @copyright  (c) 2009, by Ing. Jozef Sakáloš
 * @date       15. Sepember 2009
 * @version    1.0
 * @revision   $Id$
 *
 * @license application.php is licensed under [...]]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #666666; font-style: italic;">// vim: ts=4:sw=4:fdc=4:nu:nospell</span>
<span style="color: #009933; font-style: italic;">/**
 * An Application
 * 
 * @author     Ing. Jozef Sakáloš
 * @copyright  (c) 2009, by Ing. Jozef Sakáloš
 * @date       15. Sepember 2009
 * @version    1.0
 * @revision   $Id$
 *
 * @license application.php is licensed under the terms of the Open Source
 * LGPL 3.0 license. Commercial use is permitted to the extent that the 
 * code/component(s) do NOT become part of another Open Source or Commercially
 * licensed development library or toolkit without explicit permission.
 * 
 * License details: http://www.gnu.org/licenses/lgpl.html
 */</span>
&nbsp;
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;config.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// code here</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// eof</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><div class="paypal-donations"><input type="hidden" name="cmd" value="_donations" /><input type="hidden" name="business" value="js02@aariadne.com" /><input type="hidden" name="item_number" value="Blog Donation" /><input type="hidden" name="currency_code" value="EUR" /><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" name="submit" alt="PayPal - The safer, easier way to pay online." /><img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /></div></form>
]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/file-patters/php-file-pattern/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JavaScript Application File Pattern</title>
		<link>http://blog.extjs.eu/patterns/file-patters/javascript-file-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/file-patters/javascript-file-pattern/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 15:10:59 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[File Patters]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=8</guid>
		<description><![CDATA[<br/>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// vim: sw=4:ts=4:nu:nospell:fdc=4
/**
 * An Application
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2008, by Ing. Jozef Sakáloš
 * @date      2. April 2008
 * @version   $Id$
 *
 * @license application.js is licensed under the terms of the Open Source
 * LGPL 3.0 license. [...]]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// vim: sw=4:ts=4:nu:nospell:fdc=4</span>
<span style="color: #006600; font-style: italic;">/**
 * An Application
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2008, by Ing. Jozef Sakáloš
 * @date      2. April 2008
 * @version   $Id$
 *
 * @license application.js is licensed under the terms of the Open Source
 * LGPL 3.0 license. Commercial use is permitted to the extent that the 
 * code/component(s) do NOT become part of another Open Source or Commercially
 * licensed development library or toolkit without explicit permission.
 * 
 * License details: http://www.gnu.org/licenses/lgpl.html
 */</span>
&nbsp;
<span style="color: #009966; font-style: italic;">/*global Ext, Application */</span>
&nbsp;
Ext.<span style="color: #660066;">ns</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Application'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// extensions here</span>
&nbsp;
Ext.<span style="color: #660066;">BLANK_IMAGE_URL</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'./ext/resources/images/default/s.gif'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// application main entry point</span>
Ext.<span style="color: #660066;">onReady</span><span style="color: #009900;">&#40;</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>
&nbsp;
    Ext.<span style="color: #660066;">QuickTips</span>.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #006600; font-style: italic;">// code here</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// eo function onReady</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// eof</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/file-patters/javascript-file-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML File Pattern</title>
		<link>http://blog.extjs.eu/patterns/file-patters/html-file-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/file-patters/html-file-pattern/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 14:21:33 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[File Patters]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=7</guid>
		<description><![CDATA[<br/>
&#60;!-- vim: ts=2:sw=2:nu:fdc=2:spell
&#160;
An Application Page
&#160;
@author    Ing.Jozef Sakáloš
@copyright (c) 2008, by Ing. Jozef Sakáloš
@date      2. April 2008
@version   $Id$
&#160;
@license application.html is licensed under the terms of the Open Source
LGPL 3.0 license. Commercial use is permitted to the extent that the 
code/component(s) do NOT become part of another [...]]]></description>
			<content:encoded><![CDATA[<br/>
<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- vim: ts=2:sw=2:nu:fdc=2:spell</span>
&nbsp;
<span style="color: #808080; font-style: italic;">An Application Page</span>
&nbsp;
<span style="color: #808080; font-style: italic;">@author    Ing.Jozef Sakáloš</span>
<span style="color: #808080; font-style: italic;">@copyright (c) 2008, by Ing. Jozef Sakáloš</span>
<span style="color: #808080; font-style: italic;">@date      2. April 2008</span>
<span style="color: #808080; font-style: italic;">@version   $Id$</span>
&nbsp;
<span style="color: #808080; font-style: italic;">@license application.html is licensed under the terms of the Open Source</span>
<span style="color: #808080; font-style: italic;">LGPL 3.0 license. Commercial use is permitted to the extent that the </span>
<span style="color: #808080; font-style: italic;">code/component(s) do NOT become part of another Open Source or Commercially</span>
<span style="color: #808080; font-style: italic;">licensed development library or toolkit without explicit permission.</span>
&nbsp;
<span style="color: #808080; font-style: italic;">License details: http://www.gnu.org/licenses/lgpl.html</span>
<span style="color: #808080; font-style: italic;">--&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ext/resources/css/ext-all.css&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;theme&quot;</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/empty.css&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/icons.css&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;css/application.css&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shortcut icon&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;img/extjs.ico&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ext/adapter/ext/ext-base.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ext/ext-all-debug.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;application.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page-title&quot;</span>&gt;</span>Application Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- delete following line if you don not want stats included --&gt;</span>
<span style="color: #009900;">&lt;?if<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;extjs.eu&quot;</span><span style="color: #66cc66;">===</span>$_SERVER<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;SERVER_NAME&quot;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>include<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;stats.php&quot;</span><span style="color: #66cc66;">&#41;</span>;?&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;!-- eof --&gt;</span></pre></div></div>

<h3>Basic HTML Page</h3>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- Do NOT put any DOCTYPE here unless you want problems in IEs. --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- Each valid html page must have a head; let's create one. --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- The following line defines content type and utf-8 as character set. --&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- If you want your application to work flawlessly with various local --&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- characters, just make ALL strings, on the page, json and database utf-8. --&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span>&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- Ext relies on its default css so include it here. --&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- This must come BEFORE javascript includes! --&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ext/resources/css/ext-all.css&quot;</span>&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- Include here your own css files if you have them. --&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- First of javascript includes must be an adapter... --&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ext/adapter/ext/ext-base.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- ...then you need the Ext itself, either debug or production version. --&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ext/ext-all-debug.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- Include here your extended classes if you have some. --&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- Include here you application javascript file if you have it. --&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- Set a title for the page (id is not necessary). --&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;page-title&quot;</span>&gt;</span>Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
&nbsp;
  <span style="color: #808080; font-style: italic;">&lt;!-- You can have onReady function here or in your application file. --&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- If you have it in your application file delete the whole --&gt;</span>
  <span style="color: #808080; font-style: italic;">&lt;!-- following script tag as we must have only one onReady. --&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
&nbsp;
  // Path to the blank image must point to a valid location on your server
  Ext.BLANK_IMAGE_URL = 'ext/resources/images/default/s.gif';
&nbsp;
  // Main application entry point
  Ext.onReady(function() {
	// write your application here
  });
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- Close the head --&gt;</span>  
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- You can leave the body empty in many cases, or you write your content in it. --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">&lt;!-- Close html tag at last --&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/patterns/file-patters/html-file-pattern/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

