Skip to content

Commit b11a360

Browse files
authored
Merge pull request #500 from dotkernel/issue-498
Issue #498: Fixed CRLF files and restored `.gitattributes`
2 parents 1a9ac57 + dd0f16c commit b11a360

File tree

11 files changed

+925
-919
lines changed

11 files changed

+925
-919
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* text eol=lf
2+
*.png binary
3+
*.jpg binary
4+
*.jpeg binary
5+
*.svg binary
6+
*.md diff=markdown

public/fonts/app/Minion-Pro.ttf

47.6 KB
Binary file not shown.
47.6 KB
Binary file not shown.
Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
$(document).ready(function () {
2-
let fileInputCommonConfig = {
3-
previewTemplates: {
4-
image: '<div class="file-preview-frame krajee-default kv-preview-thumb" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}">\n' +
5-
' <div class="kv-file-content" style="width: 100%;">' +
6-
' <img src="{data}" class="kv-preview-data file-preview-image" title="{caption}" alt="{caption}" ' +
7-
' style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n' +
8-
' </div>\n' +
9-
'</div>\n',
10-
},
11-
layoutTemplates: {
12-
footer: ''
13-
},
14-
showRemove: false,
15-
showUpload: false,
16-
showCancel: false,
17-
initialPreviewShowDelete: false,
18-
dropZoneEnabled: false,
19-
required: false,
20-
showClose: false,
21-
browseClass: 'btn btn-default',
22-
browseLabel: 'Browse',
23-
removeClass: 'btn btn-default',
24-
uploadClass: 'btn btn-default',
25-
allowedFileTypes: ['image'],
26-
showUploadedThumbs: false,
27-
maxFileSize: 10000,
28-
maxFilePreviewSize: 10000
29-
};
30-
31-
let $imageInput = $('.img-input');
32-
let userUploadUrl = $imageInput.data('url');
33-
let profilePreview = $imageInput.data('preview');
34-
35-
fileInputCommonConfig.uploadUrl = userUploadUrl;
36-
fileInputCommonConfig.defaultPreviewContent = '<div class="file-preview-frame krajee-default kv-preview-thumb">\n' +
37-
' <div class="kv-file-content" style="width: 100%;">' +
38-
' <img src="'+ profilePreview +'" class="kv-preview-data file-preview-image"' +
39-
' style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n' +
40-
' </div>\n' +
41-
'</div>\n';
42-
43-
$imageInput.fileinput(fileInputCommonConfig);
44-
let captionInput = document.querySelector('.kv-fileinput-caption');
45-
if (captionInput) {
46-
captionInput.style.height = '86px';
47-
captionInput.style.marginTop = '33px';
48-
}
49-
50-
$imageInput.on('fileuploaded', function (event, data, previewId, index) {
51-
$(this).fileinput('reset');
52-
$('.file-preview-frame').find('img').attr('src', data.response.imageUrl);
53-
});
54-
55-
$imageInput.on('change', function () {
56-
$('.img-input').fileinput('upload');
57-
58-
});
59-
});
1+
$(document).ready(function () {
2+
let fileInputCommonConfig = {
3+
previewTemplates: {
4+
image: '<div class="file-preview-frame krajee-default kv-preview-thumb" id="{previewId}" data-fileindex="{fileindex}" data-template="{template}">\n' +
5+
' <div class="kv-file-content" style="width: 100%;">' +
6+
' <img src="{data}" class="kv-preview-data file-preview-image" title="{caption}" alt="{caption}" ' +
7+
' style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n' +
8+
' </div>\n' +
9+
'</div>\n',
10+
},
11+
layoutTemplates: {
12+
footer: ''
13+
},
14+
showRemove: false,
15+
showUpload: false,
16+
showCancel: false,
17+
initialPreviewShowDelete: false,
18+
dropZoneEnabled: false,
19+
required: false,
20+
showClose: false,
21+
browseClass: 'btn btn-default',
22+
browseLabel: 'Browse',
23+
removeClass: 'btn btn-default',
24+
uploadClass: 'btn btn-default',
25+
allowedFileTypes: ['image'],
26+
showUploadedThumbs: false,
27+
maxFileSize: 10000,
28+
maxFilePreviewSize: 10000
29+
};
30+
31+
let $imageInput = $('.img-input');
32+
let userUploadUrl = $imageInput.data('url');
33+
let profilePreview = $imageInput.data('preview');
34+
35+
fileInputCommonConfig.uploadUrl = userUploadUrl;
36+
fileInputCommonConfig.defaultPreviewContent = '<div class="file-preview-frame krajee-default kv-preview-thumb">\n' +
37+
' <div class="kv-file-content" style="width: 100%;">' +
38+
' <img src="'+ profilePreview +'" class="kv-preview-data file-preview-image"' +
39+
' style="height: auto; width: auto; max-width: 100%; max-height: 100%;">\n' +
40+
' </div>\n' +
41+
'</div>\n';
42+
43+
$imageInput.fileinput(fileInputCommonConfig);
44+
let captionInput = document.querySelector('.kv-fileinput-caption');
45+
if (captionInput) {
46+
captionInput.style.height = '86px';
47+
captionInput.style.marginTop = '33px';
48+
}
49+
50+
$imageInput.on('fileuploaded', function (event, data, previewId, index) {
51+
$(this).fileinput('reset');
52+
$('.file-preview-frame').find('img').attr('src', data.response.imageUrl);
53+
});
54+
55+
$imageInput.on('change', function () {
56+
$('.img-input').fileinput('upload');
57+
58+
});
59+
});
Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,101 @@
1-
$(document).ready(function () {
2-
$('.open-button').on('click', function (e) {
3-
e.preventDefault();
4-
let container = $('#contact-form-container');
5-
6-
$.ajax({
7-
type: 'GET',
8-
url: '/contact/form',
9-
}).done(function (response) {
10-
container.replaceWith(response);
11-
document.getElementById("contact-form-yb-frontend").style.display = "block";
12-
}).fail(function (jqXHR) {
13-
switch (jqXHR.status) {
14-
default:
15-
window.toastr.error('Something went wrong! Please try again!');
16-
break;
17-
}
18-
});
19-
});
20-
$('.cancel').on('click', function () {
21-
document.getElementById("contact-form-yb-frontend").style.display = "none";
22-
});
23-
24-
$('#send-expert-contact-form').on('click', function (e) {
25-
e.preventDefault();
26-
let form = $('#contact_form');
27-
28-
$.ajax({
29-
type: "POST",
30-
url: '/contact/save-contact-message',
31-
data: $(form).serialize()
32-
}).done(function (response) {
33-
if (response.message.type === 'success') {
34-
$('input[name="email"]').val('');
35-
$('input[name="name"]').val('');
36-
$('textarea[name="message"]').val('');
37-
document.getElementById("contact-form-yb-frontend").style.display = "none";
38-
window.toastr.success(response.message.text);
39-
} else {
40-
window.toastr.error(response.message.text);
41-
}
42-
}).fail(function (jqXHR) {
43-
switch (jqXHR.status) {
44-
case 422:
45-
let responseText = JSON.parse(jqXHR.responseText);
46-
window.toastr.error(responseText);
47-
break;
48-
49-
case 401:
50-
let data = JSON.parse(jqXHR.responseText);
51-
redirectTo(data.redirect);
52-
break;
53-
54-
default:
55-
window.toastr.error("Unexpected error. Please try again!");
56-
break;
57-
}
58-
});
59-
});
60-
});
61-
62-
function validateContactUsForm()
63-
{
64-
event.preventDefault();
65-
$('.contactUsFormErrors').hide();
66-
var submit = true;
67-
if (!$('.g-recaptcha')[0].dataset.sitekey) {
68-
submit = false;
69-
$('#contactUsErrors').show();
70-
$('#recaptchaSiteKeyEmpty').show();
71-
return false;
72-
}
73-
if ($('#contact_form #name').val() == '') {
74-
submit = false;
75-
$('#contactUsErrors').show();
76-
$('#contactUsEmptyName').show();
77-
}
78-
if ($('#contact_form #email').val() == '') {
79-
submit = false;
80-
$('#contactUsErrors').show();
81-
$('#contactUsEmptyEmail').show();
82-
}
83-
if ($('#contact_form #message').val() == '') {
84-
submit = false;
85-
$('#contactUsErrors').show();
86-
$('#contactUsEmptyText').show();
87-
}
88-
89-
//grecaptcha.execute();
90-
91-
if (submit == true) {
92-
grecaptcha.execute();
93-
}
94-
}
95-
window.validateContactUsForm = validateContactUsForm;
96-
97-
function submitContactUsForm()
98-
{
99-
$('#contact_form').submit();
100-
}
101-
window.submitContactUsForm = submitContactUsForm;
1+
$(document).ready(function () {
2+
$('.open-button').on('click', function (e) {
3+
e.preventDefault();
4+
let container = $('#contact-form-container');
5+
6+
$.ajax({
7+
type: 'GET',
8+
url: '/contact/form',
9+
}).done(function (response) {
10+
container.replaceWith(response);
11+
document.getElementById("contact-form-yb-frontend").style.display = "block";
12+
}).fail(function (jqXHR) {
13+
switch (jqXHR.status) {
14+
default:
15+
window.toastr.error('Something went wrong! Please try again!');
16+
break;
17+
}
18+
});
19+
});
20+
$('.cancel').on('click', function () {
21+
document.getElementById("contact-form-yb-frontend").style.display = "none";
22+
});
23+
24+
$('#send-expert-contact-form').on('click', function (e) {
25+
e.preventDefault();
26+
let form = $('#contact_form');
27+
28+
$.ajax({
29+
type: "POST",
30+
url: '/contact/save-contact-message',
31+
data: $(form).serialize()
32+
}).done(function (response) {
33+
if (response.message.type === 'success') {
34+
$('input[name="email"]').val('');
35+
$('input[name="name"]').val('');
36+
$('textarea[name="message"]').val('');
37+
document.getElementById("contact-form-yb-frontend").style.display = "none";
38+
window.toastr.success(response.message.text);
39+
} else {
40+
window.toastr.error(response.message.text);
41+
}
42+
}).fail(function (jqXHR) {
43+
switch (jqXHR.status) {
44+
case 422:
45+
let responseText = JSON.parse(jqXHR.responseText);
46+
window.toastr.error(responseText);
47+
break;
48+
49+
case 401:
50+
let data = JSON.parse(jqXHR.responseText);
51+
redirectTo(data.redirect);
52+
break;
53+
54+
default:
55+
window.toastr.error("Unexpected error. Please try again!");
56+
break;
57+
}
58+
});
59+
});
60+
});
61+
62+
function validateContactUsForm()
63+
{
64+
event.preventDefault();
65+
$('.contactUsFormErrors').hide();
66+
var submit = true;
67+
if (!$('.g-recaptcha')[0].dataset.sitekey) {
68+
submit = false;
69+
$('#contactUsErrors').show();
70+
$('#recaptchaSiteKeyEmpty').show();
71+
return false;
72+
}
73+
if ($('#contact_form #name').val() == '') {
74+
submit = false;
75+
$('#contactUsErrors').show();
76+
$('#contactUsEmptyName').show();
77+
}
78+
if ($('#contact_form #email').val() == '') {
79+
submit = false;
80+
$('#contactUsErrors').show();
81+
$('#contactUsEmptyEmail').show();
82+
}
83+
if ($('#contact_form #message').val() == '') {
84+
submit = false;
85+
$('#contactUsErrors').show();
86+
$('#contactUsEmptyText').show();
87+
}
88+
89+
//grecaptcha.execute();
90+
91+
if (submit == true) {
92+
grecaptcha.execute();
93+
}
94+
}
95+
window.validateContactUsForm = validateContactUsForm;
96+
97+
function submitContactUsForm()
98+
{
99+
$('#contact_form').submit();
100+
}
101+
window.submitContactUsForm = submitContactUsForm;
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
$(document).ready(function () {
2-
/* Search patterns */
3-
$('.collapse-menu').on('click', function () {
4-
$('.profile-action-menu').slideToggle();
5-
});
6-
});
1+
$(document).ready(function () {
2+
/* Search patterns */
3+
$('.collapse-menu').on('click', function () {
4+
$('.profile-action-menu').slideToggle();
5+
});
6+
});
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
.contact-block {
2-
width: 380px;
3-
margin: auto;
4-
padding: 40px;
5-
background-color: #fff;
6-
-webkit-box-shadow: 0 4px 8px 0 rgba(0,0,0,.07);
7-
box-shadow: 0 4px 8px 0 rgba(0,0,0,.07);
8-
border-radius: 10px;
9-
10-
h3 {
11-
margin-bottom: 20px;
12-
}
13-
14-
input,
15-
textarea {
16-
margin-bottom: 10px;
17-
}
18-
19-
p {
20-
margin: 0;
21-
}
22-
}
23-
24-
@media (max-width: 575px) {
25-
.contact-block {
26-
width: auto;
27-
}
28-
}
1+
.contact-block {
2+
width: 380px;
3+
margin: auto;
4+
padding: 40px;
5+
background-color: #fff;
6+
-webkit-box-shadow: 0 4px 8px 0 rgba(0,0,0,.07);
7+
box-shadow: 0 4px 8px 0 rgba(0,0,0,.07);
8+
border-radius: 10px;
9+
10+
h3 {
11+
margin-bottom: 20px;
12+
}
13+
14+
input,
15+
textarea {
16+
margin-bottom: 10px;
17+
}
18+
19+
p {
20+
margin: 0;
21+
}
22+
}
23+
24+
@media (max-width: 575px) {
25+
.contact-block {
26+
width: auto;
27+
}
28+
}

0 commit comments

Comments
 (0)