PHRAS-2079_Admin_personnalisation_section

This commit is contained in:
Harrys Ravalomanana
2019-05-16 10:11:11 +04:00
parent 5f5afc6a76
commit 27971580f1
9 changed files with 1499 additions and 1492 deletions

View File

@@ -90,19 +90,22 @@
image.src = _file.target.result;
image.file = this.file;
image.data = this.data;
console.log(image.file.type);
if (image.file.type != 'image/png' && image.file.type!= 'image/svg+xml') {
$('#general_personalize-logo-choice_personalizeLogoInput').val("");
$('#error-text').text(errorFileType);
$('#error-text').show();
$('#help-text').hide();
$('#personalize-image-container').hide();
return false;
}
image.onload = function () {
var w = this.width,
h = this.height;
var ext = this.file.type.split('/').pop().toLowerCase();
if (ext != 'png' && ext != 'svg+xml') {
$('#general_personalize-logo-choice_personalizeLogoInput').val("");
$('#error-text').text(errorFileType);
$('#error-text').show();
$('#help-text').hide();
$('#personalize-image-container').hide();
return false;
}
if (h > 41 || w > 120 ) {
$('#error-text').text(errorDimension);