Skip to content

Commit 5ec7fe2

Browse files
committed
Made the buttons smarter.
1 parent 899eb89 commit 5ec7fe2

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

ncldDump/ncldDump_template.html

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<li>netcdf {{ filePath|e }} {
2222
<ul>
2323
{%- if dimensions is defined %}
24-
<li>dimensions: // <a href="#dimensions_list" class="btn btn-default btn-xs" data-toggle="collapse">&darr;</a>
24+
<li>dimensions: // <a href="#dimensions_list" class="btn btn-default btn-xs" data-toggle="collapse" altText="&darr;">&uarr;</a>
2525
<ul class="collapse in" id="dimensions_list">
2626
{%- for dimension in dimensions %}
2727
<li>{{ dimension.name|e }}&nbsp;=&nbsp;{{ dimension.value|e }} ;
@@ -32,7 +32,7 @@
3232
</li>
3333
{%- endif %}
3434
{%- if variables is defined %}
35-
<li>variables: // <a href="#variables_list" class="btn btn-default btn-xs" data-toggle="collapse">&darr;</a>
35+
<li>variables: // <a href="#variables_list" class="btn btn-default btn-xs" data-toggle="collapse" altText="&darr;">&uarr;</a>
3636
<ul class="collapse in" id="variables_list">
3737
{%- for variable in variables %}
3838
<li id="variable_{{ variable.name }}">{{ variable.type|e }}&nbsp;
@@ -44,7 +44,7 @@
4444
{%- if variable.dimensions is defined -%}
4545
({{ variable.dimensions|join(', ')|e }})
4646
{%- endif -%}
47-
&nbsp;; // <a href="#variable_{{ variable.name }}_attrs" class="btn btn-default btn-xs" data-toggle="collapse">&darr;</a>
47+
&nbsp;; // <a href="#variable_{{ variable.name }}_attrs" class="btn btn-default btn-xs" data-toggle="collapse" altText="&darr;">&uarr;</a>
4848
{%- if variable.attributes is defined %}
4949
<ul class="collapse in" id="variable_{{ variable.name }}_attrs">
5050
{%- for attribute in variable.attributes %}
@@ -79,7 +79,7 @@
7979
{%- endif %}
8080
{%- if attributes is defined %}
8181
<br>
82-
<li>// global attributes: <a href="#attribute_list" class="btn btn-default btn-xs" data-toggle="collapse">&darr;</a>
82+
<li>// global attributes: <a href="#attribute_list" class="btn btn-default btn-xs" data-toggle="collapse" altText="&darr;">&uarr;</a>
8383
<ul class="collapse in" id="attribute_list">
8484
{%- for attribute in attributes %}
8585
<li>:
@@ -111,7 +111,13 @@
111111
</li>
112112
<li>}</li>
113113
</ul>
114-
<script>
114+
<script type='text/javascript'>
115+
$(".btn").click(function () {
116+
var curText = $(this).text();
117+
118+
$(this).text($(this).attr("altText"));
119+
$(this).attr("altText", curText);
120+
});
115121
</script>
116122
</body>
117123
</html>

0 commit comments

Comments
 (0)