<script defer src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/js/all.min.js"></script>
<script defer src="{{ asset('assets/jquery-number/jquery.number.min.js') }}"></script>
<script defer src="{{ asset('assets/lazyload.js') }}"></script>
<script defer src="{{ asset('assets/lazyImg.js') }}"></script>
<script defer src="{{ asset('assets/jquery.inputmask.bundle.min.js') }}"></script>
<script defer src="{{ asset('assets/jquery.numeric.min.js') }}"></script>
<script defer src="{{ asset('assets/jquery.priceformat.min.js') }}"></script>
<script defer src="{{ asset('sharer.js') }}"></script>
<script>
function lazy() {
(function() {
function logElementEvent(eventName, element) {
console.log(
Date.now(),
eventName,
element.getAttribute("data-src")
);
}
var callback_enter = function(element) {
logElementEvent("🔑 GİRDİ", element);
};
var callback_exit = function(element) {
logElementEvent("🚪 ÇIKTI", element);
};
var callback_reveal = function(element) {
logElementEvent("👁️ AÇIKLIĞA KAVUŞTU", element);
};
var callback_loaded = function(element) {
logElementEvent("👍 YÜKLENDİ", element);
};
var callback_error = function(element) {
logElementEvent("💀 HATALI", element);
element.src =
"/resimyok.webp";
};
var callback_finish = function() {
logElementEvent("✔️ TAMAMLANDI", document.documentElement);
};
var ll = new LazyLoad({
elements_selector: ".lazy",
// Assign the callbacks defined above
callback_enter: callback_enter,
callback_exit: callback_exit,
callback_reveal: callback_reveal,
callback_loaded: callback_loaded,
callback_error: callback_error,
callback_finish: callback_finish
});
})();
}
function checkEmail(email) {
var filter = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/;
if (!filter.test(email)) {
//alert('Lütfen uygun formatta bir mail adresi giriniz !');
return false;
}
else{
//alert('Mail adresi uygun formattadır.');
return true;
}
}
$().ready(function () {
if($('.preloader').length){$('.preloader').delay(200).fadeOut(500); }
$('.priceFormat').priceFormat({
prefix: '',
thousandsSeparator: ''
});
$(":input").inputmask();
$('.numeric').numeric();
{% if ''|dilSay > 1 %}
$('body').prepend('<div class="rv_language">\n' +
' <div class="rv_lang-icon animated shake delay-5s">\n' +
' <img class="" src="{{ asset('assets/language.webp') }}" width="32" height="32" alt="language" />\n' +
' </div>\n' +
' <div class="rv_lang">\n' +
' <h4><img class="" src="{{ asset('assets/flag/'~app.session.get('dil')['kisa']~'.webp') }}" width="25" height="20" alt="{{ app.session.get('dil')['kisa'] }}"> <span class="lang_text">{{ app.session.get('dil')['uzun']|ceviri }} ({{ app.session.get('dil')['kisa']|upper }})</span></h4>\n' +
'\n' +
' <ul>\n' +
' {{ ''|site_dilGetir|raw }}\n' +
' </ul>\n' +
' </div>\n' +
'</div>');
{% endif %}
$('.rv_lang-icon').click(function () {
$('.rv_language').css('right',0);
setTimeout(function () {
$('.rv_language').css('right','-200px');
},5000);
});
{% set popup = sayfa.dilgrup|default(0)|site_popupGetir %}
{% if popup|default('')!="" %}
{% if popup.link|default('')!='' %}
$('body').append('<a href="{{popup.link}}" style="position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 9999;"></a>');
{% endif %}
setTimeout(function (){
{%if popup.tip==0%}
new Fancybox([
{
src: "{{path('panel_storage',{'file':popup.veri})}}",
},
]);
{%else%}
new Fancybox([
{
src: "{{popup.veri}}",
},
]);
{%endif%}
},1000);
{% endif %}
});
function formKayit(adi){
var hata = 0;
var eHata = 0;
var inputSayi = $('.'+adi+' input[type=text]').length;
for(var i=0;i<inputSayi;i++){
if ($('.'+adi+' input[type=text]:eq('+i+')').prop('required')==true){
if ($('.'+adi+' input[type=text]:eq('+i+')').val()==''){
hata++;
}
}
}
var emailSayi = $('.'+adi+' input[type=email]').length;
for(var i=0;i<emailSayi;i++){
if ($('.'+adi+' input[type=email]:eq('+i+')').prop('required')==true){
if (($('.'+adi+' input[type=email]:eq('+i+')').val()=='') || (!checkEmail($('.'+adi+' input[type=email]:eq('+i+')').val()))){
eHata++;
}
}else{
if($('.'+adi+' input[type=email]:eq('+i+')').val()!=''){
if(!checkEmail($('.'+adi+' input[type=email]:eq('+i+')').val())){
eHata++;
}
}
}
}
var txtSayi = $('.'+adi+' textarea').length;
for(var i=0;i<txtSayi;i++){
if ($('.'+adi+' textarea:eq('+i+')').prop('required')==true){
if ($('.'+adi+' textarea:eq('+i+')').val()==''){
hata++;
}
}
}
var selectSayi = $('.'+adi+' select').length;
for(var i=0;i<selectSayi;i++){
if ($('.'+adi+' select:eq('+i+')').prop('required')==true){
if ($('.'+adi+' select:eq('+i+')').val()==''){
hata++;
}
}
}
var fileSayi = $('.'+adi+' input[type=file]').length;
for(var i=0;i<fileSayi;i++){
if ($('.'+adi+' input[type=file]:eq('+i+')').prop('required')==true){
var fileId = $('.'+adi+' input[type=file]:eq('+i+')').attr('id');
if (document.getElementById(fileId).files[0]==undefined){
hata++;
}
}
}
var checkSayi = $('.'+adi+' input[type=checkbox]').length;
for(var i=0;i<checkSayi;i++){
checkClass = $('.'+adi+' input[type=checkbox]:eq('+i+')').attr('class');
var icCheckEdilen = 0;
var icCheckSayi = $('.'+adi+' .'+checkClass).length;
if ($('.'+adi+' .'+checkClass+':eq(0)').prop('required')==true) {
for(var y=0;y<icCheckSayi;y++){
if($('.'+adi+' .'+checkClass+':eq('+y+')').prop('checked')==true){
icCheckEdilen++;
}
}
if(icCheckEdilen==0){
hata++;
}
}
}
var radioSayi = $('.'+adi+' input[type=radio]').length;
for(var i=0;i<radioSayi;i++){
radioClass = $('.'+adi+' input[type=radio]:eq('+i+')').attr('class');
var icRadioEdilen = 0;
var icRadioSayi = $('.'+adi+' .'+radioClass).length;
if ($('.'+adi+' .'+radioClass+':eq(0)').prop('required')==true) {
for(var y=0;y<icRadioSayi;y++){
if($('.'+adi+' .'+radioClass+':eq('+y+')').prop('checked')==true){
icRadioEdilen++;
}
}
if(icRadioEdilen==0){
hata++;
}
}
}
if(hata>0){
$('.hata_'+adi).html('<div class="alert alert-danger">{{ 'Lütfen zorunlu alanları doldurunuz.'|ceviri }}</div>');
return false;
}
if(eHata>0){
$('.hata_'+adi).html('<div class="alert alert-danger">{{ 'Mail adresiniz geçersiz veya boş bırakılmış.'|ceviri }}</div>');
return false;
}
$('.'+adi+' .formBtn').html('Lütfen Bekleyin..');
$('.'+adi+' .formBtn').prop('disabled',true);
$('.'+adi).submit();
}
</script>
{{ 'ozelHead'|ayarlar|default('')|raw }}