-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-jig to only use ajax where required #806
Conversation
@lentinj - I would appreciate an extra eye on this to see if it is the right sort of thing. It fixes #794 as far as I can see. I'm slightly worried that the included files need to be imported in a particular order. I assume that it's sensible to break down the files into web2py.html and web2py_ajax.html (the second requires the first to be loaded, and is only added to pages that use the Ajax functionality). |
This also sorts the double inclusion of OZui.js. As I understand, 'OZ_main.html' loads the entire tree viewer codebase (including OZui.js), whereas 'OZui.html' just includes OZui.js for when we need the leaf-drawing code and the search functionality. However, via 'uikit_layout.html', we include 'OZ_main.html' in all the top-level site pages, e.g. https://beta.onezoom.org/about.html, even when we don;t need to draw a tree. I think we only need the tree drawing code on the front page (for the animation), so perhaps we should change `uikit_layout.html' to include only 'OZui.html', and find a way to make an exception for the front page? |
I wonder if our life would be easier if we stop using the
Having 2 includes, one just for the treeviewer and one just for OZui, would make things a lot easier to understand, as well as meaning we can do things like the above. Shall I pick this up on |
We need the Ajax stuff for sponsor-leaf, and I suspect for some of the management pages. Using response.files also means we avoid duplicate-imports, so I'm happy to keep it.
Sure. Although I think it is actually done already (as in, we should either include 'OZ_main.html' or 'OZui.html', but not both). The first if we want the tree viewer, the second if all we need is the leaf daring and search part of the tree viewer functionality. I think that was the idea when it was set up too. |
I just remembered - we use web2py Ajax functionality substantially in the page that allows us to verify sponsorships. |
Having one include contain both entrypoints and the other only including one is confusing. Replace OZ_main with explicit OZentry/OZui include files. Add support for multiple includes to partial_install, so we can add both includes to minlife.html.
@hyanwong I think this all looks good. In addition I've replaced |
This seems to work, and is running on beta.onezoom.org as of Tue 16th Apr 2024