diff --git a/resources/assets/javascripts/bootstrap/copyable_links.js b/resources/assets/javascripts/bootstrap/copyable_links.js index 521eae4c5ff75e84dc36ad5400375a6d6825a5f8..b4f6fc6327232da6b56e5df4ef2b96603c862f6b 100644 --- a/resources/assets/javascripts/bootstrap/copyable_links.js +++ b/resources/assets/javascripts/bootstrap/copyable_links.js @@ -16,24 +16,8 @@ $(document).on('click', 'a.copyable-link', function (event) { document.execCommand('Copy'); dummy.remove(); - // Show visual hint using a deferred (this way we don't need to - // duplicate the functionality in the done() handler) - (new Promise((resolve, reject) => { - let confirmation = $('<div class="copyable-link-confirmation copyable-link-success">'); - confirmation.text($gettext('Link wurde kopiert')); - confirmation.insertBefore('#content'); - - // Resolve deferred when animation has ended or after 2 seconds as a - // fail safe - let timeout = setTimeout(() => { - $(this).parent().off('animationend'); - resolve(confirmation); - }, 1500); - $(this).parent().one('animationend', () => { - clearTimeout(timeout); - resolve(confirmation); - }); - })).then((confirmation, parent) => { - confirmation.remove(); - }); + STUDIP.eventBus.emit( + 'push-system-notification', + { type: 'success', message: $gettext('Link wurde kopiert') } + ); }); diff --git a/resources/assets/stylesheets/scss/copyable-links.scss b/resources/assets/stylesheets/scss/copyable-links.scss deleted file mode 100644 index f5ff73a92279a4913e47ecf95f5d62c2a03083c5..0000000000000000000000000000000000000000 --- a/resources/assets/stylesheets/scss/copyable-links.scss +++ /dev/null @@ -1,24 +0,0 @@ -.copyable-link-confirmation { - position: fixed; - bottom: 60px; - right: 12px; - height: 60px; - line-height: 60px; - max-width: calc(100% - 140px); - z-index: 42000; - border: solid thin var(--content-color-40); - background-color: var(--white); - background-repeat: no-repeat; - background-position: 1em center; - background-size: 100px; - box-shadow: 5px 5px var(--dark-gray-color-10); - padding: 5px 100px; - transition: transform .5s ease; - - &.copyable-link-success { - @include background-icon(check-circle, status-green, 24); - } - &.copyable-link-error { - @include background-icon(decline-circle, status-red, 24); - } -} diff --git a/resources/assets/stylesheets/studip.scss b/resources/assets/stylesheets/studip.scss index a322400ecb67c4317a39b6096a2c733f9bde38e0..bf4022a96ea8c51b48fde7013f5d64991f114723 100644 --- a/resources/assets/stylesheets/studip.scss +++ b/resources/assets/stylesheets/studip.scss @@ -32,7 +32,6 @@ @import "scss/contents"; @import "scss/content"; @import "scss/comments"; -@import "scss/copyable-links"; @import "scss/cronjobs"; @import "scss/coursewizard"; @import "scss/css_tree";