Skip to content

Commit

Permalink
Update tooltips to user new API
Browse files Browse the repository at this point in the history
Also remove old bower dep and installed the peer dependency required for
ember-tooltips
  • Loading branch information
jrjohnson committed Jun 16, 2016
1 parent e9f944e commit 9eed131
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
5 changes: 1 addition & 4 deletions app/components/detail-terms-list-item.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import Ember from 'ember';

const { Component, computed } = Ember;
const { Component } = Ember;

export default Component.extend({
tagName: 'li',
canEdit: false,
term: null,
tooltipContent: computed('term.description', function() {
return this.get('term.description');
}),
click: function() {
if (this.get('canEdit')) {
let term = this.get('term');
Expand Down
4 changes: 0 additions & 4 deletions app/components/selectable-terms-list-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ export default Component.extend({
return selectedTerms.contains(term);
}),

tooltipContent: computed('term.description', function() {
return this.get('term.description');
}),

click: function() {
let term = this.get('term');
if (this.get('isSelected')) {
Expand Down
5 changes: 5 additions & 0 deletions app/templates/components/detail-terms-list-item.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{#if term.description.length}}
{{#tooltip-on-component}}
{{term.description}}
{{/tooltip-on-component}}
{{/if}}
{{#if term.isTopLevel}}
{{term.title}}
{{else}}
Expand Down
5 changes: 5 additions & 0 deletions app/templates/components/selectable-terms-list-item.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{{#if term.description.length}}
{{#tooltip-on-component}}
{{term.description}}
{{/tooltip-on-component}}
{{/if}}
{{term.title}}
<span class="actions">
{{#if isSelected}}
Expand Down
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"blanket": "~1.1.7",
"lodash": "~4.0.0",
"Faker": "~3.0.1",
"tooltipster": "~3.3.0",
"font-awesome": "~4.5.0",
"pikaday": "~1.3.3",
"moment": ">= 2.8.0",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"ember-cli-deploy-s3-index": "0.5.0",
"ember-cli-deprecation-workflow": "0.2.2",
"ember-cli-flash": "1.3.15",
"ember-font-awesome": "2.1.1",
"ember-cli-htmlbars": "^1.0.3",
"ember-cli-htmlbars-inline-precompile": "^0.3.1",
"ember-cli-inject-live-reload": "^1.4.0",
Expand All @@ -64,6 +63,7 @@
"ember-cp-validations": "2.9.3",
"ember-data": "^2.6.0",
"ember-export-application-global": "^1.0.5",
"ember-font-awesome": "2.1.1",
"ember-froala": "2.3.2",
"ember-i18n": "4.2.1",
"ember-i18n-cp-validations": "2.5.0",
Expand All @@ -82,6 +82,7 @@
"ember-rl-dropdown": "0.7.0",
"ember-simple-auth": "1.1.0",
"ember-simple-auth-token": "1.1.1",
"ember-tether": "0.3.1",
"ember-tooltips": "1.0.0",
"ember-truth-helpers": "1.2.0",
"ember-watson": "^0.8.0",
Expand Down

0 comments on commit 9eed131

Please sign in to comment.