From e2992d08bbdeea8a0fa62e0441dbdb24ce363b1d Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 9 May 2014 17:23:35 -0400 Subject: [PATCH] Further JS fixes --- static/js/app.js | 2 +- static/js/controllers.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/app.js b/static/js/app.js index 8d6869978..9c701d62a 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -84,7 +84,7 @@ function createOrganizationTeam(ApiService, orgname, teamname, callback) { 'teamname': teamname }; - ApiService.updateOrganizationTeam(data, params).then(callback, function() { + ApiService.updateOrganizationTeam(data, params).then(callback, function(resp) { bootbox.dialog({ "message": resp.data ? resp.data : 'The team could not be created', "title": "Cannot create team", diff --git a/static/js/controllers.js b/static/js/controllers.js index 2b2c4225e..e32c0797a 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -4,11 +4,16 @@ $.fn.clipboardCopy = function() { clip.on('complete', function() { // Resets the animation. var elem = $('#clipboardCopied')[0]; + if (!elem) { + return; + } + elem.style.display = 'none'; elem.classList.remove('animated'); // Show the notification. setTimeout(function() { + if (!elem) { return; } elem.style.display = 'inline-block'; elem.classList.add('animated'); }, 10);