add new changes
Dieser Commit ist enthalten in:
Vendored
+64
-1
@@ -77,6 +77,40 @@ function toasterHelper(type, message, align = 'toast-top-center') {
|
||||
}
|
||||
}
|
||||
|
||||
async function getMulFileToGetBase64(event) {
|
||||
let files = event.target.files;
|
||||
let filePromise = [];
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
let currFile = files[i];
|
||||
let currFilePromise = new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(currFile);
|
||||
// Wait till complete
|
||||
reader.onloadend = function () {
|
||||
let base64String = reader.result
|
||||
.toString()
|
||||
.replace(/^data:.+;base64,/, "");
|
||||
let fileReq = {
|
||||
FileData: base64String,
|
||||
FileName: currFile.name.split(".").slice(0, -1).join("."),
|
||||
FileType: currFile.name.split(".").pop(),
|
||||
RefId: 0,
|
||||
"ByteData": null,
|
||||
"FilePath": ""
|
||||
};
|
||||
resolve(fileReq);
|
||||
};
|
||||
// Make sure to handle error states
|
||||
reader.onerror = function (e) {
|
||||
reject(e);
|
||||
};
|
||||
});
|
||||
filePromise.push(currFilePromise)
|
||||
}
|
||||
|
||||
return Promise.all(filePromise);
|
||||
}
|
||||
|
||||
|
||||
function containsSpecialCharsHelper(str) {
|
||||
const specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/;
|
||||
@@ -84,4 +118,33 @@ function containsSpecialCharsHelper(str) {
|
||||
}
|
||||
const isUpperCaseHelper = (string) => /^(?=.*[A-Z])/.test(string);
|
||||
const isLowerCaseHelper = (string) => /^(?=.*[a-z])/.test(string);
|
||||
const isNumberContainsHelper = (string) => /\d/.test(string);
|
||||
const isNumberContainsHelper = (string) => /\d/.test(string);
|
||||
|
||||
function swapSectionsVideo(){
|
||||
function swapSections() {
|
||||
var sectionOne = document.querySelector('.section-one');
|
||||
var sectionTwo = document.querySelector('.section-two');
|
||||
|
||||
let nextSibling = sectionOne.nextSibling;
|
||||
var isMobile = window.matchMedia("(max-width: 768px)").matches;
|
||||
if(!isMobile) return;
|
||||
|
||||
if(nextSibling){
|
||||
sectionOne.insertAdjacentElement("beforeBegin",sectionTwo)
|
||||
}else{
|
||||
sectionOne.parentNode.insertBefore(sectionOne, sectionTwo);
|
||||
}
|
||||
|
||||
// sectionOne.parentNode.insertBefore(sectionOne, sectionTwo);
|
||||
}
|
||||
swapSections();
|
||||
|
||||
// Call the swapSections function on load and resize
|
||||
// window.addEventListener('load', swapSections);
|
||||
window.addEventListener('resize', swapSections);
|
||||
|
||||
setTimeout(function (){
|
||||
document.querySelector('auth-loader').hide();
|
||||
$('.loading-main').removeClass('d-none');
|
||||
},1000);
|
||||
}
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren