PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 1.2.7
Forumax – AI Powered Advanced Community Forum Plugin v1.2.7
2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 2.1.0 All 29 releases
bbp-core / assets / frontend / js / wp-widgets.js

wp-widgets.js in Forumax – AI Powered Advanced Community Forum Plugin 1.2.7, at assets/frontend/js/wp-widgets.js

30 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function($){
2 $(document).ready(function(){
3
4 $(document).on('click', '.is-subscribed a', function(e){
5 e.preventDefault();
6 $(this).text( "Unsubscribing..." );
7 $('.bbpc-unsubscribe-link').text( "Unsubscribing..." );
8 setTimeout(function(){
9 $( ".bbp__success-subscribe" ).hide();
10 }
11 , 1100);
12 });
13
14 $(document).on('click', '.show_subscribe span:not(.is-subscribed) a', function(){
15 $( ".show_subscribe span:not(.is-subscribed) a" ).text( "Subscribing..." );
16 });
17
18 // if has class
19 if ( $( ".show_subscribe .is-subscribed" ).length ) {
20 $( ".post-header" ).before( '<div class="alert alert-success bbp__success-subscribe"><div class="mailIcon"><svg width="60" height="60" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path data-name="envelope-Filled" d="M10.36 11.71 3.19 6.62A4.5 4.5 0 0 1 7 4.5h10a4.5 4.5 0 0 1 3.81 2.11l-7.15 5.08a3 3 0 0 1-3.3.02ZM21.48 8.6l-6.68 4.74a5.082 5.082 0 0 1-2.81.85 4.968 4.968 0 0 1-2.76-.84L2.52 8.6c-.01.13-.02.27-.02.4v6A4.507 4.507 0 0 0 7 19.5h10a4.507 4.507 0 0 0 4.5-4.5V9c0-.13-.01-.27-.02-.4Z" style="fill:#4c52f1"/></svg></div><span>You are subscribed to this forum, and will receive emails for future topic activity.</span> <a class="bbpc-unsubscribe-link" data-forum-id='+bbpc_localize_script.bbpc_subscribed_forum_id+' href="javascript:void()">Unsubscribe</a> from '+bbpc_localize_script.bbpc_subscribed_forum_title+'</div>' );
21 }
22
23 $('.bbpc-unsubscribe-link').click(function(){
24 let data_id = $(this).attr('data-forum-id');
25 $('#subscribe-'+data_id+' a').click().text( "Unsubscribing..." );
26 $(this).text( "Unsubscribing..." );
27 });
28
29 });
30 })(jQuery);