<?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>Jon&#039;s Blog &#187; ExtJS</title>
	<atom:link href="http://bombdiggity.net/blog/category/development/javascript/extjs/feed/" rel="self" type="application/rss+xml" />
	<link>http://bombdiggity.net/blog</link>
	<description>Ramblings of a php coder</description>
	<lastBuildDate>Fri, 14 May 2010 17:36:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SWFUpload with Ext JS Buttons</title>
		<link>http://bombdiggity.net/blog/2009/01/16/swfupload-with-ext-js-buttons/</link>
		<comments>http://bombdiggity.net/blog/2009/01/16/swfupload-with-ext-js-buttons/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 14:52:12 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[swfupload]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=78</guid>
		<description><![CDATA[For the longest time I am have been using Ext JS to write the Administration Tools for the Indianapolis Motor Speedway and the Indy Racing League where I work. Some of the tools required uploading of large files to where I would use the SWFUpload library to achieve this functionally. With the introduction of Flash [...]]]></description>
			<content:encoded><![CDATA[<p>For the longest time I am have been using <a href="http://extjs.com/" title="Ext JS">Ext JS</a> to write the Administration Tools for the Indianapolis Motor Speedway and the Indy Racing League where I work.  Some of the tools required uploading of large files to where I would use the <a href="http://swfupload.org/" title="SWFUpload">SWFUpload</a> library to achieve this functionally.  With the introduction of Flash 10 to where you can not have JavaScript call the method to open the dialog box any more this presented a problem.  The generally accepted workaround is to have the flash object be transparent and over the button but this doesn&#8217;t allow the button to have events or allow you to do hover overs and the such, Until Now.<br />
<span id="more-78"></span><br />
I spent a few hours working on this to get the example working to where you still have the basic functionally of the button (events and hover) but you still get the flash dialog to open.  What I did to achieve this is place the flash object over the underlying &lt;button&gt; that is in the Ext Button.</p>
<p>Here is my html code:</p>
<pre class="brush: html">
&lt; !DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;
        &lt;title&gt;Flash Ext JS Button&lt;/title&gt;
        &lt;link href=&quot;/js/ext2.2/css/ext-all.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;/js/ext2.2/ext-base.js&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;/js/ext2.2/ext-all.js&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;/js/swfupload/swfupload.js&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;/js/swfupload/plugins/swfupload.swfobject.js&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;/js/swfupload/plugins/swfupload.queue.js&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;./button.js&quot;&gt;&lt;/script&gt;
        &lt;style type=&quot;text/css&quot;&gt;
            .swfupload {
                position: absolute;
                z-index: 1;
            }
        &lt;/style&gt;
    &lt;/meta&gt;&lt;/head&gt;
    &lt;body&gt;
        &lt;div style=&quot;padding: 20px;&quot;&gt;
           &lt;div id=&quot;btnHolder&quot;&gt;&lt;/div&gt;
           &lt;br /&gt;&lt;br /&gt;
           &lt;div id=&quot;btnEvent&quot;&gt;&lt;/div&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;
</pre>
<p>button.js file:</p>
<pre class="brush: js">
Ext.onReady(function(){
    new Ext.Button({
        renderTo: &#039;btnHolder&#039;,
        id : &#039;btnClick&#039;,
        text: &#039;Open Download Dialog&#039;,
        listeners : {
            &#039;click&#039; : function(){
                Ext.fly(&#039;btnEvent&#039;).update(&#039;Button Click Fired&#039;);
                (function(){
                    Ext.fly(&#039;btnEvent&#039;).update();
                }).defer(2000);
            },
            &#039;render&#039; : function(btn) {
                Ext.get(&#039;btnClick&#039;).child(&#039;em&#039;).insertFirst({tag: &#039;span&#039;, id: &#039;btnUploadHolder&#039;});
                SWFUpload.onload = function () {
                      var settings = {
                          flash_url : &quot;/js/swfupload/swfupload.swf&quot;,
                          upload_url: &quot;/upload/postfile&quot;,	// Relative to the SWF file
                          file_size_limit : &quot;20 MB&quot;,
                          file_types : &quot;*.jpg&quot;,
                          file_types_description : &quot;Image Files&quot;,
                          file_upload_limit : 20,
                          file_queue_limit : 20,
                          debug: false,

                          // Button Settings
                          button_placeholder_id : &quot;btnUploadHolder&quot;,
                          button_width: Ext.get(&#039;btnClick&#039;).child(&#039;button&#039;).getWidth(),
                          button_height: Ext.get(&#039;btnClick&#039;).child(&#039;button&#039;).getHeight(),
                          button_cursor : SWFUpload.CURSOR.HAND,
                          button_window_mode : SWFUpload.WINDOW_MODE.TRANSPARENT,

                          // SWFObject settings
                          minimum_flash_version : &quot;9.0.28&quot;
                      };

                      swfu = new SWFUpload(settings);
                  };
            }
        }
    });
});
</pre>
<p>Basically what I do is have it insert the flash object on the render event of the button or the Ext Component that contains the button I want to render it to.</p>
<p><a href="http://code.bombdiggity.net/extbutton/" title="Working Sample">Click here for a working sample</a></p>
<p>Let me know of any questions in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2009/01/16/swfupload-with-ext-js-buttons/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Building Admin Tools With JavaScript and PHP</title>
		<link>http://bombdiggity.net/blog/2008/06/24/building-admin-tools-with-javascript/</link>
		<comments>http://bombdiggity.net/blog/2008/06/24/building-admin-tools-with-javascript/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 15:29:45 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[IMS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Admin Tool]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=22</guid>
		<description><![CDATA[So part of my job at the Indianapolis Motor Speedway is writing Admin Tools for our users to administer the sites with.  There are a mix of older admin tools which don't use any JavaScript and newer admin tools where the front end is completely based on JavaScript.

I was recently asked to build an admin tool to allow one of our users to maintain the drop down portions of the site navigation since they can change with each passing event that happens at the track. ]]></description>
			<content:encoded><![CDATA[<p>So part of my job at the Indianapolis Motor Speedway is writing Admin Tools for our users to administer the sites with.  There are a mix of older admin tools which don&#8217;t use any JavaScript and newer admin tools where the front end is completely based on JavaScript.</p>
<p>I was recently asked to build an admin tool to allow one of our users to maintain the drop down portions of the site navigation since they can change with each passing event that happens at the track. This presented the following problems:</p>
<ul class="arrowtick">
<li>Navigation is stored in a XML file</li>
<li>The navigation XML file is versioned with Subversion</li>
<li>The admin had to be easy to use.</li>
</ul>
<p>What I started with was trying to figure out the whole svn integration thing as I had to figure out a way to make sure that the working copy was always current and that when the user saved the navigation it did a commit on the file to that way it would always be the latest version in the repository.</p>
<p><strong>Problem 1:</strong> SVN does not allow you to checkout a single file to be a working copy.  I found this to be a problem as I didn&#8217;t want the whole directory, I just wanted the navigation.xml file.  I did some searching on the SVN bug tracker and found a <a title="SVN Checkout One File" href="http://subversion.tigris.org/nonav/issues/showattachment.cgi/621/svn-co-one-file" target="_blank">perl script</a> that David Kilzer wrote that allowed me to check out a single file.  Problem 1 is solved.</p>
<p>Once I got the file checked out into the working directory on the server i preceded to write a shell script that updated the file via an <strong>svn up</strong> command that would be ran on my fetch script before I read in the XML file to pass it back to the JavaScript.</p>
<p>Now that I have the XML back in my front end i can display it. Here is what the admin tools looks like when you have selected which site you want to edit.</p>
<p><a href="http://www.bombdiggity.net/blog/wp-content/uploads/2008/06/navigation_screen.jpg" rel="lightbox[22]"><img class="size-full wp-image-23" title="Navigation Admin" src="http://www.bombdiggity.net/blog/wp-content/uploads/2008/06/navigation_screen.jpg" alt="IMS Sites Navigation Admin" width="499" height="306" /></a></p>
<p>As you can see from the screen shot everything is layout in an easy to browse tree view.  You can move the child nodes around to order then or place them in any parent menu that you like.  There is a simple edit and add features.  The adding also incorporates a feature from our Site Pages admin that allows you to select from a page in there so you don&#8217;t have to copy and paste a link from the pages admin to this admin.</p>
<p>Once the user gets done with any changed they may have they can select the save button and that passes it back off to the PHP backend where it writes out the xml file and then does an <strong>svn ci</strong> on the file which places it back in the SVN repository and also promotes it to production via a set of PHP and bash scripts to interface with the SVN repository.</p>
<p>All in all using the <a title="ExtJS Library" href="http://extjs.com/">ExtJS Library</a> and PHP to build the admin tools for the IMS sites has dramiticly cut down on the time it takes to do everything since I have a very good understand of how everything in ExtJS works and when I don&#8217;t there is a great documentation resource out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2008/06/24/building-admin-tools-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WiiExtJS: Building Ajax apps that run on the Wii Opera browser</title>
		<link>http://bombdiggity.net/blog/2008/06/06/wiiextjs-building-ajax-apps-that-run-on-the-wii-opera-browser/</link>
		<comments>http://bombdiggity.net/blog/2008/06/06/wiiextjs-building-ajax-apps-that-run-on-the-wii-opera-browser/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 12:20:26 +0000</pubDate>
		<dc:creator>Jon</dc:creator>
				<category><![CDATA[ExtJS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Nintendo Wii]]></category>
		<category><![CDATA[Wii]]></category>

		<guid isPermaLink="false">http://www.bombdiggity.net/blog/?p=18</guid>
		<description><![CDATA[Over at the ExtJS.com Blog, Shea Frederick has posted on building Wii-friendly web pages using the ExtJS library.]]></description>
			<content:encoded><![CDATA[<p>Shea Frederick has <a href="http://extjs.com/blog/2008/06/04/wiiextjs-fun-times-with-nintendos-embeded-opera-browser/">posted on</a> building Wii-friendly web pages using the ExtJS library.</p>
<p>Shea focuses on the various issues that come up when building something for the Wii resolution, screen size, input types, and more.</p>
<p>For example, check out the layout:</p>
<pre lang="javascript">
Ext.ns('Ext.ux.layout');
Ext.ux.layout.wii = Ext.extend(Ext.layout.FitLayout, {
    setItemSize : function(item, size){
        var viewSize = Ext.getBody().getViewSize();
        this.container.addClass('ux-layout-wii');
        item.addClass('ux-layout-wii-item');
        size.height = (viewSize.height-60);
        size.width = (viewSize.width-60);
        item.setSize(size);
    }
});
Ext.Container.LAYOUTS['wii'] = Ext.ux.layout.wii;</pre>
<p>And then you can detect the Wii to set this layout:</p>
<pre lang="javascript">
Ext.isWii = navigator.userAgent.toLowerCase().indexOf("wii") &gt; -1;
var layout = 'fit';
var title = 'Normal';
if (Ext.isWii) {
    layout = 'wii';
    title = 'Wii';
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://bombdiggity.net/blog/2008/06/06/wiiextjs-building-ajax-apps-that-run-on-the-wii-opera-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
