summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/vue_pagination/index.js.es67
-rw-r--r--app/assets/javascripts/vue_pipelines_index/pipelines.js.es67
2 files changed, 4 insertions, 10 deletions
diff --git a/app/assets/javascripts/vue_pagination/index.js.es6 b/app/assets/javascripts/vue_pagination/index.js.es6
index b9678d8a97f..78a26f65dfd 100644
--- a/app/assets/javascripts/vue_pagination/index.js.es6
+++ b/app/assets/javascripts/vue_pagination/index.js.es6
@@ -17,15 +17,12 @@
/**
This function will take the information given by the pagination component
- And make a new API call from the parent
+ And make a new Turbolinks call
Here is an example `change` method:
change(pagenum, apiScope) {
- window.history.pushState({}, null, `?scope=${apiScope}&p=${pagenum}`);
- clearInterval(this.timeLoopInterval);
- this.pageRequest = true;
- this.store.fetchDataLoop.call(this, Vue, pagenum, this.scope, apiScope);
+ Turbolinks.visit(`?scope=${apiScope}&p=${pagenum}`);
},
*/
diff --git a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
index eb9035146ba..73627e9ba50 100644
--- a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
@@ -1,4 +1,4 @@
-/* global Vue, gl */
+/* global Vue, Turbolinks, gl */
/* eslint-disable no-param-reassign */
((gl) => {
@@ -36,10 +36,7 @@
},
methods: {
change(pagenum, apiScope) {
- window.history.pushState({}, null, `?scope=${apiScope}&p=${pagenum}`);
- clearInterval(this.timeLoopInterval);
- this.pageRequest = true;
- this.store.fetchDataLoop.call(this, Vue, pagenum, this.scope, apiScope);
+ Turbolinks.visit(`?scope=${apiScope}&p=${pagenum}`);
},
author(pipeline) {
if (!pipeline.commit) return { avatar_url: '', web_url: '', username: '' };