[llvm-commits] [zorg] r125938 - /zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html
Daniel Dunbar
daniel at zuster.org
Fri Feb 18 08:45:03 PST 2011
Author: ddunbar
Date: Fri Feb 18 10:45:03 2011
New Revision: 125938
URL: http://llvm.org/viewvc/llvm-project?rev=125938&view=rev
Log:
llvmlab/dashboard: Tweak popups to include links to close them.
Modified:
zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html
Modified: zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html?rev=125938&r1=125937&r2=125938&view=diff
==============================================================================
--- zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html (original)
+++ zorg/trunk/llvmlab/llvmlab/ui/templates/dashboard.html Fri Feb 18 10:45:03 2011
@@ -26,6 +26,13 @@
target="_blank">{{ caller() }}</a>
{% endmacro %}
+{% macro close_popup_link(kind) %}
+<a href='#'
+ onclick='close_popup("{{ kind }}", event); return false;'
+ title='Close Popup'
+ target="_blank">{{ caller() }}</a>
+{% endmacro %}
+
{% macro phase_popup_cell(phase, phase_info, build) %}
{% if not build %}
{% set kind = "unknown" %}
@@ -71,10 +78,18 @@
{% block javascript %}
function show_content_in_popup(kind, content, event) {
+ var popup_holder = document.getElementById(kind + "_popup_holder");
var popup = document.getElementById(kind + "_popup");
popup.innerHTML = content;
- popup.style.display = "block";
+ popup_holder.style.display = "block";
+}
+
+function close_popup(kind) {
+ var popup_holder = document.getElementById(kind + "_popup_holder");
+ var popup = document.getElementById(kind + "_popup");
+ popup.innerHTML = "";
+ popup_holder.style.display = "none";
}
// Handler for phase onclick events.
@@ -298,28 +313,31 @@
</tr>
</table>
-<hr>
-
{# The div we use to include help popups. #}
-<div id="help_popup" style="display: none;"></div>
+<div id="help_popup_holder" style="display: none;">
+ {% call close_popup_link("help") %}(close) {% endcall %}
+ <div id="help_popup"></div>
+</div>
{# The iframe we use to load the help source. This is never actually
displayed, just used to load the HTML we insert into the popup div. #}
<iframe id="help_popup_frame" style="display: none;"></iframe>
-<hr>
-
{# The div we use to include phase popups. #}
-<div id="phase_popup" style="display: none;"></div>
+<div id="phase_popup_holder" style="display: none;">
+ {% call close_popup_link("phase") %}(close) {% endcall %}
+ <div id="phase_popup"></div>
+</div>
{# The iframe we use to load the phase popup source. This is never actually
displayed, just used to load the HTML we insert into the popup div. #}
<iframe id="phase_popup_frame" style="display: none;"></iframe>
-<hr>
-
{# The div we use to include timing popups. #}
-<div id="timing_popup" style="display: none;">
- <canvas id="timing_graph" width="400" height="300"></canvas>
- <div id="timing_popup_legend"></div>
+<div id="timing_popup_holder" style="display: none;">
+ {% call close_popup_link("help") %}(close) {% endcall %}
+ <div id="timing_popup">
+ <canvas id="timing_graph" width="400" height="300"></canvas>
+ <div id="timing_popup_legend"></div>
+ </div>
</div>
{% endblock %}
More information about the llvm-commits
mailing list