Skip to content

Commit

Permalink
Merge pull request #500 from dotkernel/issue-498
Browse files Browse the repository at this point in the history
Issue #498: Fixed CRLF files and restored `.gitattributes`
  • Loading branch information
alexmerlin authored Oct 3, 2024
2 parents 1a9ac57 + dd0f16c commit b11a360
Show file tree
Hide file tree
Showing 11 changed files with 925 additions and 919 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text eol=lf
*.png binary
*.jpg binary
*.jpeg binary
*.svg binary
*.md diff=markdown
Binary file modified public/fonts/app/Minion-Pro.ttf
Binary file not shown.
Binary file modified src/App/assets/fonts/Minion-Pro.ttf
Binary file not shown.
118 changes: 59 additions & 59 deletions src/App/assets/js/components/_avatar.js
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
$(document).ready(function () {
let fileInputCommonConfig = {
previewTemplates: {
image: '<div class="file-preview-frame krajee-default kv-preview-thumb" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}">\n' +
' <div class="kv-file-content" style="width: 100%;">' +
' <img src="{data}" class="kv-preview-data file-preview-image" title="{caption}" alt="{caption}" ' +
' style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n' +
' </div>\n' +
'</div>\n',
},
layoutTemplates: {
footer: ''
},
showRemove: false,
showUpload: false,
showCancel: false,
initialPreviewShowDelete: false,
dropZoneEnabled: false,
required: false,
showClose: false,
browseClass: 'btn btn-default',
browseLabel: 'Browse',
removeClass: 'btn btn-default',
uploadClass: 'btn btn-default',
allowedFileTypes: ['image'],
showUploadedThumbs: false,
maxFileSize: 10000,
maxFilePreviewSize: 10000
};

let $imageInput = $('.img-input');
let userUploadUrl = $imageInput.data('url');
let profilePreview = $imageInput.data('preview');

fileInputCommonConfig.uploadUrl = userUploadUrl;
fileInputCommonConfig.defaultPreviewContent = '<div class="file-preview-frame krajee-default kv-preview-thumb">\n' +
' <div class="kv-file-content" style="width: 100%;">' +
' <img src="'+ profilePreview +'" class="kv-preview-data file-preview-image"' +
' style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n' +
' </div>\n' +
'</div>\n';

$imageInput.fileinput(fileInputCommonConfig);
let captionInput = document.querySelector('.kv-fileinput-caption');
if (captionInput) {
captionInput.style.height = '86px';
captionInput.style.marginTop = '33px';
}

$imageInput.on('fileuploaded', function (event, data, previewId, index) {
$(this).fileinput('reset');
$('.file-preview-frame').find('img').attr('src', data.response.imageUrl);
});

$imageInput.on('change', function () {
$('.img-input').fileinput('upload');

});
});
$(document).ready(function () {
let fileInputCommonConfig = {
previewTemplates: {
image: '<div class="file-preview-frame krajee-default kv-preview-thumb" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}">\n' +
' <div class="kv-file-content" style="width: 100%;">' +
' <img src="{data}" class="kv-preview-data file-preview-image" title="{caption}" alt="{caption}" ' +
' style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n' +
' </div>\n' +
'</div>\n',
},
layoutTemplates: {
footer: ''
},
showRemove: false,
showUpload: false,
showCancel: false,
initialPreviewShowDelete: false,
dropZoneEnabled: false,
required: false,
showClose: false,
browseClass: 'btn btn-default',
browseLabel: 'Browse',
removeClass: 'btn btn-default',
uploadClass: 'btn btn-default',
allowedFileTypes: ['image'],
showUploadedThumbs: false,
maxFileSize: 10000,
maxFilePreviewSize: 10000
};

let $imageInput = $('.img-input');
let userUploadUrl = $imageInput.data('url');
let profilePreview = $imageInput.data('preview');

fileInputCommonConfig.uploadUrl = userUploadUrl;
fileInputCommonConfig.defaultPreviewContent = '<div class="file-preview-frame krajee-default kv-preview-thumb">\n' +
' <div class="kv-file-content" style="width: 100%;">' +
' <img src="'+ profilePreview +'" class="kv-preview-data file-preview-image"' +
' style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n' +
' </div>\n' +
'</div>\n';

$imageInput.fileinput(fileInputCommonConfig);
let captionInput = document.querySelector('.kv-fileinput-caption');
if (captionInput) {
captionInput.style.height = '86px';
captionInput.style.marginTop = '33px';
}

$imageInput.on('fileuploaded', function (event, data, previewId, index) {
$(this).fileinput('reset');
$('.file-preview-frame').find('img').attr('src', data.response.imageUrl);
});

$imageInput.on('change', function () {
$('.img-input').fileinput('upload');

});
});
202 changes: 101 additions & 101 deletions src/App/assets/js/components/_contact.js
Original file line number Diff line number Diff line change
@@ -1,101 +1,101 @@
$(document).ready(function () {
$('.open-button').on('click', function (e) {
e.preventDefault();
let container = $('#contact-form-container');

$.ajax({
type: 'GET',
url: '/contact/form',
}).done(function (response) {
container.replaceWith(response);
document.getElementById("contact-form-yb-frontend").style.display = "block";
}).fail(function (jqXHR) {
switch (jqXHR.status) {
default:
window.toastr.error('Something went wrong! Please try again!');
break;
}
});
});
$('.cancel').on('click', function () {
document.getElementById("contact-form-yb-frontend").style.display = "none";
});

$('#send-expert-contact-form').on('click', function (e) {
e.preventDefault();
let form = $('#contact_form');

$.ajax({
type: "POST",
url: '/contact/save-contact-message',
data: $(form).serialize()
}).done(function (response) {
if (response.message.type === 'success') {
$('input[name="email"]').val('');
$('input[name="name"]').val('');
$('textarea[name="message"]').val('');
document.getElementById("contact-form-yb-frontend").style.display = "none";
window.toastr.success(response.message.text);
} else {
window.toastr.error(response.message.text);
}
}).fail(function (jqXHR) {
switch (jqXHR.status) {
case 422:
let responseText = JSON.parse(jqXHR.responseText);
window.toastr.error(responseText);
break;

case 401:
let data = JSON.parse(jqXHR.responseText);
redirectTo(data.redirect);
break;

default:
window.toastr.error("Unexpected error. Please try again!");
break;
}
});
});
});

