PDA

View Full Version : Ext.ux



raj_plays
14 Feb 2011, 12:36 AM
Hi,
This is a novice question about extension created under Ext.ux.
Where in the ext hierarchy should these code files be placed?
Somewhere in the src folder?

steffenk
14 Feb 2011, 1:25 AM
Ext.ux is a namespace only which shows that the source is a plugin / extension. There is no hierarchy given, you always can use your own.
In download package you will find an ux folder containing ux from sencha.

raj_plays
14 Feb 2011, 3:27 AM
The issue is that if I place the js file anywhere, I have to explicitly call it in my html like..
<script language="javascript" type="text/javascript" src="../Javascripts/FileUploadField.js"></script>

I want to avoid this and access all the files using just...
<script language="javascript" type="text/javascript" src="../Javascripts/ext-3.1.1/ext-all.js"></script>

lukefowell89
14 Feb 2011, 3:36 AM
It doesnt work like that, in the HTML file you need to include the Ext files for the framework. Then include all of your own files too. It is alot cleaner to seperate your different components etc into different files. If you want to get all your files into one Js file then you can, but either way you will need to include it

raj_plays
14 Feb 2011, 3:47 AM
Thanks, Steffen and Luke for clearing that up.

mitchellsimoens
14 Feb 2011, 5:20 AM
If you want to include all, there is a ux-all*.js file in the /extjs/examples/ux/ folder. Don't forget the ux-all.css file that is in the css folder under there.

So you can do this:


<link rel="stylesheet" type="text/css" href="/extjs/resources/css/ext-all.css"/>
<script type="text/javascript" src="/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/extjs/ext-all-debug.js"></script>

<link rel="stylesheet" type="text/css" href="/extjs/examples/ux/css/ux-all.css"/>
<script type="text/javascript" src="/extjs/examples/ux/ux-all-debug.js"></script>

Of course you can move the ux files to where ever and include from that to accomplish this:


<link rel="stylesheet" type="text/css" href="/extjs/resources/css/ext-all.css"/>
<link rel="stylesheet" type="text/css" href="/extjs/resources/css/ux-all.css"/>
<script type="text/javascript" src="/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/extjs/ext-all-debug.js"></script>
<script type="text/javascript" src="/extjs/ux-all-debug.js"></script>

raj_plays
14 Feb 2011, 7:46 AM
Thanks, Mitchell