Frontend: Rename refreshList() to search() and fix formChange() in places

This commit is contained in:
Michael Mayer 2019-05-29 00:28:16 +02:00
parent 177f71612d
commit fd45769900
6 changed files with 28 additions and 28 deletions

View file

@ -491,11 +491,11 @@
this.$alert.success('Photo deleted');
},
formChange(event) {
this.refreshList();
this.search();
},
clearQuery() {
this.query.q = '';
this.refreshList();
this.search();
},
openPhoto(index) {
this.$viewer.show(this.results, index)
@ -524,7 +524,7 @@
}
});
},
refreshList() {
search() {
this.loadMoreDisabled = true;
// Don't query the same data more than once:197
@ -562,7 +562,7 @@
created() {
window.addEventListener('resize', this.handleResize);
this.handleResize();
this.refreshList();
this.search();
},
};
</script>

View file

@ -473,11 +473,11 @@
this.$alert.success('Photo deleted');
},
formChange(event) {
this.refreshList();
this.search();
},
clearQuery() {
this.query.q = '';
this.refreshList();
this.search();
},
openPhoto(index) {
this.$viewer.show(this.results, index)
@ -506,7 +506,7 @@
}
});
},
refreshList() {
search() {
this.loadMoreDisabled = true;
// Don't query the same data more than once:197
@ -544,7 +544,7 @@
created() {
window.addEventListener('resize', this.handleResize);
this.handleResize();
this.refreshList();
this.search();
},
};
</script>

View file

@ -399,11 +399,11 @@
this.$alert.success('Photo deleted');
},
formChange(event) {
this.refreshList();
this.search();
},
clearQuery() {
this.query.q = '';
this.refreshList();
this.search();
},
openPhoto(index) {
this.$viewer.show(this.results, index)
@ -432,7 +432,7 @@
}
});
},
refreshList() {
search() {
this.loadMoreDisabled = true;
// Don't query the same data more than once:197
@ -473,7 +473,7 @@
created() {
window.addEventListener('resize', this.handleResize);
this.handleResize();
this.refreshList();
this.search();
},
};
</script>

View file

@ -2,7 +2,7 @@
<div class="p-page p-page-photos" v-infinite-scroll="loadMore" :infinite-scroll-disabled="scrollDisabled"
:infinite-scroll-distance="10" :infinite-scroll-listen-for-event="'scrollRefresh'">
<p-photo-search :settings="settings" :filter="filter" :filter-change="refreshList"
<p-photo-search :settings="settings" :filter="filter" :filter-change="search"
:settings-change="updateQuery"></p-photo-search>
<v-container fluid>
@ -104,7 +104,7 @@
this.$nextTick(() => this.$emit("scrollRefresh"));
},
refreshList() {
search() {
this.scrollDisabled = true;
// Don't query the same data more than once
@ -140,7 +140,7 @@
next();
},
created() {
this.refreshList();
this.search();
},
};
</script>

View file

@ -322,11 +322,11 @@
this.$alert.success('Photo deleted');
},
formChange(event) {
this.refreshList();
this.search();
},
clearQuery() {
this.query.q = '';
this.refreshList();
this.search();
},
openPhoto(index) {
this.$viewer.show(this.results, index)
@ -355,7 +355,7 @@
}
});
},
refreshList() {
search() {
this.loadMoreDisabled = true;
// Don't query the same data more than once:197
@ -393,7 +393,7 @@
created() {
window.addEventListener('resize', this.handleResize);
this.handleResize();
this.refreshList();
this.search();
},
};
</script>

View file

@ -81,7 +81,7 @@
this.query.lat = position.coords.latitude;
this.query.long = position.coords.longitude;
this.query.q = "";
this.refreshList();
this.search();
},
currentPositionError(error) {
this.$alert.warning(error.message);
@ -95,15 +95,15 @@
}
},
formChange() {
this.lat = "";
this.long = "";
this.refreshList();
this.query.lat = "";
this.query.long = "";
this.search();
},
clearQuery() {
this.query.q = "";
this.lat = "";
this.long = "";
this.refreshList();
this.query.lat = "";
this.query.long = "";
this.search();
},
resetBoundingBox() {
this.minLat = null;
@ -175,7 +175,7 @@
}
},
refreshList() {
search() {
// Don't query the same data more than once
if (JSON.stringify(this.lastQuery) === JSON.stringify(this.query)) return;
@ -204,7 +204,7 @@
},
},
created() {
this.refreshList();
this.search();
},
};
</script>