Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addon/components/md-btn-dropdown.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { computed } from '@ember/object';
import layout from '../templates/components/md-btn-dropdown';
import MaterializeButton from './md-btn';
import jQuery from 'jquery';

export default MaterializeButton.extend({
layout,
Expand Down Expand Up @@ -30,7 +31,7 @@ export default MaterializeButton.extend({

_setupDropdown() {
// needed until the Materialize.dropdown plugin is replaced
this.$().attr('data-activates', this.get('_dropdownContentId'));
jQuery.attr('data-activates', this.get('_dropdownContentId'));
let options = {
hover: !!this.getWithDefault('hover', false),
// Ignore requireCamelCaseOrUpperCaseIdentifiers because the original
Expand All @@ -45,7 +46,7 @@ export default MaterializeButton.extend({
alignment: this.getWithDefault('alignment', 'left')
};

this.$().dropdown(options);
jQuery.dropdown(options);
},
_dropdownContentId: computed(function() {
return `${this.get('elementId')}-dropdown-content`;
Expand Down
7 changes: 4 additions & 3 deletions addon/components/md-card-collapsible.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { computed } from '@ember/object';
import Component from '@ember/component';
import layout from '../templates/components/md-card-collapsible';
import jQuery from 'jquery';

export default Component.extend({
layout,
Expand All @@ -20,12 +21,12 @@ export default Component.extend({

_setupCollapsible() {
const accordion = this.get('accordion');
this.$().collapsible({ accordion });
jQuery().collapsible({ accordion });
},

_teardownCollapsible() {
const $panelHeaders = this.$('> li > .collapsible-header');
this.$().off('click.collapse', '.collapsible-header');
const $panelHeaders = jQuery('> li > .collapsible-header');
jQuery().off('click.collapse', '.collapsible-header');
$panelHeaders.off('click.collapse');
},

Expand Down
5 changes: 3 additions & 2 deletions addon/components/md-input-date.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import $ from 'jquery';
import MaterializeInput from './md-input';
import layout from '../templates/components/md-input-date';
import jQuery from 'jquery';

const MONTH_NAMES = [
'January',
Expand Down Expand Up @@ -50,15 +51,15 @@ export default MaterializeInput.extend({
}
};

this.$('.datepicker').pickadate(
jQuery('.datepicker').pickadate(
$.extend(datePickerOptions, {
onSet: this._onDateSet
})
);
},

_teardownPicker() {
const $pickadate = this.$('.datepicker').data('pickadate');
const $pickadate = jQuery('.datepicker').data('pickadate');
if ($pickadate) {
$pickadate.stop();
}
Expand Down
5 changes: 3 additions & 2 deletions addon/components/md-input-field.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
import { isPresent } from '@ember/utils';
import jQuery from 'jquery';

export default Component.extend({
classNames: ['input-field'],
Expand Down Expand Up @@ -30,7 +31,7 @@ export default Component.extend({
this._super(...arguments);
// pad the errors element when an icon is present
if (isPresent(this.get('icon'))) {
this.$('> span').css('padding-left', '3rem');
jQuery('> span').css('padding-left', '3rem');
}
},

Expand All @@ -39,7 +40,7 @@ export default Component.extend({
}),

_setupLabel() {
const $label = this.$('> label');
const $label = jQuery('> label');
if (isPresent(this.get('value')) && !$label.hasClass('active')) {
$label.addClass('active');
}
Expand Down
3 changes: 2 additions & 1 deletion addon/components/md-navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Component from '@ember/component';
import { typeOf } from '@ember/utils';
import { scheduleOnce } from '@ember/runloop';
import layout from '../templates/components/md-navbar';
import jQuery from 'jquery';

export default Component.extend({
tagName: 'nav',
Expand All @@ -19,7 +20,7 @@ export default Component.extend({
_setupNavbar() {
if (typeOf($('.button-collapse').sideNav) === 'function') {
this.notifyPropertyChange('_sideNavId');
this.$('.button-collapse').sideNav({
jQuery('.button-collapse').sideNav({
closeOnClick: true
});
}
Expand Down
3 changes: 2 additions & 1 deletion addon/components/md-parallax.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Component from '@ember/component';
import layout from '../templates/components/md-parallax';
import jQuery from 'jquery';

export default Component.extend({
layout,
Expand All @@ -11,7 +12,7 @@ export default Component.extend({
},

_setupParallax() {
this.$('.parallax').parallax();
jQuery('.parallax').parallax();
}

// TODO: unregister any listeners that $.parallax() registers
Expand Down
9 changes: 5 additions & 4 deletions addon/components/md-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { later } from '@ember/runloop';
import { get, observer, computed } from '@ember/object';
import MaterializeInputField from './md-input-field';
import layout from '../templates/components/md-select';
import jQuery from 'jquery';

export default MaterializeInputField.extend({
layout,
Expand All @@ -26,7 +27,7 @@ export default MaterializeInputField.extend({

_setupSelect() {
// jscs: disable
this.$('select').material_select();
jQuery('select').material_select();
// jscs: enable
},

Expand All @@ -47,7 +48,7 @@ export default MaterializeInputField.extend({

_teardownSelect() {
// jscs: disable
this.$('select').material_select('destroy');
jQuery('select').material_select('destroy');
// jscs: enable
},

Expand All @@ -68,13 +69,13 @@ export default MaterializeInputField.extend({
// TODO: this could be converted to a computed property, returning a string
// that is bound to the class attribute of the inputSelector
errorsDidChange: observer('errors', function() {
const inputSelector = this.$('input');
const inputSelector = jQuery('input');
// monitor the select's validity and copy the appropriate validation class to the materialize input element.
if (!isNone(inputSelector)) {
later(
this,
function() {
const isValid = this.$('select').hasClass('valid');
const isValid = jQuery('select').hasClass('valid');
if (isValid) {
inputSelector.removeClass('invalid');
inputSelector.addClass('valid');
Expand Down
7 changes: 4 additions & 3 deletions addon/components/md-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { A } from '@ember/array';
import { observer, computed, get } from '@ember/object';
import ParentComponentSupport from 'ember-composability/mixins/parent-component-support';
import layout from '../templates/components/md-tabs';
import jQuery from 'jquery';

export default Component.extend(ParentComponentSupport, {
layout,
Expand Down Expand Up @@ -48,12 +49,12 @@ export default Component.extend(ParentComponentSupport, {
};

if (!animate) {
this.$('.indicator').css(cssParams);
jQuery('.indicator').css(cssParams);
} else {
this.$('.indicator1').velocity(cssParams, {
jQuery('.indicator1').velocity(cssParams, {
duration: 150
});
this.$('.indicator2').velocity(cssParams, {
jQuery('.indicator2').velocity(cssParams, {
duration: 150,
delay: 40
});
Expand Down
5 changes: 3 additions & 2 deletions addon/components/selectable-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { alias } from '@ember/object/computed';
import Component from '@ember/component';
import ChildComponentSupport from 'ember-composability/mixins/child-component-support';
import SelectableItemGroup from './selectable-item-group';
import jQuery from 'jquery';

export default Component.extend(ChildComponentSupport, {
// eslint-disable-next-line
Expand Down Expand Up @@ -35,12 +36,12 @@ export default Component.extend(ChildComponentSupport, {
isSelected: alias('_checked'),

_setupLabel() {
let [$input] = this.$(
let [$input] = jQuery(
'.materialize-selectable-item-input, .materialize-selectable-item-input-container input'
).toArray();

let inputId = $input ? $input.id : null;
this.$('.materialize-selectable-item-label').attr('for', inputId);
jQuery('.materialize-selectable-item-label').attr('for', inputId);
},

didInsertElement() {
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeBadge.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-badge}} has been deprecated. Please use {{md-badge}} instead', false, {
id: 'materialize-badge',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-button-submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeButtonSubmit.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-button-submit}} has been deprecated. Please use {{md-btn-submit}} instead', false, {
id: 'materialize-button-submit',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeButton.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-button}} has been deprecated. Please use {{md-btn}} instead', false, {
id: 'materialize-button',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-card-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeCardAction.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-card-action}} has been deprecated. Please use {{md-card-action}} instead', false, {
id: 'materialize-card-action',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-card-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeCardContent.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-card-content}} has been deprecated. Please use {{md-card-content}} instead', false, {
id: 'materialize-card-content',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-card-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeCardPanel.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-card-panel}} has been deprecated. Please use {{md-card-panel}} instead', false, {
id: 'materialize-card-panel',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-card-reveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeCardReveal.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-card-reveal}} has been deprecated. Please use {{md-card-reveal}} instead', false, {
id: 'materialize-card-reveal',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeCard.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-card}} has been deprecated. Please use {{md-card}} instead', false, {
id: 'materialize-card',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default materializeCheckbox.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-checkbox}} has been deprecated. Please use {{md-check}} instead', false, {
id: 'materialize-checkbox',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-checkboxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default materializeCheckboxes.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-checkboxes}} has been deprecated. Please use {{md-checks}} instead', false, {
id: 'materialize-checkboxes',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
10 changes: 5 additions & 5 deletions app/components/materialize-collapsible-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import MaterializeCollapsibleCard from './md-card-collapsible';
export default MaterializeCollapsibleCard.extend({
init() {
this._super(...arguments);
deprecate(
'{{materialize-collapsible-card}} has been deprecated. Please use {{md-card-collapsible}} instead',
false,
{ url: 'https://github.com/sgasser/ember-cli-materialize/issues/67' }
);
deprecate('{{materialize-collapsible-card}} has been deprecated. Please use {{md-card-collapsible}} instead', false, {
id: 'materialize-collapsible-card',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
});
2 changes: 2 additions & 0 deletions app/components/materialize-collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeCollapsible.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-collapsible}} has been deprecated. Please use {{md-collapsible}} instead', false, {
id: 'materialize-collapsible',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-copyright.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default materializeCopyright.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-copyright}} has been deprecated. Please use {{md-copyright}} instead', false, {
id: 'materialize-copyright',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-date-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default materializeDateInput.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-date-input}} has been deprecated. Please use {{md-input-date}} instead', false, {
id: 'materialize-date-input',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-input-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default materializeInputField.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-input-field}} has been deprecated. Please use {{md-input-field}} instead', false, {
id: 'materialize-input-field',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default materializeInput.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-input}} has been deprecated. Please use {{md-input}} instead', false, {
id: 'materialize-input',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default materializeLoader.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-loader}} has been deprecated. Please use {{md-loader}} instead', false, {
id: 'materialize-loader',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/materialize-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export default MaterializeModal.extend({
init() {
this._super(...arguments);
deprecate('{{materialize-modal}} has been deprecated. Please use {{md-modal}} instead', false, {
id: 'materialize-modal',
until: '1.0.0',
url: 'https://github.com/sgasser/ember-cli-materialize/issues/67'
});
}
Expand Down
Loading