WebCommitView: Add a state display

This adds a div in the webview to display the current commit
state. It allows us to notify the user of new commits by
showing something in the webview, rather than a modal
dialog.
This commit is contained in:
Pieter de Bie
2008-10-28 23:42:22 +01:00
parent e232181fae
commit 90db001409
8 changed files with 61 additions and 10 deletions
+14
View File
@@ -12,9 +12,23 @@ var showNewFile = function(file)
diff.style.display = '';
}
var hideState = function() {
$("state").style.display = "none";
}
var setState = function(state) {
$("state").style.display = "";
$("diff").style.display = "none";
$("state").innerHTML = state.escapeHTML();
}
var showFileChanges = function(file, cached) {
if (!file)
return;
$("diff").style.display = 'none';
hideNotification();
hideState();
if (file.status == 0) // New file?
return showNewFile(file);