01-22-2016, 10:54 PM
Struggling a bit with the JS inclusions in the footer.
Better I think to call all the js core files, then allow user js afterwards-per page. So move the closing body and html tags either to the page, or to a true HTML footer. Suggest: a js-core (switchable perhaps) and a seperate HTML footer.
eg I'm working on populating a flot pie-chart with json data via ajax (data from uc_user_permission_matches).
Now when logged out, the ajax is loading a non-authed page and login fails with a token error.
Better I think to call all the js core files, then allow user js afterwards-per page. So move the closing body and html tags either to the page, or to a true HTML footer. Suggest: a js-core (switchable perhaps) and a seperate HTML footer.
eg I'm working on populating a flot pie-chart with json data via ajax (data from uc_user_permission_matches).
- I don't want any user interaction, just a nice pie on the index page.
- I can't include the flot js on the index page because jQuery hasn't been loaded yet.
- I put the flot js calls under the main js calls in the footer.
- The body and html are closed in the footer so I must include my page js in the footer.
Now when logged out, the ajax is loading a non-authed page and login fails with a token error.