Skip to content
Snippets Groups Projects
Commit 02b95d82 authored by Branson Stephens's avatar Branson Stephens
Browse files

added blessed tags to settings, view, and event_detail

parent abf21a3c
No related branches found
No related tags found
No related merge requests found
......@@ -537,6 +537,7 @@ def view(request, graceid):
context['nearby'] = [(event.gpstime - a.gpstime, event)
for event in a.neighbors()]
context['skyalert_authorized'] = skyalert_authorized(request)
context['blessed_tags'] = settings.BLESSED_TAGS
return render_to_response(
[ 'gracedb/event_detail_{0}.html'.format(a.analysisType),
'gracedb/event_detail.html'],
......
......@@ -37,6 +37,15 @@ XMPP_ALERT_CHANNELS = [
'test_grb',
]
BLESSED_TAGS = [
'psd',
'sky_loc',
'strain',
'tfplots',
'sig_info',
'audio',
]
DATABASES = {
'default' : {
'NAME' : 'gracedb',
......
......@@ -120,8 +120,10 @@
var panes = new Array();
var titles = new Array();
{% for tag in object.getAvailableTags %}
{% if tag.name in blessed_tags %}
panes.push(dojo.byId("{{tag.name}}"));
titles.push("{{tag|tagUnicode}}");
{% endif %}
{% endfor %}
for (var i = 0; i<panes.length; i++) {
......@@ -143,10 +145,12 @@
// Now, deal with the silly figure containers.
var figure_container_ids = new Array();
{% for tag in object.getAvailableTags %}
{% if tag.name in blessed_tags %}
if (dojo.byId("{{tag.name}}_figure_container")) {
console.log("detected figure container for {{tag.name}}");
figure_container_ids.push("{{tag.name}}_figure_container");
}
{% endif %}
{% endfor %}
var figure_scrollpanes = new Array();
for (var i = 0; i<figure_container_ids.length; i++) {
......@@ -318,6 +322,7 @@
{# Loop over the available tags. #}
{% if object.getAvailableTags %}
{% for tag in object.getAvailableTags %}
{% if tag.name in blessed_tags %}
{# Create a div to hold the pane innerHTML for this tag #}
<div id="{{tag.name}}">
......@@ -382,6 +387,7 @@
{% endif %}
</div>
{% endif %} {# endif the tag is blessed #}
{% endfor %}
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment