[/admin/plugins] remove progress history

This commit is contained in:
Marcel Klehr 2013-01-24 23:00:56 +01:00
parent 23dd4c73e2
commit 3e793b8a63
3 changed files with 2 additions and 19 deletions

View file

@ -118,13 +118,6 @@ td, th {
position: absolute; position: absolute;
bottom: 50px; bottom: 50px;
} }
#progress .historylink {
float: right;
}
#progress .history {
white-space: pre;
font-family: monospace;
}
.settings { .settings {
margin-top:10px; margin-top:10px;
width:100%; width:100%;

View file

@ -68,10 +68,6 @@ $(document).ready(function () {
} }
search(); search();
}); });
$('#progress .showhistory').unbind('click').click(function() {
$("#progress .history").toggle()
});
} }
updateHandlers(); updateHandlers();
@ -79,25 +75,22 @@ $(document).ready(function () {
socket.on('progress', function (data) { socket.on('progress', function (data) {
if (data.progress > 0 && $('#progress').data('progress') > data.progress) return; if (data.progress > 0 && $('#progress').data('progress') > data.progress) return;
$("#progress .history").hide();
$("#progress").show(); $("#progress").show();
$('#progress').data('progress', data.progress); $('#progress').data('progress', data.progress);
var message = "Unknown status"; var message = "Unknown status";
if (data.message) { if (data.message) {
message = "<span class='status'>" + data.message.toString() + "</span>"; message = data.message.toString();
} }
if (data.error) { if (data.error) {
data.progress = 1; data.progress = 1;
} }
$("#progress .message").html(message); $("#progress .message").html(message);
$("#progress .history").append("<div>" + message + "</div>");
if (data.progress >= 1) { if (data.progress >= 1) {
$("#progress").hide(); $("#progress").hide();
$("#progress .history").html('');
if (data.error) { if (data.error) {
alert('An error occurred: '+data.error+' -- the server log might know more...'); alert('An error occurred: '+data.error+' -- the server log might know more...');

View file

@ -24,10 +24,7 @@
<li><a href="settings">Settings</a> </li> <li><a href="settings">Settings</a> </li>
<li><a href="plugins/info">Troubleshooting information</a> </li> <li><a href="plugins/info">Troubleshooting information</a> </li>
<div id="progress"> <div id="progress"><img src="../static/img/loading.gif" alt=""/>&nbsp;&nbsp;<span class="message"></span></div>
<p><img src="../static/img/loading.gif" alt=""/>&nbsp;&nbsp;<span class="message"></span> <a class="showhistory" href="javascript:void(0)">(show&nbsp;progress)</a></p>
<div class="history"></div>
</div>
</div> </div>
<div class="innerwrapper"> <div class="innerwrapper">