Add notification that clipboard copy was successful

This commit is contained in:
Joseph Schorr 2013-09-27 16:28:21 -04:00
parent 2b1dfe5172
commit 94cba8a0bc
3 changed files with 58 additions and 0 deletions

View file

@ -45,6 +45,16 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
$scope.currentTag = repo.tags[tag] || repo.tags['latest'];
var clip = new ZeroClipboard($('#copyClipboard'), { 'moviePath': 'static/js/ZeroClipboard.swf' });
clip.on('complete', function() {
// Resets the animation.
var elem = $('#clipboardCopied')[0];
elem.style.display = 'none';
// Show the notification.
setTimeout(function() {
elem.style.display = 'block';
}, 1);
});
}, function() {
$scope.repo = null;
$rootScope.title = 'Unknown Repository';