Usability: highlight the link that the currently-shown chart config popup relates to, and make a second click close the popup.
This commit is contained in:
parent
3f8324892a
commit
5913198ddd
|
|
@ -130,6 +130,8 @@ div.form-popup-rate-options {
|
||||||
z-index: 1; position: absolute; right: 35px; padding: 15px; background: white; border-left: 1px solid #ccc; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; border-radius: 10px 0 0 10px; -moz-border-radius: 10px 0 0 10px;
|
z-index: 1; position: absolute; right: 35px; padding: 15px; background: white; border-left: 1px solid #ccc; border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; border-radius: 10px 0 0 10px; -moz-border-radius: 10px 0 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.popup-owner { background: #eee; padding: 5px; border-radius: 3px; -moz-border-radius: 3px; }
|
||||||
|
|
||||||
p.status-error, p.warning { margin: 20px; padding: 15px; border-radius: 10px; -moz-border-radius: 10px; text-align: center; font-weight: bold; }
|
p.status-error, p.warning { margin: 20px; padding: 15px; border-radius: 10px; -moz-border-radius: 10px; text-align: center; font-weight: bold; }
|
||||||
|
|
||||||
.highlight { min-width: 120px; font-size: 120%; text-align:center; padding:10px; background-color: #ddd; margin: 0 20px 0 0; color: #888; border-radius: 10px; -moz-border-radius: 10px; }
|
.highlight { min-width: 120px; font-size: 120%; text-align:center; padding:10px; background-color: #ddd; margin: 0 20px 0 0; color: #888; border-radius: 10px; -moz-border-radius: 10px; }
|
||||||
|
|
|
||||||
|
|
@ -613,7 +613,7 @@ function rates_chart_or_text(id, stats, items, chart_fmt, text_fmt, chart_rates,
|
||||||
var mode = get_pref('rate-mode-' + id);
|
var mode = get_pref('rate-mode-' + id);
|
||||||
var range = get_pref('chart-range-' + id);
|
var range = get_pref('chart-range-' + id);
|
||||||
var prefix = '<h3>' + heading +
|
var prefix = '<h3>' + heading +
|
||||||
' <span class="rate-options" for="'
|
' <span class="rate-options" title="Click to change" for="'
|
||||||
+ id + '">(' + prefix_title(mode, range) + ')</span>' +
|
+ id + '">(' + prefix_title(mode, range) + ')</span>' +
|
||||||
(heading_help == undefined ? '' :
|
(heading_help == undefined ? '' :
|
||||||
' <span class="help" id="' + heading_help + '"></span>') +
|
' <span class="help" id="' + heading_help + '"></span>') +
|
||||||
|
|
@ -632,7 +632,7 @@ function rates_chart_or_text(id, stats, items, chart_fmt, text_fmt, chart_rates,
|
||||||
else {
|
else {
|
||||||
res = '<p>Currently idle</p>';
|
res = '<p>Currently idle</p>';
|
||||||
}
|
}
|
||||||
return prefix + res;
|
return prefix + '<div class="updatable">' + res + '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function prefix_title(mode, range) {
|
function prefix_title(mode, range) {
|
||||||
|
|
|
||||||
|
|
@ -415,7 +415,10 @@ function show_popup(type, text, mode) {
|
||||||
else {
|
else {
|
||||||
$(cssClass).center().slideDown(200);
|
$(cssClass).center().slideDown(200);
|
||||||
}
|
}
|
||||||
$(cssClass + ' span').click(hide);
|
$(cssClass + ' span').click(function () {
|
||||||
|
$('.popup-owner').removeClass('popup-owner');
|
||||||
|
hide();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function postprocess() {
|
function postprocess() {
|
||||||
|
|
@ -465,8 +468,19 @@ function postprocess() {
|
||||||
help($(this).attr('id'))
|
help($(this).attr('id'))
|
||||||
});
|
});
|
||||||
$('.rate-options').die().live('click', function() {
|
$('.rate-options').die().live('click', function() {
|
||||||
|
var remove = $('.popup-owner').length == 1 &&
|
||||||
|
$('.popup-owner').get(0) == $(this).get(0);
|
||||||
|
$('.popup-owner').removeClass('popup-owner');
|
||||||
|
if (remove) {
|
||||||
|
$('.form-popup-rate-options').fadeOut(200, function() {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(this).addClass('popup-owner');
|
||||||
show_popup('rate-options', format('rate-options', {span: $(this)}),
|
show_popup('rate-options', format('rate-options', {span: $(this)}),
|
||||||
'fade');
|
'fade');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
$('input, select').live('focus', function() {
|
$('input, select').live('focus', function() {
|
||||||
update_counter = 0; // If there's interaction, reset the counter.
|
update_counter = 0; // If there's interaction, reset the counter.
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,12 @@
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="hider updatable">
|
<div class="hider">
|
||||||
<% if (statistics_level == 'fine') { %>
|
<% if (statistics_level == 'fine') { %>
|
||||||
<%= message_rates('msg-rates-ch', channel.message_stats) %>
|
<%= message_rates('msg-rates-ch', channel.message_stats) %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<div class="updatable">
|
||||||
<h3>Details</h3>
|
<h3>Details</h3>
|
||||||
<table class="facts">
|
<table class="facts">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -68,6 +69,8 @@
|
||||||
<td><%= fmt_idle_long(channel) %></td>
|
<td><%= fmt_idle_long(channel) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="hider updatable">
|
<div class="hider">
|
||||||
<%= data_rates('data-rates-conn', connection, 'Data rates') %>
|
<%= data_rates('data-rates-conn', connection, 'Data rates') %>
|
||||||
|
|
||||||
|
<div class="updatable">
|
||||||
<h3>Details</h3>
|
<h3>Details</h3>
|
||||||
<table class="facts">
|
<table class="facts">
|
||||||
<% if (nodes_interesting) { %>
|
<% if (nodes_interesting) { %>
|
||||||
|
|
@ -59,6 +60,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
<h1>Exchange: <b><%= fmt_exchange(exchange.name) %></b></h1>
|
<h1>Exchange: <b><%= fmt_exchange(exchange.name) %></b></h1>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<div class="hider updatable">
|
<div class="hider">
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<% if (statistics_level == 'fine') { %>
|
<% if (statistics_level == 'fine') { %>
|
||||||
<%= message_rates('msg-rates-x', exchange.message_stats) %>
|
<%= message_rates('msg-rates-x', exchange.message_stats) %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<div class="updatable">
|
||||||
<h3>Details</h3>
|
<h3>Details</h3>
|
||||||
<table class="facts">
|
<table class="facts">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -30,6 +31,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% if (statistics_level == 'fine') { %>
|
<% if (statistics_level == 'fine') { %>
|
||||||
<div class="section-hidden">
|
<div class="section-hidden">
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<% } %>
|
<% } %>
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>Totals</h2>
|
<h2>Totals</h2>
|
||||||
<div class="hider updatable">
|
<div class="hider">
|
||||||
<% if (overview.statistics_db_node != 'not_running') { %>
|
<% if (overview.statistics_db_node != 'not_running') { %>
|
||||||
<%= queue_lengths('lengths-over', overview.queue_totals) %>
|
<%= queue_lengths('lengths-over', overview.queue_totals) %>
|
||||||
<% if (statistics_level == 'fine') { %>
|
<% if (statistics_level == 'fine') { %>
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
Totals not available
|
Totals not available
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<div class="updatable">
|
||||||
<h3>Global counts <span class="help" id="resource-counts"></span></h3>
|
<h3>Global counts <span class="help" id="resource-counts"></span></h3>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
|
|
@ -43,6 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% } %>
|
<% } %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,13 @@
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="hider updatable">
|
<div class="hider">
|
||||||
<%= queue_lengths('lengths-q', queue) %>
|
<%= queue_lengths('lengths-q', queue) %>
|
||||||
<% if (statistics_level == 'fine') { %>
|
<% if (statistics_level == 'fine') { %>
|
||||||
<%= message_rates('msg-rates-q', queue.message_stats) %>
|
<%= message_rates('msg-rates-q', queue.message_stats) %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<div class="updatable">
|
||||||
<h3>Details</h3>
|
<h3>Details</h3>
|
||||||
<table class="facts">
|
<table class="facts">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -105,6 +106,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% if (statistics_level == 'fine') { %>
|
<% if (statistics_level == 'fine') { %>
|
||||||
<div class="section-hidden">
|
<div class="section-hidden">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue