PDA

View Full Version : Developing independent component



fabio.policeno
19 Feb 2014, 8:05 AM
Hello ,


I needed to develop a component for uploading files ( just a FileField displaying only the button ) and this component I want to use it in several places , in systems with jquery , prototype , web pages , among others , without necessarily being within a systems purely Ext JS .


Concludes this component is working perfect and even to engage in other systems or pages . But my problem is that just to have this button upload my javascript is 800KB in size and my css with over 200KB . In short , are required for 1MB files I upload only 1 button on the screen , including my folder resources / images there are folders with images relating to components datepicker , grid , among others , whose components 'm not using . In my css and javascript to end production there are styles and javascript classes that I'm not using and makes the most sense to charge them, eg : panel , toolbar , among others .


What is the best solution for the build of my project I have a javascript and much smaller than that css , only with the core extjs and classes that actually I'm using along with their dependencies . I do not believe that to develop only one upload field needs 1MB of files being loaded by browser. I found that this treatment was already being done by Ext JS functionality after the require included in the framework.


I await suggestions . Thank you!

mitchellsimoens
3 Mar 2014, 7:50 AM
You can hide the <input> and show some <div> or whatever and execute the click method on the <input> element to show the file picker.

fabio.policeno
3 Mar 2014, 8:45 AM
Sorry, I missed your reply.


I managed to do a feature, my problem is the final JS file of my application to be very large.

fabio.policeno
26 Mar 2014, 7:19 AM
Nothing? :(