From c1db799aeef3b3257723f205230aa29c98e9d904 Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Sun, 25 Feb 2018 02:33:31 +0700 Subject: [PATCH] Updates Replaced all instances of "ocurred" into "occurred". --- public/js/auth.js | 4 ++-- public/js/dashboard.js | 44 +++++++++++++++++++++--------------------- public/js/home.js | 8 ++++---- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/public/js/auth.js b/public/js/auth.js index 024592d..bb6b78b 100644 --- a/public/js/auth.js +++ b/public/js/auth.js @@ -27,7 +27,7 @@ page.do = function (dest) { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -47,7 +47,7 @@ page.verify = function () { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } diff --git a/public/js/dashboard.js b/public/js/dashboard.js index f7173f9..2bbfaa3 100644 --- a/public/js/dashboard.js +++ b/public/js/dashboard.js @@ -26,7 +26,7 @@ panel.verifyToken = function (token, reloadOnError) { .then(function (response) { if (response.data.success === false) { swal({ - title: 'An error ocurred', + title: 'An error occurred', text: response.data.description, type: 'error' }, function () { @@ -46,7 +46,7 @@ panel.verifyToken = function (token, reloadOnError) { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -90,7 +90,7 @@ panel.getUploads = function (album = undefined, page = undefined) { axios.get(url).then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } var prevPage = 0 @@ -207,7 +207,7 @@ panel.getUploads = function (album = undefined, page = undefined) { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -234,7 +234,7 @@ panel.deleteFile = function (id) { .then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } swal('Deleted!', 'The file has been deleted.', 'success') @@ -242,7 +242,7 @@ panel.deleteFile = function (id) { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } ) @@ -252,7 +252,7 @@ panel.getAlbums = function () { axios.get('api/albums').then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } panel.page.innerHTML = '' @@ -317,7 +317,7 @@ panel.getAlbums = function () { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -345,7 +345,7 @@ panel.renameAlbum = function (id) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) else if (response.data.description === 'Name already in use') swal.showInputError('That name is already in use!') - else swal('An error ocurred', response.data.description, 'error') + else swal('An error occurred', response.data.description, 'error') return } @@ -355,7 +355,7 @@ panel.renameAlbum = function (id) { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) }) } @@ -377,7 +377,7 @@ panel.deleteAlbum = function (id) { .then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } swal('Deleted!', 'Your album has been deleted.', 'success') @@ -386,7 +386,7 @@ panel.deleteAlbum = function (id) { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } ) @@ -399,7 +399,7 @@ panel.submitAlbum = function () { .then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } swal('Woohoo!', 'Album was added successfully', 'success') @@ -408,7 +408,7 @@ panel.submitAlbum = function () { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -417,7 +417,7 @@ panel.getAlbumsSidebar = function () { .then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } var albumsContainer = document.getElementById('albumsContainer') @@ -442,7 +442,7 @@ panel.getAlbumsSidebar = function () { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -456,7 +456,7 @@ panel.changeToken = function () { .then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } panel.page.innerHTML = '' @@ -480,7 +480,7 @@ panel.changeToken = function () { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -489,7 +489,7 @@ panel.getNewToken = function () { .then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } swal({ @@ -503,7 +503,7 @@ panel.getNewToken = function () { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -547,7 +547,7 @@ panel.sendNewPassword = function (pass) { .then(function (response) { if (response.data.success === false) { if (response.data.description === 'No token provided') return panel.verifyToken(panel.token) - else return swal('An error ocurred', response.data.description, 'error') + else return swal('An error occurred', response.data.description, 'error') } swal({ @@ -560,7 +560,7 @@ panel.sendNewPassword = function (pass) { }) .catch(function (error) { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } diff --git a/public/js/home.js b/public/js/home.js index 05ec54c..7a9d7d4 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -19,7 +19,7 @@ upload.checkIfPublic = function () { }) .catch(error => { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -43,7 +43,7 @@ upload.verifyToken = function (token, reloadOnError) { .then(response => { if (response.data.success === false) { swal({ - title: 'An error ocurred', + title: 'An error occurred', text: response.data.description, type: 'error' }, () => { @@ -61,7 +61,7 @@ upload.verifyToken = function (token, reloadOnError) { }) .catch(error => { console.log(error) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) } @@ -94,7 +94,7 @@ upload.prepareUpload = function () { }) .catch(e => { console.log(e) - return swal('An error ocurred', 'There was an error with the request, please check the console for more information.', 'error') + return swal('An error occurred', 'There was an error with the request, please check the console for more information.', 'error') }) }