-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #500 from dotkernel/issue-498
Issue #498: Fixed CRLF files and restored `.gitattributes`
- Loading branch information
Showing
11 changed files
with
925 additions
and
919 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
|
||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
Oops, something went wrong.