mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-30 22:01:53 +00:00
.. | ||
QM_helper.js | ||
readme.txt |
This folder is NOT LINKED IN TO troggle /jslib/ is read by troggle /js/ is NOT read by troggle ONLY mention of QM_helper and jquery is in core/admin.py where it is something to do with the JSON export capability. Which seems to work even though /js/ is not available to troggle code (it woud need to be /javascript/...) settings.JSLIB_URL == /JAVASCRIPT/ http://localhost:8000/pathsreport to check JSLIB_ROOT /mnt/c/EXPO/troggle/media/jslib JSLIB_URL /javascript/ Troggle uses CaveView in to display survex .3d files. On the server CaveView is loaded in the proper Debian place for them, not part of the troggle code tree. So there is no copy of them here. There are JS snippets loaded from within the template .html files. These are in the troggle code tree repo. CodeMirror loader IS in the troggle repo, and is loaded from templates/html_editor>scripts.css and the CodeMirror JS IS in the troggle repo in media/js/CodeMirror jquery seems to have been only used for a popup menuing system used for all the troggle reports which was deleted by philip sargent as confusing and unnecessary in Spring 2020. links to JS files are in the ../templates/*.html files but _also_, and peculiarly, in the troggle/admin.py files e.g. class TroggleModelAdmin(admin.ModelAdmin): def save_model(self, request, obj, form, change): """overriding admin save to fill the new_since parsing_field""" obj.new_since_parsing=True obj.save() class Media: js = ('jquery/jquery.min.js','js/QM_helper.js') NB any *Admin class is used in the Django control panel only. templates/editentrance.html: {% extends "cavebase.html" %} {% block title %}Edit Entrance{% endblock %} {% block extraheaders %} <link rel="stylesheet" href="{{ settings.JSLIB_URL }}jquery-ui/css/lightness/jquery-ui.css" type="text/css" media="all" /> <script src="{{ settings.JSLIB_URL }}jquery-ui/jquery-ui.min.js" type="text/javascript"></script> <!--<script src="{{ settings.TINY_MCE_MEDIA_URL }}tiny_mce.js" type="text/javascript"></script>--> {% endblock %} {% block content %} etc {% endblock %}