osalabs / osafw-php

Business Applications Web Framework, PHP
MIT License
3 stars 3 forks source link

Proper place for site-wide JS file #18

Closed vladsavchuk closed 6 years ago

vladsavchuk commented 6 years ago

I've created site.js to implement instant language switching through AJAX-request and location reload. I need this JS-file on every page, so I added to the /layout/sys_footer.html the following:

<script src="<~ROOT_URL>/js/site/site.js"></script>

Should we provide empty site.js and recommend to use it like site.css? I definitely don't want to add site-specific code into fw.js.

osalabs commented 6 years ago

well, some sites without much frontend coding might not require common site js at all. It's more like "recommendation" and just add to documentation