# HG changeset patch # User ymh # Date 1486123268 -3600 # Node ID c71923e6fa2f602cfc25d95a65fa71f2ef092519 # Parent 9a7fea1642ccf09791edc9dffa3572a97f4f4f70 Correct error when transitioning between thematiques tabs and others (bug #0025983) + correct scroll for themes diff -r 9a7fea1642cc -r c71923e6fa2f cms/app-client/app/components/sorting-component.js --- a/cms/app-client/app/components/sorting-component.js Wed Feb 01 18:43:57 2017 +0100 +++ b/cms/app-client/app/components/sorting-component.js Fri Feb 03 13:01:08 2017 +0100 @@ -37,7 +37,7 @@ let more = this.get('more'); let self = this; if(!more) { - this.set('scrollHandler', this.$('ul').on('scroll', function(event) { Ember.run.throttle(self, function() { this.scrolling(event.target); }, 150); })); + this.set('scrollHandler', this.$('.tags').on('scroll', function(event) { Ember.run.throttle(self, function() { self.scrolling(event.target); }, 300); })); } else { this.$('ul').off('scroll', this.get('scrollHandler')); } @@ -45,7 +45,6 @@ filterObserver: Ember.observer('filter.date.[]', 'filter.discourse.[]', 'filter.language', 'filter.location', 'filter.theme.[]', function() { this.set('more', true); - this.sendAction('resetIndex'); }), actions: { diff -r 9a7fea1642cc -r c71923e6fa2f cms/app-client/app/routes/tabs/langues.js --- a/cms/app-client/app/routes/tabs/langues.js Wed Feb 01 18:43:57 2017 +0100 +++ b/cms/app-client/app/routes/tabs/langues.js Fri Feb 03 13:01:08 2017 +0100 @@ -11,6 +11,6 @@ activate() { this.get('player').set('window', false); - } + }, }); diff -r 9a7fea1642cc -r c71923e6fa2f cms/app-client/app/routes/tabs/thematiques.js --- a/cms/app-client/app/routes/tabs/thematiques.js Wed Feb 01 18:43:57 2017 +0100 +++ b/cms/app-client/app/routes/tabs/thematiques.js Fri Feb 03 13:01:08 2017 +0100 @@ -22,7 +22,6 @@ 'sort': this.get('sort') })); promise.then(response => { - console.log("MODEL", response, response.get('content'), response.get('meta').total); this.set('themes', response.get('content')); this.set('total', response.get('meta').total); }); @@ -33,6 +32,11 @@ this.get('player').set('window', false); }, + filterObserver: Ember.observer('filter.date.[]', 'filter.discourse.[]', 'filter.language', 'filter.location', 'filter.theme.[]', function() { + this.set('index', 0); + this.refresh(); + }), + actions: { loadMore: function() { @@ -54,16 +58,12 @@ }); }, - resetIndexQueryParams: function () { - this.set('index', 0); - this.refresh(); - }, - setSortQueryparams: function (sort) { this.set('sort', sort); this.set('index', 0); this.refresh(); - } + return false; + }, } diff -r 9a7fea1642cc -r c71923e6fa2f cms/app-client/app/templates/tabs/thematiques.hbs --- a/cms/app-client/app/templates/tabs/thematiques.hbs Wed Feb 01 18:43:57 2017 +0100 +++ b/cms/app-client/app/templates/tabs/thematiques.hbs Fri Feb 03 13:01:08 2017 +0100 @@ -3,6 +3,5 @@ themes=model load='loadMore' sort='setSortQueryparams' - resetIndex='resetIndexQueryParams' }} \ No newline at end of file