Commit 80d942c2 authored by Leigh Stoller's avatar Leigh Stoller

Move the status/instruction panel chevrons to the left where they are

supposed to be, and add handlers to toggle the icons.
parent 022277c5
......@@ -325,9 +325,27 @@ $(function ()
// Reset to status message.
$('#status_message').html(status_message);
});
// Chevron toggle handlers
$('#profile_status_collapse, #profile_instructions_collapse')
.on('show.bs.collapse', function (event) {
var id = $(this).data("chevron");
$('#' + id + ' .glyphicon')
.removeClass("glyphicon-chevron-right")
.addClass("glyphicon-chevron-down");
})
.on('hide.bs.collapse', function (event) {
var id = $(this).data("chevron");
$('#' + id + ' .glyphicon')
.removeClass("glyphicon-chevron-down")
.addClass("glyphicon-chevron-right");
});
if (instanceStatus == "ready") {
$('#profile_status_collapse').trigger('hide.bs.collapse');
}
else {
$('#profile_status_collapse').trigger('show.bs.collapse');
}
$('#instructions').on('hide.bs.collapse', function () {
APT_OPTIONS.updatePage({ 'status_instructions': 'hidden' });
......
......@@ -42,13 +42,13 @@ pre {
<a data-toggle="collapse" id="profile_status_toggle"
href="#profile_status_collapse">
<span id='status_message'></span>
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<span class="glyphicon glyphicon-chevron-right pull-left"
style="margin-right: 5px;"></span>
</a>
</h5>
</div>
<div id="profile_status_collapse"
class="panel-collapse collapse
<% if (status_panel_show) { %>in<% } %>">
<div id="profile_status_collapse" data-chevron="profile_status_toggle"
class="panel-collapse collapse">
<div class='panel-body'>
<table class='table table-condensed nospaceafter border-none'>
<!-- The spinner will start out invisible -->
......@@ -435,12 +435,16 @@ pre {
<div class="panel panel-info">
<div class="panel-heading">
<h5>
<a data-toggle="collapse" href="#instructions">Profile Instructions
<span class="glyphicon glyphicon-chevron-right pull-right"></span>
<a data-toggle="collapse" id="profile_instructions_toggle"
href="#profile_instructions_collapse">Profile Instructions
<span class="glyphicon glyphicon-chevron-right pull-left"
style="margin-right: 5px;"></span>
</a>
</h5>
</div>
<div id="instructions" class="panel-collapse collapse">
<div id="profile_instructions_collapse"
data-chevron="profile_instructions_toggle"
class="panel-collapse collapse">
<div class="panel-body">
<div id="instructions_text"></div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment