PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.11.3
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.11.3
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / assets / js / admin / charitable-admin-pages.js

charitable-admin-pages.js in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.11.3, at assets/js/admin/charitable-admin-pages.js

46 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1
2
3 jQuery(document).ready( function(){
4
5 jQuery('ul.wp-submenu li:contains("Upgrade to Pro") a').attr( 'target', '_blank' ); // makes pro link open in a new tab
6 jQuery('tr[data-plugin="charitable/charitable.php"]').addClass('wpcharitable-plugin-row').find('.proupgrade a').attr( 'target', '_blank' );
7
8 // check and see if the admin menu for Charitable exists at all.
9 // added in 1.8.0.5.
10 if( jQuery('li#toplevel_page_charitable ul.wp-submenu').length ) {
11 // go through Charitable admin menu and based on the text, add a css class to the parent li.
12 jQuery('li#toplevel_page_charitable ul.wp-submenu li').each( function(){
13 var text = jQuery(this).text(),
14 cssClass = text.toLowerCase().replace(/\s/g, '-');
15
16 // cleanup class a bit.
17 cssClass = cssClass.replace('new!', '');
18 cssClass = cssClass.replace('--', '-');
19 cssClass = cssClass.replace(/-$/, '');
20
21 jQuery(this).addClass( cssClass );
22 });
23 }
24
25 var setup_dashboard_widgets = function() {
26 var $widget = jQuery( '#charitable_dashboard_donations' );
27
28 if ( $widget.length ) {
29 jQuery.ajax({
30 type: "GET",
31 data: {
32 action: 'charitable_load_dashboard_donations_widget'
33 },
34 url: ajaxurl,
35 success: function (response) {
36 $widget.find( '.inside' ).html( response );
37 }
38 });
39 }
40 };
41
42 setup_dashboard_widgets();
43
44 });
45
46