Skip to content

Commit cd857c3

Browse files
committed
Fixed a bug in removing old blinking arrows. Added functional room names. Tweaked the font size of room names. Made the page switch to the right floor-plan for a given room.
- Legacy-Id: 11586
1 parent 769c6f6 commit cd857c3

2 files changed

Lines changed: 28 additions & 7 deletions

File tree

ietf/static/ietf/js/room_params.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ function roomcoords(nm)
6161
function setarrow(nm)
6262
// Place an arrow at the center of a given room name (or list of room names separated by "/").
6363
{
64+
for (var f = 0; f < floorlist.length; f++) {
65+
floor = floorlist[f];
66+
for (var i = 0; i < arrowsuffixlist.length; i++) {
67+
removearrow(arrowsuffixlist[i], floor);
68+
}
69+
}
70+
6471
for (var i = 0; i < arguments.length; i+=2) {
6572
nm = roommap(arguments[i]);
6673
if (verbose) alert("nm=" + nm);
@@ -75,9 +82,6 @@ function setarrow(nm)
7582
if (verbose) alert("left=" + left + ", top=" + top + ", right=" + right + ", bottom=" + bottom + ", floor=" + floor + ", width=" + width);
7683
//alert("left=" + left + ", top=" + top + ", right=" + right + ", bottom=" + bottom);
7784
// calculate arrow position
78-
for (var i = 0; i < arrowsuffixlist.length; i++) {
79-
removearrow(arrowsuffixlist[i], floor);
80-
}
8185
arrow_left = (left + (right - left) / 2 );
8286
arrow_top = (top + (bottom - top) / 2 );
8387
// scale the coordinates to match image scaling
@@ -92,6 +96,7 @@ function setarrow(nm)
9296
adiv.style.left = arrow_left + offsetleft + "px";
9397
adiv.style.top = arrow_top + offsettop + "px";
9498
adiv.style.visibility = "visible";
99+
window.location.hash = floor;
95100
}
96101
}
97102
}

ietf/templates/meeting/floor-plan.html

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@
2222
padding: 0;
2323
}
2424
.rooms a {
25+
2526
text-decoration: underline;
2627
}
28+
hr.slim {
29+
margin-top: 1.3ex;
30+
margin-bottom: 1ex;
31+
}
2732
{% endblock %}
2833

2934
{% block bodyAttrs %}onload="automaticarrow(); checkParams();" data-spy="scroll" data-target="#affix"{% endblock %}
@@ -53,9 +58,19 @@ <h3>{{ floor.name }}</h3>
5358
<div id="{{floor.name|slugify}}-arrowdiv2" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
5459
<div id="{{floor.name|slugify}}-arrowdiv3" style="position: absolute; left: 0; top: 67.5px; visibility: hidden;"><img id="arrow" src="{% static 'ietf/images/arrow-ani.gif' %}"></div>
5560
</div>
56-
<div class="rooms">
57-
{% for room in floor.room_set.all %}
58-
<a href="javascript: setarrow('{{room.name|slugify}}')">{{ room.name|nbsp }}</a>
61+
<div class="rooms small">
62+
{% for f in floors %}
63+
{% for room in f.room_set.all %}
64+
<a href="javascript: setarrow('{{room.name|slugify}}')">{{ room.name|nbsp }}</a>&ensp;
65+
{% endfor %}
66+
{% endfor %}
67+
<hr class="slim">
68+
{% for f in floors %}
69+
{% for room in f.room_set.all %}
70+
{% if room.functional_display_name %}
71+
<a href="javascript: setarrow('{{room.name|slugify}}')">{{ room.functional_display_name|nbsp }}</a>&ensp;
72+
{% endif %}
73+
{% endfor %}
5974
{% endfor %}
6075
</div>
6176
<div class="row"></div>
@@ -76,7 +91,8 @@ <h3>{{ floor.name }}</h3>
7691
<script src="{% static 'ietf/js/room_params.js' %}"></script>
7792
<script>
7893
// These must match the 'arrowdiv' divs above
79-
var arrowsuffixlist = [ '', '1', '2', '3' ];
94+
var arrowsuffixlist = [ '0', '1', '2', '3' ];
95+
var floorlist = [{% for floor in floors %}{% if not forloop.first %}, {%endif%}'{{floor.name|slugify}}'{% endfor %}];
8096

8197
function roommap(nm)
8298
{

0 commit comments

Comments
 (0)