Welcome Guest, Not a member yet? Register   Sign In
Carabiner 1.4: Asset Management Library

[eluser]zombaya[/eluser]
Now that I think of it, it should be better to add the check to see if a file exists in the function _asset(), so that it doesn't get added to the queue in the first place.

[eluser]pickupman[/eluser]
[quote author="zombaya" date="1278450082"]Now that I think of it, it should be better to add the check to see if a file exists in the function _asset(), so that it doesn't get added to the queue in the first place.[/quote]
I agree. Sometimes I will get a file_get_contents error.

[eluser]vertmonkee[/eluser]
Is it possible to output javascript straight into the document rather than loading a script.

E.g. in the head of the document I would like this

function displayData() {
alert("Something dynamic from server side script");
}

Thanks

[eluser]pickupman[/eluser]
I do this by having a $custom_js tag in the head of my template/views. Then I use:
Code:
$data['custom_js'] = 'function displayData(){'; //rest of js function
//or
$data['custom_js'] = $this->load->view('custom_js_view', $data, TRUE); //place code in /views/custom_js_view.php file

The latter method could allow to write a method to lookup a view based on controller/method. I usually create a subfolder in the views folder named the same as the controller. Say you create a js subfolder in each of those folders. Then you could write a function to see if a custom_js view exists, and if so load it.

[eluser]phused[/eluser]
I'm having issues trying to get this library to work.

*Update: Fixed it*

[eluser]eedfwChris[/eluser]
I have a folder I just throw my third party js and css stuff in (mainly because I don't care to separate out the js and css).

css
|-- global
|-- page
js
|-- global
|-- page
lib
|-- accordion
|-- ajax-upload
|-- deleteme-prototype-slideshow
|-- jwplayer
|-- lightview2.5
|-- livepipe
`-- mediaplayer-5.2

Any ideas how to use this lib folder with carabiner?

My immediate idea is to just symlink lib in each of the /js and /css folders but I'm not sure I like this idea.

[eluser]Johan André[/eluser]
[quote author="webPragmatist" date="1280978197"]I have a folder I just throw my third party js and css stuff in (mainly because I don't care to separate out the js and css).

css
|-- global
|-- page
js
|-- global
|-- page
lib
|-- accordion
|-- ajax-upload
|-- deleteme-prototype-slideshow
|-- jwplayer
|-- lightview2.5
|-- livepipe
`-- mediaplayer-5.2

Any ideas how to use this lib folder with carabiner?

My immediate idea is to just symlink lib in each of the /js and /css folders but I'm not sure I like this idea.[/quote]

Why not edit the carabiner config file and change the paths?

Edit: Nevermind. Did not fully understand what you meant the first time I read it! Smile

[eluser]eedfwChris[/eluser]
[quote author="Johan André" date="1280978802"]
Why not edit the carabiner config file and change the paths?[/quote]

Well now that I think about it I could use / as the config path for both js and css. Then just remember to do /js/global/my.js.

The problem is there's a third directory that I'm adding in the mix, not just the typical js and css dirs that carabiner is designed for. I'm not even sure of a way to handle the third directory... Any of you use vendor js and css and keep it out of your normal js and css dirs?

For now the former will work.

[eluser]eedfwChris[/eluser]
So now for my next question...

Is it possible to "queue" a group... It seems like it's only possible to use the display('group') method which wouldn't queue the group for use with the normal display().

For example, I need to load a group called "tabs" to activate js tabs inside of a view. It would be helpful to just be able to call $this->carabiner->group('tabs').

I don't mind making the method "group()" just wondering if I am missing something.

[eluser]pickupman[/eluser]
[quote author="webPragmatist" date="1280994792"]So now for my next question...

Is it possible to "queue" a group... It seems like it's only possible to use the display('group') method which wouldn't queue the group for use with the normal display().

For example, I need to load a group called "tabs" to activate js tabs inside of a view. It would be helpful to just be able to call $this->carabiner->group('tabs').

I don't mind making the method "group()" just wondering if I am missing something.[/quote]

You can create the group in the config file just like the other predefined frameworks. Then call display('group').




Theme © iAndrew 2016 - Forum software by © MyBB