Fix a couple of bugs that crept in.

This commit is contained in:
Simon MacMullen 2010-09-29 16:56:03 +01:00
parent 0581c41b32
commit 8fcb648685
2 changed files with 6 additions and 4 deletions

View File

@ -147,7 +147,7 @@ function set_timer_interval(interval) {
timer_interval = interval;
clearInterval(timer);
if (timer_interval != null) {
timer = setInterval('update()', timer_interval);
timer = setInterval('partial_update()', timer_interval);
}
}
@ -155,10 +155,10 @@ function render(reqs, template, highlight) {
current_template = template;
current_reqs = reqs;
current_highlight = highlight;
render0();
update();
}
function render0() {
function update() {
clearInterval(timer);
with_update(current_reqs, [], function(html) {
replace_content('main', html);
@ -167,7 +167,7 @@ function render0() {
});
}
function update() {
function partial_update() {
if ($('.updatable').length > 0) {
with_update(current_reqs, [], function(html) {
replace_content('scratch', html);

View File

@ -1,5 +1,7 @@
<h1>User: <b><%= user.name %></b></h1>
<p>Administrator: <%= fmt_boolean(user.administrator) %></p>
<%= format('permissions', {'mode': 'user', 'permissions': permissions, 'vhosts': vhosts, 'parent': user}) %>
<div class="section-hidden">