| 1 |
(function($){ |
| 2 |
'use sticky' |
| 3 |
$(document).ready(function() { |
| 4 |
|
| 5 |
$('body.bbpc-no-pro .st-pro-notice ul li:last-child label input').attr('disabled', true); |
| 6 |
$('body.bbpc-no-pro.bbpc-geo-roles .bbpc-geo-roles-opt').removeClass('st-pro-notice'); |
| 7 |
// BBP Core pro notice. |
| 8 |
function bbpc_pro_notice() { |
| 9 |
if ( $('body').hasClass('bbpc-no-pro') ) { |
| 10 |
$('.st-pro-notice').on('click', function (e) { |
| 11 |
e.preventDefault(); |
| 12 |
Swal.fire({ |
| 13 |
title: 'Opps...', |
| 14 |
html: 'This is a PRO feature. You need to <a href="admin.php?page=bbp-core-pricing"><strong class="upgrade-link">Upgrade ➤</strong></a> to the Premium Version to use this feature', |
| 15 |
icon: "warning", |
| 16 |
buttons: [false, "Close"], |
| 17 |
dangerMode: true |
| 18 |
}) |
| 19 |
}); |
| 20 |
} else { |
| 21 |
// rmeove class if it has pro notice class |
| 22 |
$('.csf-field').removeClass('st-pro-notice'); |
| 23 |
} |
| 24 |
} |
| 25 |
bbpc_pro_notice(); |
| 26 |
|
| 27 |
// Notification pro alert |
| 28 |
$('.easydocs-notification.pro-notification-alert').on('click', function (e) { |
| 29 |
e.preventDefault(); |
| 30 |
let href = $(this).attr('href') |
| 31 |
let assets = eazydocs_local_object.EAZYDOCS_ASSETS; |
| 32 |
Swal.fire({ |
| 33 |
title: 'Notification is a Premium feature', |
| 34 |
html: '<span class="pro-notification-body-text">You need to Upgrade the Premium Version to use this feature</span><video height="400px" autoplay="autoplay" loop="loop" src="'+assets+'/videos/noti.mp4"></video>', |
| 35 |
icon: false, |
| 36 |
buttons: false, |
| 37 |
dangerMode: true, |
| 38 |
showCloseButton: true, |
| 39 |
confirmButtonText: |
| 40 |
'<a href="admin.php?page=eazydocs-pricing">Upgrade to Premium</a>', |
| 41 |
footer: '<a href="https://spider-themes.net/eazydocs/" target="_blank"> Learn More </a>', |
| 42 |
|
| 43 |
customClass: { |
| 44 |
title: 'upgrade-premium-heading', |
| 45 |
confirmButton: 'upgrade-premium-button', |
| 46 |
footer: 'notification-pro-footer-wrap', |
| 47 |
}, |
| 48 |
confirmButtonColor: '#f1bd6c', |
| 49 |
Borderless: true, |
| 50 |
|
| 51 |
}) |
| 52 |
}); |
| 53 |
|
| 54 |
// Remove condition if it has pro notice class |
| 55 |
$('.st-pro-notice').attr('data-condition', ''); |
| 56 |
|
| 57 |
}) |
| 58 |
})(jQuery); |