Add notification that clipboard copy was successful
This commit is contained in:
parent
2b1dfe5172
commit
94cba8a0bc
3 changed files with 58 additions and 0 deletions
|
@ -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';
|
||||
|
|
Reference in a new issue