function validateContactUsForm()
{
event.preventDefault();
$('.contactUsFormErrors').hide();
var submit = true;
if (!$('.g-recaptcha')[0].dataset.sitekey) {
submit = false;
$('#contactUsErrors').show();
$('#recaptchaSiteKeyEmpty').show();
return false;
}
if ($('#contact_form #name').val() == '') {
submit = false;
$('#contactUsErrors').show();
$('#contactUsEmptyName').show();
}
if ($('#contact_form #email').val() == '') {
submit = false;
$('#contactUsErrors').show();
$('#contactUsEmptyEmail').show();
}
if ($('#contact_form #message').val() == '') {
submit = false;
$('#contactUsErrors').show();
$('#contactUsEmptyText').show();
}

//grecaptcha.execute();

if (submit == true) {
grecaptcha.execute();
}
}
window.validateContactUsForm = validateContactUsForm;

function submitContactUsForm()
{
$('#contact_form').submit();
}
window.submitContactUsForm = submitContactUsForm;
$(document).ready(function () {
$('.open-button').on('click', function (e) {
e.preventDefault();
let container = $('#contact-form-container');

$.ajax({
type: 'GET',
url: '/contact/form',
}).done(function (response) {
container.replaceWith(response);
document.getElementById("contact-form-yb-frontend").style.display = "block";
}).fail(function (jqXHR) {
switch (jqXHR.status) {
default:
window.toastr.error('Something went wrong! Please try again!');
break;
}
});
});
$('.cancel').on('click', function () {
document.getElementById("contact-form-yb-frontend").style.display = "none";
});

$('#send-expert-contact-form').on('click', function (e) {
e.preventDefault();
let form = $('#contact_form');

$.ajax({
type: "POST",
url: '/contact/save-contact-message',
data: $(form).serialize()
}).done(function (response) {
if (response.message.type === 'success') {
$('input[name="email"]').val('');
$('input[name="name"]').val('');
$('textarea[name="message"]').val('');
document.getElementById("contact-form-yb-frontend").style.display = "none";
window.toastr.success(response.message.text);
} else {
window.toastr.error(response.message.text);
}
}).fail(function (jqXHR) {
switch (jqXHR.status) {
case 422:
let responseText = JSON.parse(jqXHR.responseText);
window.toastr.error(responseText);
break;

case 401:
let data = JSON.parse(jqXHR.responseText);
redirectTo(data.redirect);
break;

default:
window.toastr.error("Unexpected error. Please try again!");
break;
}
});
});
});

function validateContactUsForm()
{
event.preventDefault();
$('.contactUsFormErrors').hide();
var submit = true;
if (!$('.g-recaptcha')[0].dataset.sitekey) {
submit = false;
$('#contactUsErrors').show();
$('#recaptchaSiteKeyEmpty').show();
return false;
}
if ($('#contact_form #name').val() == '') {
submit = false;
$('#contactUsErrors').show();
$('#contactUsEmptyName').show();
}
if ($('#contact_form #email').val() == '') {
submit = false;
$('#contactUsErrors').show();
$('#contactUsEmptyEmail').show();
}
if ($('#contact_form #message').val() == '') {
submit = false;
$('#contactUsErrors').show();
$('#contactUsEmptyText').show();
}

//grecaptcha.execute();

if (submit == true) {
grecaptcha.execute();
}
}
window.validateContactUsForm = validateContactUsForm;

function submitContactUsForm()
{
$('#contact_form').submit();
}
window.submitContactUsForm = submitContactUsForm;
12 changes: 6 additions & 6 deletions src/App/assets/js/components/_profile.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$(document).ready(function () {
/* Search patterns */
$('.collapse-menu').on('click', function () {
$('.profile-action-menu').slideToggle();
});
});
$(document).ready(function () {
/* Search patterns */
$('.collapse-menu').on('click', function () {
$('.profile-action-menu').slideToggle();
});
});
56 changes: 28 additions & 28 deletions src/App/assets/scss/components/_contact.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
.contact-block {
width: 380px;
margin: auto;
padding: 40px;
background-color: #fff;
-webkit-box-shadow: 0 4px 8px 0 rgba(0,0,0,.07);
box-shadow: 0 4px 8px 0 rgba(0,0,0,.07);
border-radius: 10px;

h3 {
margin-bottom: 20px;
}

input,
textarea {
margin-bottom: 10px;
}

p {
margin: 0;
}
}

@media (max-width: 575px) {
.contact-block {
width: auto;
}
}
.contact-block {
width: 380px;
margin: auto;
padding: 40px;
background-color: #fff;
-webkit-box-shadow: 0 4px 8px 0 rgba(0,0,0,.07);
box-shadow: 0 4px 8px 0 rgba(0,0,0,.07);
border-radius: 10px;

h3 {
margin-bottom: 20px;
}

input,
textarea {
margin-bottom: 10px;
}

p {
margin: 0;
}
}

@media (max-width: 575px) {
.contact-block {
width: auto;
}
}
Loading

0 comments on commit b11a360

Please sign in to comment.