Skip to content

Commit 0e19458

Browse files
In many cases in the components we are using this.get('f7') and then calling a function on the f7 framework. The framework is set in the f7 variable in the f7 service. We get a unknown function error when trying to use the included components due to this. Fixed this by referencing f7.f7 to get the actual framework from the service
1 parent 8ada90a commit 0e19458

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

app/components/f7-navbar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default Ember.Component.extend({
77
this.$('.center').css('opacity', '0');
88
var _this = this;
99
setTimeout(function() {
10-
_this.get('f7').sizeNavbars();
10+
_this.get('f7.f7').sizeNavbars();
1111
_this.$('.center').css('opacity', '1');
1212
}, 0);
1313
}

app/components/f7-page-container.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default Ember.Component.extend({
3737
*/
3838
initSearchBar: function() {
3939
if (this.get('searchBar')) {
40-
this.get('f7').initSearchbar(this.$());
40+
this.get('f7.f7').initSearchbar(this.$());
4141
}
4242
}.observes('searchBar')
4343
});

app/components/f7-page-content/f7-infinite-scroll.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default Ember.Mixin.create({
77
if (action) {
88
this.$().addClass('infinite-scroll');
99
this.set('hasInfiniteScroll', true);
10-
this.get('f7').attachInfiniteScroll(this.$());
10+
this.get('f7.f7').attachInfiniteScroll(this.$());
1111
this.$().on('infinite', function() {
1212
if (_this.get('loading')) return;
1313
_this.$().find('.infinite-scroll-preloader').show();
@@ -24,7 +24,7 @@ export default Ember.Mixin.create({
2424
}.on('didInsertElement'),
2525

2626
detachInfiniteScroll: function() {
27-
this.get('f7').detachInfiniteScroll(this.$());
27+
this.get('f7.f7').detachInfiniteScroll(this.$());
2828
this.$().find('.infinite-scroll-preloader').hide();
2929
}
3030
});

app/components/f7-page-content/f7-pull-to-refresh.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ export default Ember.Mixin.create({
77
if (action) {
88
this.$().addClass('pull-to-refresh-content');
99
this.set('hasPullToRefresh', true);
10-
this.get('f7').initPullToRefresh(this.$());
10+
this.get('f7.f7').initPullToRefresh(this.$());
1111
this.$().on('refresh', function() {
1212
var deferred = Ember.RSVP.defer();
1313
deferred.promise.finally(function() {
14-
_this.get('f7').pullToRefreshDone();
14+
_this.get('f7.f7').pullToRefreshDone();
1515
});
1616
_this.sendAction('onPullToRefresh', deferred);
1717
});

app/components/f7-search-bar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default Ember.Component.extend({
1616
if (searchList.length > 1) {
1717
throw new Error('There is more then one search list available within the search component.');
1818
}
19-
this.get('f7').initSearchbar(this.$());
19+
this.get('f7.f7').initSearchbar(this.$());
2020
},
2121

2222
onQueryChanged: function() {

0 commit comments

Comments
 (0)