summaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/archweb.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/media/archweb.js b/media/archweb.js
index b2f3af2a..b7351878 100644
--- a/media/archweb.js
+++ b/media/archweb.js
@@ -154,3 +154,26 @@ function todolist_flag() {
});
return false;
}
+
+/* signoffs.html */
+function signoff_package() {
+ var link = this;
+ $.getJSON(link.href, function(data) {
+ if (data.created) {
+ var signoff = $('<li>').addClass('signed-username').text(data.user);
+ $(link).append(signoff);
+ }
+ /* update the approved column to reflect reality */
+ if (data.approved) {
+ var approved = $(link).closest('tr').children('.signoff-no');
+ approved.text('Yes').addClass(
+ 'signoff-yes').removeClass('signoff-no');
+ } else {
+ var approved = $(link).closest('tr').children('.signoff-yes');
+ approved.text('No').addClass(
+ 'signoff-no').removeClass('signoff-yes');
+ }
+ $('.results').trigger('updateCell', approved);
+ });
+ return false;
+}