fsmk/camp-web — pull request #46 by vishalvijay (2014-05-03 17:37:56+00:00)
Title: major change for js and css structure, fix for all js issue

This is a major change
* Now on wards, we can put all our custom js in application_js folder
* All the plugins we can put in plugin folder. And you need to manually add that file to application.js. So that we can keep order of plugins.
* all custom css to application_css
* all plugin css to plugin folder. Here no need to manually add it
* all that js issue happened because of turbolink js. We can simply remove that js, that will solve all our issues. But I didn't removed it because that js is really good. It gives very good performance.

Notes about turbolink.js

# Now on wards don't use or wait for document ready call back.
Instead of using

$-> or jQuery-> or $(function(){});
use turbolink call back $(document).on 'ready page:load', ->
#if you want to avoid a particular link making a tubolink add data-no-turbolink = "true" to that link.

* don't add any js to dom directly. Add it application.js folder only. And validate existence of DOM element before using it. So there won't be any js crash.
Note : you can validate existence of DOM element by
eg:
$("#test").exists ->
$(this).doWhateverStuffWithThis