X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0e847d07bd66e554822eb0854bbaee312eeba839..8dd93ce870df1f438fab7fceebe6abdec9763199:/apps/workbench/app/assets/javascripts/users.js diff --git a/apps/workbench/app/assets/javascripts/users.js b/apps/workbench/app/assets/javascripts/users.js index c9c69a0a64..565ea9cbd6 100644 --- a/apps/workbench/app/assets/javascripts/users.js +++ b/apps/workbench/app/assets/javascripts/users.js @@ -1,8 +1,19 @@ +// Copyright (C) The Arvados Authors. All rights reserved. +// +// SPDX-License-Identifier: AGPL-3.0 + $(document). + on('notifications:recount', + function() { + var menu = $('.notification-menu'); + n = $('.notification', menu).not('.empty').length; + $('.notification-count', menu).html(n>0 ? n : ''); + }). on('ajax:success', 'form.new_authorized_key', function(e, data, status, xhr) { - $(e.target).parents('div.daxalert').fadeOut('slow', function() { - $('
Key added.
Sorry, request failed.'); + error_div.html('
Sorry, request failed.
'); } error_div.show(); $($('input[name=disable_element]', e.target).val()).