Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Commit

Permalink
Use new ember-tooltips method for creating tooltips
Browse files Browse the repository at this point in the history
Events needed to get a top level element otherwise the tip wasn't
hovering over the event.  Probably because the location gets bounced
around by the style too much.
  • Loading branch information
jrjohnson committed Jun 17, 2016
1 parent 1f969f0 commit 27993a7
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 43 deletions.
3 changes: 3 additions & 0 deletions addon/templates/components/ilios-calendar-event-month.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{{#if event}}
{{#tooltip-on-component}}
{{{tooltipContent}}}
{{/tooltip-on-component}}
{{#if recentlyUpdated}}
{{fa-icon 'exclamation' class="recently-updated-icon"}}
{{/if}}
Expand Down
87 changes: 46 additions & 41 deletions addon/templates/components/ilios-calendar-event.hbs
Original file line number Diff line number Diff line change
@@ -1,50 +1,55 @@
{{#if event}}
{{#if recentlyUpdated}}
{{fa-icon 'exclamation-circle' class="recently-updated-icon"}}
{{/if}}

{{#unless isMonth}}
{{#if event.isScheduled}}
{{fa-icon 'files-o'}}
{{/if}}
{{/unless}}

<span class='ilios-calendar-event-time'>
{{#if isIlm}}
<span class='ilios-calendar-event-start'>
ILM - Due: {{moment-format event.startDate 'h:mma'}}
</span>
{{else}}
<span class='ilios-calendar-event-start'>
{{moment-format event.startDate 'h:mma'}}
</span>
<span class='ilios-calendar-event-end'>
- {{moment-format event.endDate 'h:mma'}}
</span>
<div>
{{#tooltip-on-element}}
{{{tooltipContent}}}
{{/tooltip-on-element}}
{{#if recentlyUpdated}}
{{fa-icon 'exclamation-circle' class="recently-updated-icon"}}
{{/if}}
</span>

{{#unless event.isMulti}}
<span class='ilios-calendar-event-location'>
{{#if event.location.length}}
{{event.location}}:
{{#unless isMonth}}
{{#if event.isScheduled}}
{{fa-icon 'files-o'}}
{{/if}}
{{/unless}}

<span class='ilios-calendar-event-time'>
{{#if isIlm}}
<span class='ilios-calendar-event-start'>
ILM - Due: {{moment-format event.startDate 'h:mma'}}
</span>
{{else}}
<span class='ilios-calendar-event-start'>
{{moment-format event.startDate 'h:mma'}}
</span>
<span class='ilios-calendar-event-end'>
- {{moment-format event.endDate 'h:mma'}}
</span>
{{/if}}
</span>
{{/unless}}

<span class='ilios-calendar-event-name'>
{{event.name}}{{#if event.isMulti}}, <em>{{multiplePhrase}}</em>{{/if}}
</span>
{{! list instructors in day view, if available }}
{{#if isDay}}
{{#if event.instructors}}
<span class="ilios-calendar-event-instructors">
{{taughtByPhrase}}
{{formattedInstructors}}
{{#unless event.isMulti}}
<span class='ilios-calendar-event-location'>
{{#if event.location.length}}
{{event.location}}:
{{/if}}
</span>
{{/unless}}

<span class='ilios-calendar-event-name'>
{{event.name}}{{#if event.isMulti}}, <em>{{multiplePhrase}}</em>{{/if}}
</span>
{{! list instructors in day view, if available }}
{{#if isDay}}
{{#if event.instructors}}
<span class="ilios-calendar-event-instructors">
{{taughtByPhrase}}
{{formattedInstructors}}
</span>
{{/if}}
{{#if event.courseTitle}}
<span class="ilios-calendar-event-coursetitle">{{event.courseTitle}}</span>
{{/if}}
{{/if}}
{{#if event.courseTitle}}
<span class="ilios-calendar-event-coursetitle">{{event.courseTitle}}</span>
{{/if}}
{{/if}}
</div>
{{/if}}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@
"ember-load-initializers": "^0.5.1",
"ember-moment": "6.1.0",
"ember-resolver": "^2.0.3",
"ember-tooltips": "^0.7.0",
"loader.js": "^4.0.1"
"ember-tether": "0.3.1",
"ember-tooltips": "1.0.0",
"ember-try": "~0.0.8",
"loader.js": "^4.0.0"
},
"keywords": [
"ember-addon"
Expand Down

0 comments on commit 27993a7

Please sign in to comment.