forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfloor-plan.html
More file actions
120 lines (102 loc) · 4.08 KB
/
floor-plan.html
File metadata and controls
120 lines (102 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters %}
{% load textfilters %}
{% load static %}
{% block title %}
IETF {{ meeting.number }} meeting agenda
{% if "-utc" in request.path %}
(UTC)
{% endif %}
{% endblock %}
{% block morecss %}
.floor-plan {
position: relative;
top: 0;
left: 0;
}
.floor-plan img {
padding: 0;
}
.rooms a {
text-decoration: underline;
}
hr.slim {
margin-top: 1.3ex;
margin-bottom: 1ex;
}
{% endblock %}
{% block bodyAttrs %}onload="automaticarrow(); checkParams();"{% endblock %}
{% block content %}
{% origin %}
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12" >
{% include "meeting/meeting_heading.html" with selected="floor-plan" title_extra="Floor Plan" %}
</div>
</div>
<div class="row">
<div class="col-md-12">
{% for floor in floors %}
<div class="anchor-target" id="{{floor.name|xslugify}}"></div>
<h3>{{ floor.name }}</h3>
<div class="floor-plan">
{% if floor.image %}
<img id="{{floor.name|xslugify}}-image" class="col-md-12 col-sm-12 col-xs-12" src="{{ floor.image.url }}" >
<!-- We need as many of these as we can have individual rooms combining into one -->
<div id="{{floor.name|xslugify}}-arrowdiv0" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
<div id="{{floor.name|xslugify}}-arrowdiv1" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
<div id="{{floor.name|xslugify}}-arrowdiv2" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
<div id="{{floor.name|xslugify}}-arrowdiv3" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
{% else %}
No floor image available yet.
{% endif %}
</div>
<div class="rooms small">
{% for f in floors %}
{% for room in f.room_set.all %}
<a href="javascript: setarrow('{{room.name|xslugify}}')">{{ room.name|nbsp }}</a> 
{% endfor %}
{% endfor %}
<hr class="slim">
{% for f in floors %}
{% for room in f.room_set.all %}
{% if room.functional_display_name %}
<a href="javascript: setarrow('{{room.name|xslugify}}')">{{ room.functional_display_name|nbsp }}</a> 
{% endif %}
{% endfor %}
{% endfor %}
</div>
<div class="row"></div>
{% endfor %}
</div>
</div>
{% endblock %}
{% block js %}
<script src="{% static 'ietf/js/room_params.js' %}"></script>
<script>
// These must match the 'arrowdiv' divs above
var arrowsuffixlist = [ '0', '1', '2', '3' ];
var floorlist = [{% for floor in floors %}{% if not forloop.first %}, {%endif%}'{{floor.name|xslugify}}'{% endfor %}];
function roommap(nm)
{
var c = findroom(nm);
if (c) return nm;
var m = suffixmap(nm);
// alert("m=" + m);
return m;
}
function findroom(nm)
{
var left = 0, top = 0, right = 0, bottom = 0, floor="", width=0;
if (0) { }
{% for room in meeting.room_set.all %}{% if room.floorplan %}
else if (nm == '{{room.name|xslugify}}') { left = {{room.left}}; top = {{room.top}}; right = {{room.right}}; bottom = {{room.bottom}}; floor='{{room.floorplan.name|xslugify}}'; width={{room.floorplan.image.width}}; }{% endif %}{% endfor %}
{% for room in meeting.room_set.all %}{% if room.functional_display_name %}{% if room.floorplan %}
else if (nm == '{{room.functional_name|xslugify}}') { left = {{room.left}}; top = {{room.top}}; right = {{room.right}}; bottom = {{room.bottom}}; floor='{{room.floorplan.name|xslugify}}'; width={{room.floorplan.image.width}}; }{% endif %}{% endif %}{% endfor %}
else return null;
// alert("nm=" + nm + ",left=" + left + ",top=" + top + ",r=" + right + ",b=" + bottom);
return [left, top, right, bottom, floor, width];
}
</script>
{% endblock %}