PDA

View Full Version : include only required extjs files



barbara1712
4 Nov 2009, 4:49 AM
Hi All,

I am new to Extjs3.0. I want to generate the repports in my application using extjs.
The size of extjs is near about 42mb.
How can I remove the size of extjs and use that in my application. I have removed the docs folder. The size now reduced by 29mb.

I mean what are the required folders/files for extjs so that only those files I will include in my application?

Can anyone help me please?

Your help will be highly appriciable

Thanks

libertux
4 Nov 2009, 5:27 AM
Hi, i'm also new in ExtJS but i'm Reading 'learning ExtJS' book it's awesome you should read it if u like have control with ExtJS library.
In order to let your project use ExtJS, you shout add these files and folder to your lib directory :

adapter and resources folders
ext-all-debug.js at production step (when writing your code it's help you have some error codes and give you some informations about errors on your code)
ext-all.js when your code is ready to be published, change the ext-all-debug.js file by this one after your code is clear and your app running


now you should insert some links into your index file like :



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


IE: in this code i add resources, adapter folder and ext-all-debug.js file in a folder named "extjs" under lib folder.

i hope give you some help ;)

good coding

barbara1712
4 Nov 2009, 5:37 AM
Please click one of the Quick Reply icons in the posts above to activate Quick Reply.

Condor
4 Nov 2009, 5:46 AM
adapter/ext/ext-base.js, ext-all.js, resources/css/ext-all.css and everything from resources/images/default/*.

By building a custom Ext you can reduce the .js and .css filesize even further.

barbara1712
4 Nov 2009, 8:03 PM
Thanks libertux and condor.

I am using extjs3.0

I.e. if my extjs folder contains
ext-base.js
ext-all.js
resources directory

and removed following directories
adapter/jquery
adapter/prototype
adapter/yui
examples
pkgs
src


Then also my application will give me report in extjs. right?

roderick.wu
14 Nov 2009, 7:03 AM
Hi, Condor, when I try ext "Desktop Example", I found the ext-all-debug is mandatory, how can I remove it? when I remove this file, it reports errors in ext-all.js. Because this file is too big(2-3Megabites), I have to remove it. THanks.




adapter/ext/ext-base.js, ext-all.js, resources/css/ext-all.css and everything from resources/images/default/*.

By building a custom Ext you can reduce the .js and .css filesize even further.

rahulmehta
16 Mar 2011, 9:08 PM
Why two files of js are require to include and what are their roles ?

gkpandi
17 Nov 2011, 1:57 AM
Hi,

Similarly, I have an issue like what are the files needed to work with ExtJs4.0? I'm unable to run my samples in Internet Explorer 8.0. Here are .html file contents.

<html>
<head>
<title>:: Drop down list ::</title>
<link rel="stylesheet" type="text/css" href="E:\My Folder\Practice\ExtJS\resources\css\ext-all.css">
<script type="text/javascript" src="E:\My Folder\Practice\ExtJS\ext-debug.js"></script>
<script type="text/javascript" src="E:\My Folder\Practice\ExtJS\Apps\Layouts\LayoutsDemo.js"></script>
</head>
<body></body>
</html>

What wrong did I do here? Can anyone please give your suggestion to solve my issue?

Thanks