From 5ed971479f462a04d941337003d1f337b54dfb5d Mon Sep 17 00:00:00 2001 From: Julien Palmas Date: Thu, 10 Oct 2019 16:39:28 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refacto=20usage=20of?= =?UTF-8?q?=20this.$=20to=20remove=20Ember=203.9=20deprec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon/mixins/base.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addon/mixins/base.js b/addon/mixins/base.js index 8fd39b088..800c13036 100644 --- a/addon/mixins/base.js +++ b/addon/mixins/base.js @@ -89,9 +89,14 @@ Semantic.BaseMixin = Ember.Mixin.create({ getSemanticScope() { if (Ember.isPresent(this.get('onElement'))) { - return this.$(this.get('onElement')); + return $( + this.element.getElementsByTagName( + this.get('onElement') + )[0] + ); } - return this.$(); + + return $(this.element); }, getSemanticModuleName() { From a70570b42f8c91d22c845fe385c3897d854af60f Mon Sep 17 00:00:00 2001 From: Julien Palmas Date: Thu, 10 Oct 2019 17:10:36 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20fix=20getSemanticScope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon/mixins/base.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addon/mixins/base.js b/addon/mixins/base.js index 800c13036..ea3362dec 100644 --- a/addon/mixins/base.js +++ b/addon/mixins/base.js @@ -89,11 +89,8 @@ Semantic.BaseMixin = Ember.Mixin.create({ getSemanticScope() { if (Ember.isPresent(this.get('onElement'))) { - return $( - this.element.getElementsByTagName( - this.get('onElement') - )[0] - ); + const classNamesStr = this.get('onElement').replace(/\./g, ' ').trim(); + return $(this.element.getElementsByClassName(classNamesStr)[0]); } return $(this.element);