<?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; File Patters</title>
	<atom:link href="http://blog.extjs.eu/category/patterns/file-patters/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>Ext Extension with Factory Functions File Pattern</title>
		<link>http://blog.extjs.eu/patterns/file-patters/ext-extension-with-factory-functions-file-pattern/</link>
		<comments>http://blog.extjs.eu/patterns/file-patters/ext-extension-with-factory-functions-file-pattern/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 00:01:43 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[File Patters]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=634</guid>
		<description><![CDATA[<br/>See also:


Writing a Big Application in Ext

Abstract classes with Ext JS

Factory Functions in Ext Extensions (Abstract Classes)


// vim: ts=4:sw=4:nu:fdc=2:nospell
/*global Ext:true, AbstractPanel:true */
/*jslint browser:true, laxbreak:true */
&#160;
// create namespace
Ext.ns&#40;'AbstractPanel'&#41;;
&#160;
/**
 * @class AbstractPanel
 * @extends Ext.Panel
 *
 * AbstractPanel File Pattern
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2010, Ing. Jozef Sakáloš
 * [...]]]></description>
			<content:encoded><![CDATA[<br/><p>See also:</p>
<ul>
<li>
<a target="_blank" href="http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/">Writing a Big Application in Ext</a>
</li>
<li><a target="_blank" href="http://tdg-i.com/364/abstract-classes-with-ext-js">Abstract classes with Ext JS</a>
</li>
<li><a target="_blank" href="http://blog.extjs.eu/know-how/factory-functions-in-ext-extensions/">Factory Functions in Ext Extensions (Abstract Classes)</a></li>
</ul>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// vim: ts=4:sw=4:nu:fdc=2:nospell</span>
<span style="color: #009966; font-style: italic;">/*global Ext:true, AbstractPanel:true */</span>
<span style="color: #009966; font-style: italic;">/*jslint browser:true, laxbreak:true */</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;">'AbstractPanel'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/**
 * @class AbstractPanel
 * @extends Ext.Panel
 *
 * AbstractPanel File Pattern
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2010, Ing. Jozef Sakáloš
 * @version   1.0
 * @date      &lt;ul&gt;
 * &lt;li&gt;21. September 2010&lt;/li&gt;
 * &lt;/ul&gt;
 * @revision  $Id$
 * @depends   
 *
 * @see       http://tdg-i.com/364/abstract-classes-with-ext-js
 * @see       http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/
 * @see       http://blog.extjs.eu/know-how/factory-functions-in-ext-extensions/
 *
 * @license   This file 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>
AbstractPanel <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 options - can be overridden on instantiation</span>
    <span style="color: #006600; font-style: italic;">// Do NOT put arrays or objects here</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;">// private</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;">// create config object</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>
&nbsp;
        <span style="color: #006600; font-style: italic;">// build config</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">buildConfig</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</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>
&nbsp;
        <span style="color: #006600; font-style: italic;">// call parent</span>
        AbstractPanel.<span style="color: #660066;">superclass</span>.<span style="color: #660066;">initComponent</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: #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: #006600; font-style: italic;">/**
     * Builds the config object
     * @param {Object} config The config object is passed here
     * from initComponent by reference. Do not create or return
     * a new config object, add to the passed one instead.
     *
     * You can override this function if you need to customize it
     * or you can override individual build functions called.
     */</span>
    <span style="color: #339933;">,</span>buildConfig<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>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">buildItems</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">buildButtons</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">buildTbar</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">buildBbar</span><span style="color: #009900;">&#40;</span>config<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function buildConfig</span>
    <span style="color: #006600; font-style: italic;">// }}}</span>
    <span style="color: #006600; font-style: italic;">// {{{</span>
    <span style="color: #006600; font-style: italic;">/**
     * Builds items
     * @param {Object} config The config object is passed here
     * from buildConfig by reference. Do not create or return
     * a new config object, add to the passed one instead.
     *
     * You can override this function if you need to customize it.
     */</span>
    <span style="color: #339933;">,</span>buildItems<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>
        config.<span style="color: #660066;">items</span> <span style="color: #339933;">=</span> undefined<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function buildItems</span>
    <span style="color: #006600; font-style: italic;">// }}}</span>
    <span style="color: #006600; font-style: italic;">// {{{</span>
    <span style="color: #006600; font-style: italic;">/**
     * Builds buttons
     * @param {Object} config The config object is passed here
     * from buildConfig by reference. Do not create or return
     * a new config object, add to the passed one instead.
     *
     * You can override this function if you need to customize it.
     */</span>
    <span style="color: #339933;">,</span>buildButtons<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>
        config.<span style="color: #660066;">buttons</span> <span style="color: #339933;">=</span> undefined<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function buildButtons</span>
    <span style="color: #006600; font-style: italic;">// }}}</span>
    <span style="color: #006600; font-style: italic;">// {{{</span>
    <span style="color: #006600; font-style: italic;">/**
     * Builds top toolbar and its items
     * @param {Object} config The config object is passed here
     * from buildConfig by reference. Do not create or return
     * a new config object, add to the passed one instead.
     *
     * You can override this function if you need to customize it.
     */</span>
    <span style="color: #339933;">,</span>buildTbar<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>
        config.<span style="color: #660066;">tbar</span> <span style="color: #339933;">=</span> undefined<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function buildTbar</span>
    <span style="color: #006600; font-style: italic;">// }}}</span>
    <span style="color: #006600; font-style: italic;">// {{{</span>
    <span style="color: #006600; font-style: italic;">/**
     * Builds bottom toolbar and its items
     * @param {Object} config The config object is passed here
     * from buildConfig by reference. Do not create or return
     * a new config object, add to the passed one instead.
     *
     * You can override this function if you need to customize it.
     */</span>
    <span style="color: #339933;">,</span>buildBbar<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>
        config.<span style="color: #660066;">bbar</span> <span style="color: #339933;">=</span> undefined<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function buildBbar</span>
    <span style="color: #006600; font-style: italic;">// }}}</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;">// eof</span></pre></div></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/ext-extension-with-factory-functions-file-pattern/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Factory Function File Pattern</title>
		<link>http://blog.extjs.eu/know-how/factory-function-file-pattern/</link>
		<comments>http://blog.extjs.eu/know-how/factory-function-file-pattern/#comments</comments>
		<pubDate>Tue, 17 Mar 2009 13:50:04 +0000</pubDate>
		<dc:creator>Saki</dc:creator>
				<category><![CDATA[File Patters]]></category>
		<category><![CDATA[Know-how]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.extjs.eu/?p=266</guid>
		<description><![CDATA[<br/>You know, I&#8217;m not very big fan of factory functions, nevertheless, I&#8217;m aware of the fact that they may be necessary in some situations. Here is the file pattern that works (briefly tested).
Keep each factory function in a separate file name of which should be Namespace.Factory.functionName.js

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: ts=4:sw=4:nu:fdc=4:nospell
/*global Ext, MyNamespace */
/**
 * @class MyNamespace.Factory
 *
 [...]]]></description>
			<content:encoded><![CDATA[<br/><p>You know, I&#8217;m not very big fan of factory functions, nevertheless, I&#8217;m aware of the fact that they may be necessary in some situations. Here is the file pattern that works (briefly tested).</p>
<p><b>Keep each factory function in a separate file name of which should be <code>Namespace.Factory.functionName.js</code></b></p>

<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: ts=4:sw=4:nu:fdc=4:nospell</span>
<span style="color: #009966; font-style: italic;">/*global Ext, MyNamespace */</span>
<span style="color: #006600; font-style: italic;">/**
 * @class MyNamespace.Factory
 *
 * A Factory function pattern
 *
 * @author    Ing. Jozef Sakáloš
 * @copyright (c) 2009, by Ing. Jozef Sakáloš
 * @date      17. March 2009
 * @version   0.1
 * @revision  $Id$
 *
 * @license MyNamespace.Factory.myPanel.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.
 * 
 * &lt;p&gt;License details: &lt;a href=&quot;http://www.gnu.org/licenses/lgpl.html&quot;
 * target=&quot;_blank&quot;&gt;http://www.gnu.org/licenses/lgpl.html&lt;/a&gt;&lt;/p&gt;
 */</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;">'MyNamespace.Factory'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/**
 * @method myPanel
 * @param {Object} config
 * A config object
 * @return {Ext.Panel}
 */</span>
MyNamespace.<span style="color: #660066;">Factory</span>.<span style="color: #660066;">myPanel</span> <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>
&nbsp;
	<span style="color: #006600; font-style: italic;">// pre-instantiation code</span>
	<span style="color: #003366; font-weight: bold;">var</span> defaults <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #006600; font-style: italic;">// put your defaults here</span>
		<span style="color: #006600; font-style: italic;">// but avoid id, el, contentEl, renderTo, applyTo, or similar</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// eo defaults object</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// create config object</span>
	<span style="color: #003366; font-weight: bold;">var</span> cfg <span style="color: #339933;">=</span> Ext.<span style="color: #660066;">apply</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> config<span style="color: #339933;">,</span> defaults<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// instantiate</span>
	<span style="color: #003366; font-weight: bold;">var</span> cmp <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Ext.<span style="color: #660066;">Panel</span><span style="color: #009900;">&#40;</span>cfg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// post-instantiation code</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// return the created component</span>
	<span style="color: #000066; font-weight: bold;">return</span> cmp<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// eo function MyNamespace.Factory.myPanel</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// eof</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.extjs.eu/know-how/factory-function-file-pattern/feed/</wfw:commentRss>
		<slash:comments>3</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>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>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>

