-const dropzone = require('./components/dropzone');
+import * as Dates from "../services/dates";
+import dropzone from "./components/dropzone";
let page = 0;
let previousClickTime = 0;
},
cancelSearch() {
+ if (!this.searching) return;
this.searching = false;
this.searchTerm = '';
this.images = preSearchImages;
});
return;
}
-
- this.$http.delete(`/images/${this.selectedImage.id}`).then(resp => {
+ let url = window.baseUrl(`/images/${this.selectedImage.id}`);
+ this.$http.delete(url).then(resp => {
this.images.splice(this.images.indexOf(this.selectedImage), 1);
this.selectedImage = false;
this.$events.emit('success', trans('components.image_delete_success'));
},
getDate(stringDate) {
- return new Date(stringDate);
+ return Dates.formatDateTime(new Date(stringDate));
},
uploadSuccess(event) {
baseUrl = window.baseUrl('/images/' + this.imageType + '/all/')
}
-module.exports = {
+export default {
mounted,
methods,
data,