Skip to content

Commit

Permalink
Merge pull request #8301 from michaelchadwick/remove-offering-url-dis…
Browse files Browse the repository at this point in the history
…play-render-modifier

Remove OfferingUrlDisplayComponent render modifier
  • Loading branch information
dartajax authored Jan 14, 2025
2 parents e672b32 + a828672 commit 90e4ef9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
1 change: 0 additions & 1 deletion packages/ilios-common/.lint-todo
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|0a8f8f3c4ad64455e02
add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|fab53a12bc25481f88028a380c2d467d682eee45|1731542400000|1762646400000|1793750400000|addon/components/offering-form.hbs
add|ember-template-lint|no-at-ember-render-modifiers|5|2|5|2|d6e466b5b7ca03528b0882253d26794d3a9aa6ca|1731542400000|1762646400000|1793750400000|addon/components/offering-form.hbs
add|ember-template-lint|no-at-ember-render-modifiers|26|14|26|14|e5d8b6826e05b980dca30d848c35171b24960c39|1731542400000|1762646400000|1793750400000|addon/components/offering-manager.hbs
add|ember-template-lint|no-at-ember-render-modifiers|12|6|12|6|9264ba2eca1f858819d7863757a2b23b353ace38|1731542400000|1762646400000|1793750400000|addon/components/offering-url-display.hbs
add|ember-template-lint|no-at-ember-render-modifiers|3|2|3|2|23cd787c79c34a628dadb6e96dd4004d42eebb79|1731542400000|1762646400000|1793750400000|addon/components/print-course.hbs
add|ember-template-lint|no-at-ember-render-modifiers|4|2|4|2|aa5aedc5b45db1644928b5b95c2fefc1ef4a7bdf|1731542400000|1762646400000|1793750400000|addon/components/print-course.hbs
add|ember-template-lint|no-at-ember-render-modifiers|12|4|12|4|5ba6894d30ea3a3eae704867d5bc5d61c5ee4e1f|1731542400000|1762646400000|1793750400000|addon/components/search-box.hbs
Expand Down
13 changes: 5 additions & 8 deletions packages/ilios-common/addon/components/offering-url-display.hbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
{{#if @url}}
<span
class="offering-url-display"
...attributes
>
<span class="offering-url-display" ...attributes>
<a title={{@url}} href={{@url}}>{{t "general.virtualSessionLink"}}</a>
<CopyButton
title={{t "general.copyLink"}}
@clipboardText={{@url}}
@success={{perform this.copy}}
class={{if this.copy.isRunning "copying"}}
{{did-insert (set this "copyButton")}}
id={{this.copyButtonId}}
data-test-copy-url
>
{{#if this.copy.isRunning}}
Expand All @@ -19,13 +16,13 @@
{{/if}}
</CopyButton>
</span>
{{#if (and this.copyButton this.copy.isRunning)}}
{{#if this.copy.isRunning}}
<IliosTooltip
@target={{this.copyButton}}
@target={{this.copyButtonElement}}
@options={{hash placement="right"}}
class="offering-url-display-success-message-tooltip"
>
{{t "general.copiedSuccessfully"}}
</IliosTooltip>
{{/if}}
{{/if}}
{{/if}}
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import Component from '@glimmer/component';
import { restartableTask, timeout } from 'ember-concurrency';
import { guidFor } from '@ember/object/internals';

export default class OfferingUrlDisplayComponent extends Component {
get copyButtonId() {
return `offering-url-display-copy-button-${guidFor(this)}`;
}

get copyButtonElement() {
return document.getElementById(this.copyButtonId);
}

copy = restartableTask(async () => {
await timeout(1500);
});
Expand Down

0 comments on commit 90e4ef9

Please sign in to comment.