Welcome Guest, Not a member yet? Register   Sign In
Another Asset Management
#1

[eluser]Amzad Hossain[/eluser]
I have developed another asset management but my colleague told me that he has seen something some same idea in Ignited code. I have searched but could not find it. So, if anyone have seen or developed something of same kind then plz let me know. If there is nothing of this sort, i will publish my code.


Idea:

Lightbox, facebox and these sort of plugins has their own js, css and dependent other js/css files. In my library you have a config file where you have to add these components as following:

Code:
[ lightbox ] -
          [ resources] - { lightbox.js, lightbox.css }
          [ dependency ] - { jquery.js }

[ facebox ] -
          [ resources] - { facebox.js, facebox.css }
          [ dependency ] - { jquery.js }


Now in your controller you will call the helper function:

Code:
add_component('lightbox');

or,

Code:
add_component( array('lightbox', 'facebox') );


The library class then arranges and prioritize the js and css files. And removes duplicated resources in case of you have added multiple components.


In your view file, all you have to do is to call another helper function print_components().


This function prints all js according to their order and also css files.



I am waiting for your response.. Thank you.


Messages In This Thread
Another Asset Management - by El Forum - 12-23-2008, 08:51 AM
Another Asset Management - by El Forum - 12-23-2008, 01:07 PM
Another Asset Management - by El Forum - 12-23-2008, 01:42 PM
Another Asset Management - by El Forum - 12-23-2008, 02:48 PM
Another Asset Management - by El Forum - 12-24-2008, 12:06 AM
Another Asset Management - by El Forum - 02-12-2009, 01:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB