uawdijnntqw1x1x1
IP : 216.73.216.109
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
www
/
wp-content
/
plugins
/
charitable
/
assets
/
js
/
admin
/
charitable-admin-2.0.min.js
/
/
var CharitableAdminUI=window.CharitableAdminUI||function(document,window,$){var s={};var elements={};var app={settings:{clickWatch:false},init:function(){s=this.settings;$(app.ready)},ready:function(){app.moveNavigationElements();elements.$addNewCampaignButton=$("body.post-type-campaign .page-title-action");app.bindUIActions();var urlParams=new URLSearchParams(window.location.search);if(urlParams.has("create")&&"campaign"===urlParams.get("create")){app.newCampaignPopup();urlParams.delete("create");window.history.pushState({},"","/wp-admin/edit.php?"+urlParams.toString())}$(document).ready((function(){app.scrollToAnchor()}));$(window).on("hashchange",(function(){app.scrollToAnchor()}));if($("body").hasClass("charitable_page_charitable-dashboard")&&$("#charitable-plugin-notifications").find(".notification-cards-active .charitable-notification").length>0){if(typeof charitable_admin.autoshow_plugin_notifications!=="undefined"&&charitable_admin.autoshow_plugin_notifications){$("body").addClass("charitable-show-notifications");$("#charitable-plugin-notifications").addClass("in");$("body").find(".charitable-notifications-overlay").fadeIn()}}},moveNavigationElements:function(){if($("body.post-type-charitable.edit-tags-php").length>0){$("#charitable-tools-nav").insertBefore("h1.wp-heading-inline")}},bindUIActions:function(){$("body.post-type-campaign").on("click",".charitable-campaign-list-banner a.button-link",(function(e){e.preventDefault();app.campaignListBannerPopup()}));$("body.post-type-campaign").on("click",".jconfirm-closeIcon",(function(e){s.clickWatch=false}));if(s.clickWatch===false){$("body.post-type-campaign").on("click","input.campaign_name",(function(e){e.preventDefault();$(this).select();s.clickWatch=true}))}if($(".charitable-blank-slate-create-campaign").length>0){$("body.post-type-campaign").on("click",".charitable-blank-slate-create-campaign",(function(e){e.preventDefault();app.newCampaignPopup()}))}app.initWelcome();app.initUpgradeModal();app.initNotifications();app.initAMNotifications();app.initSquareLegacyModal()},initAMNotifications:function(){if($(".charitable-notification-inbox").length>0){$("body").on("click",".charitable-notification-inbox, .charitable-close, #toplevel_page_charitable li.notifications, .charitable-report-card.charitable-dashboard-notifications .more a, p.charitable-view-notifications a",(function(e){e.preventDefault();$("body").toggleClass("charitable-show-notifications");$("#charitable-plugin-notifications").toggleClass("in");$("body").find(".charitable-notifications-overlay").fadeToggle()}))}if($(".charitable-notifications-overlay").length>0){$("body").on("click",".charitable-notifications-overlay",(function(e){e.preventDefault();$("body").removeClass("charitable-show-notifications");$("#charitable-plugin-notifications").removeClass("in");$("body").find(".charitable-notifications-overlay").fadeOut()}));$(".charitable-notification").on("click","a.dismiss",(function(e){e.preventDefault();var $this=$(this),notification_id=$this.closest(".charitable-notification").data("notification-id");$.ajax({type:"POST",url:ajaxurl,data:{action:"charitable_notification_dismiss",notification_id:notification_id,nonce:charitable_admin.nonce},success:function(response){if(response.success){var the_counts=app.moveAMNotificationToDismissed($("body").find('#charitable-plugin-notifications .charitable-notification[data-notification-id="'+notification_id+'"]')),active_notification_count=the_counts.active_notification_count,dismissed_notification_count=the_counts.dismissed_notification_count;if(active_notification_count===0){$(".charitable-notification-cards.notification-cards-active .charitable-notification").remove();if($("#charitable-dashboard-report-sections").length>0){$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notification").remove()}$(".charitable-dashboard-notifications").find(".no-items").removeClass("charitable-hidden");$(".charitable-dashboard-notifications").find(".the-list").addClass("charitable-hidden");$("#charitable-plugin-notifications .new-notifications").html("No new notifications");$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notifications .header h4").html("Notifications");$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notifications").find(".charitable-report-ui").html('<div class="no-items"><p><strong>There is currently no active notifications.</strong></p><p class="link charitable-view-notifications"><a href="#">View Notification<img src="/wp-content/plugins/charitable/assets/images/icons/east.svg"></a></p></div>');$(".charitable-notification-inbox").find(".number").remove();$("#toplevel_page_charitable").find("li.notifications .charitable-menu-notification-indicator").remove();$("#charitable-plugin-notifications").find(".dismiss-all").remove()}else{$("#charitable-plugin-notifications").find("#new-notifications-count").html(active_notification_count);$(".charitable-notification-inbox").find(".number").html(active_notification_count);var active_notification_count_dashboard=$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notifications .charitable-notification").length;if(active_notification_count>active_notification_count_dashboard){if(active_notification_count===1){$("#charitable-dashboard-report-sections").find("#new-notifications-count-dashboard").html(active_notification_count+"+");$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notifications").find(".charitable-report-ui").html('<div class="no-items"><p><strong>There is currently one active notification.</strong></p><p class="link charitable-view-notifications"><a href="#">View Notification<img src="/wp-content/plugins/charitable/assets/images/icons/east.svg"></a></p></div>')}else{$("#charitable-dashboard-report-sections").find("#new-notifications-count-dashboard").html(active_notification_count_dashboard+"+")}}else{$("#charitable-dashboard-report-sections").find("#new-notifications-count-dashboard").html(active_notification_count_dashboard)}}var active_notification_count_dashboard=$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notifications .charitable-notification").length;$("#charitable-plugin-notifications").find("#new-notifications-count").html(active_notification_count);if(active_notification_count>active_notification_count_dashboard){if(active_notification_count===1){$("#charitable-dashboard-report-sections").find("#new-notifications-count-dashboard").html(active_notification_count+"+");$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notifications").find(".charitable-report-ui").html('<div class="no-items"><p><strong>There is currently one active notification.</strong></p><p class="link charitable-view-notifications"><a href="#">View Notification<img src="/wp-content/plugins/charitable/assets/images/icons/east.svg"></a></p></div>')}else{$("#charitable-dashboard-report-sections").find("#new-notifications-count-dashboard").html(active_notification_count_dashboard+"+")}}else{$("#charitable-dashboard-report-sections").find("#new-notifications-count-dashboard").html(active_notification_count_dashboard)}if(active_notification_count===1){app.replaceNotifications(".new-notifications.notifications-visible");if($("#charitable-dashboard-report-sections").length>0){app.replaceNotifications(".charitable-dashboard-notifications .header h4")}}$("#charitable-plugin-notifications").find("#dismissed-notifications-count").text(dismissed_notification_count);if(dismissed_notification_count===1){app.replaceNotifications("#charitable-plugin-notifications .old-notifications strong")}else{app.replaceNotification("#charitable-plugin-notifications .old-notifications strong")}}}})}));$(".charitable-plugin-notifications .notification-menu").on("click",".dismiss-all a.dismiss",(function(e){e.preventDefault();var $this=$(this),notification_ids=[];$(".charitable-notification").each((function(){notification_ids.push($(this).data("notification-id"))}));$.ajax({type:"POST",url:ajaxurl,data:{action:"charitable_notification_dismiss_multiple",notification_ids:notification_ids,nonce:charitable_admin.nonce},success:function(response){if(response.success){$this.remove();var active_notification_count=0,dismissed_notification_count=0;$("#charitable-plugin-notifications .charitable-notification").each((function(){var the_counts=app.moveAMNotificationToDismissed($(this));active_notification_count=the_counts.active_notification_count,dismissed_notification_count=the_counts.dismissed_notification_count}));$(".charitable-notification-cards.notification-cards-active .charitable-notification").remove();if($("#charitable-dashboard-report-sections").length>0){$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notification").remove()}$(".charitable-dashboard-notifications").find(".no-items").removeClass("charitable-hidden");$(".charitable-dashboard-notifications").find(".the-list").addClass("charitable-hidden");$("#charitable-plugin-notifications .new-notifications").html("No new notifications");$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notifications .header h4").html("Notifications");$(".charitable-notification-inbox").find(".number").remove();$("#toplevel_page_charitable").find("li.notifications .charitable-menu-notification-indicator").remove();$("#charitable-plugin-notifications").find("#new-notifications-count").html(active_notification_count);$("#charitable-dashboard-report-sections").find("#new-notifications-count-dashboard").html(active_notification_count);$("#charitable-plugin-notifications").find("#dismissed-notifications-count").html(dismissed_notification_count);$("#charitable-dashboard-report-sections").find(".charitable-dashboard-notifications").find(".charitable-report-ui").html('<div class="no-items"><p><strong>There is currently no active notifications.</strong></p><p class="link charitable-view-notifications"><a href="#">View Notification<img src="/wp-content/plugins/charitable/assets/images/icons/east.svg"></a></p></div>')}}})}));$(".charitable-plugin-notifications .notification-menu").on("click",".dismissed-notifications a",(function(e){e.preventDefault();var $this=$(this),$container=$this.closest(".notification-menu"),$dismissed=$container.find(".notification-cards-dismissed"),$active=$container.find(".notification-cards-active"),$new_notifications_title=$container.find(".new-notifications"),$old_notifications_title=$container.find(".old-notifications"),$dismiss_all_element=$container.find(".dismiss-all a.dismiss"),active_notification_count=$("#charitable-plugin-notifications .notification-cards-active .charitable-notification").length,dismissed_notification_count=$("#charitable-plugin-notifications .notification-cards-dismissed .charitable-notification").length;if($this.data("status")!=="active"){if(active_notification_count===1){$this.html("Active Notification")}else{$this.html("Active Notifications")}$this.data("status","active")}else{if(dismissed_notification_count===1){$this.html("Dismissed Notification")}else{$this.html("Dismissed Notification")}$this.data("status","dismissed")}$active.toggleClass("notification-cards-visible");$dismissed.toggleClass("notification-cards-visible");$new_notifications_title.toggleClass("notifications-visible");$old_notifications_title.toggleClass("notifications-visible");$dismiss_all_element.toggleClass("charitable-hidden")}))}},replaceNotifications:function(selector){$(selector).each((function(){var currentText=$(this).text();var newText=currentText.replace(/Notifications/g,"Notification");$(this).text(newText)}))},replaceNotification:function(selector){$(selector).each((function(){var currentText=$(this).text();var newText=currentText.replace(/Notification/g,"Notifications");$(this).text(newText)}))},moveAMNotificationToDismissed:function($notification){if($(".notification-no-dismissed-title").length>0){$(".notification-no-dismissed-title").closest(".notification-card").remove()}$notification.find(".dismiss").remove();$notification.appendTo("#charitable-plugin-notifications .notification-cards-dismissed").show();if($("#charitable-dashboard-report-sections").length>0){$("#charitable-dashboard-report-sections").find('.charitable-dashboard-notifications .charitable-notification[data-notification-id="'+$notification.data("notification-id")+'"]').remove()}var active_notification_count=$("#charitable-plugin-notifications .notification-cards-active .charitable-notification").length,dismissed_notification_count=$("#charitable-plugin-notifications .notification-cards-dismissed .charitable-notification").length;return{active_notification_count:active_notification_count,dismissed_notification_count:dismissed_notification_count}},initNotifications:function(){$("body .charitable-dashboard-notification-navigation").on("click","a",(function(e){e.preventDefault();var $this=$(this),notification_number=$this.closest(".charitable-dashboard-notifications").find(".charitable-dashboard-notification:not(.charitable-hidden)").data("notification-number"),notification_id=$this.closest(".charitable-dashboard-notifications").find(".charitable-dashboard-notification:not(.charitable-hidden)").data("notification-id"),notification_type=$this.closest(".charitable-dashboard-notifications").find(".charitable-dashboard-notification:not(.charitable-hidden)").data("notification-type"),notification_count=$this.closest(".charitable-dashboard-notifications").find(".charitable-dashboard-notification").length,$container=$this.closest(".charitable-dashboard-notifications");if($this.hasClass("next")){$container.find('.charitable-dashboard-notification[data-notification-number="'+notification_number+'"]').addClass("charitable-hidden");notification_number++;if(notification_number>notification_count){notification_number=1}$container.find('.charitable-dashboard-notification[data-notification-number="'+notification_number+'"]').removeClass("charitable-hidden")}else if($this.hasClass("prev")){$container.find('.charitable-dashboard-notification[data-notification-number="'+notification_number+'"]').addClass("charitable-hidden");notification_number--;if(notification_number<1){notification_number=notification_count}$container.find('.charitable-dashboard-notification[data-notification-number="'+notification_number+'"]').removeClass("charitable-hidden")}}));$("body .charitable-dashboard-notifications").on("click",".charitable-remove-dashboard-notification",(function(e){e.preventDefault();var $this=$(this),$container=$this.closest(".charitable-dashboard-notifications"),notification_id=$container.find(".charitable-dashboard-notification:not(.charitable-hidden)").data("notification-id");$.ajax({type:"POST",url:ajaxurl,data:{action:"charitable_disable_dashboard_notification",notification_id:notification_id,nonce:charitable_admin.nonce},success:function(response){if(response.success){$container.find('.charitable-dashboard-notification[data-notification-id="'+notification_id+'"]').remove();var notification_count=$container.find(".charitable-dashboard-notification").length;if(notification_count===0){$container.remove()}}}})}))},scrollToAnchor:function(){var hash=window.location.hash;hash=hash.substring(1);if(hash){hash=hash.replace(/[^a-zA-Z0-9-_]/g,"");var $target=$("a#wpchr-"+hash),$container=false;if($target.length){$container=$target.length?$target.closest(".charitable-growth-content"):false}$(".charitable-growth-content").removeClass("charitable-selected");if($target.length){$("html, body").animate({scrollTop:$target.offset().top-100},1e3);$container.addClass("charitable-selected")}}},newCampaignPopup:function(){var admin_url=typeof charitable_admin!=="undefined"&&typeof charitable_admin.admin_url!=="undefined"?charitable_admin.admin_url:"/wp-admin/",box_width=$(window).width()*.5;if(box_width>770){box_width=770}$.confirm({title:"Create Campaign",content:""+'<form id="create-campaign-form" method="POST" action="'+admin_url+'admin.php?page=charitable-campaign-builder&view=template" class="formName">'+'<div class="form-group">'+"<label>Name:</label>"+'<input type="text" placeholder="Campaign Name" value="My New Campaign" name="campaign_name" class="name campaign_name form-control" required />'+"</div>"+"</form>",closeIcon:true,boxWidth:box_width+"px",useBootstrap:false,type:"create-campaign",animation:"none",buttons:{formSubmit:{text:"Create Campaign",btnClass:"btn-green",action:function(){var campaign_name=this.$content.find(".campaign_name").val().trim();if(!campaign_name){$.alert("Please provide a valid campaign name.");return false}else{$(".jconfirm-buttons button.btn").html("Creating...");$("#create-campaign-form").submit();return false}}}},onContentReady:function(){}})},campaignListBannerPopup:function(){var plugin_asset_dir=typeof charitable_admin.plugin_asset_dir!=="undefined"?charitable_admin.plugin_asset_dir:"/wp-content/plugins/charitable/assets";$.confirm({title:false,content:""+'<div class="charitable-lite-pro-popup">'+'<div class="charitable-lite-pro-popup-left" >'+"<h1>The Ambassadors Extension is only available for Charitable Pro users.</h1>"+"<h2>Harness the power of supporter networks and friends to reach more people and raise more money for your cause.</h2>"+"<ul>"+"<li><p>Create a crowdfunding platform (similar to GoFundMe)</p></li>"+"<li><p>Simplified fundraiser creation and management</p></li>"+"<li><p>Let supporters fundraise together through our Teams feature</p></li>"+"<li><p>Integrate with email marketing to follow up with campaign creators</p></li>"+"<li><p>Give people a place to fundraise for their own cause</p></li>"+"</ul>"+'<a href="https://wpcharitable.com/lite-vs-pro/?utm_source=WordPress&utm_medium=Ambassadors+Campaign+Modal+Unlock&utm_campaign=WP+Charitable" target="_blank" class="charitable-lite-pro-popup-button">Unlock Peer-to-Peer Fundraising</a>'+'<a href="https://wpcharitable.com/lite-vs-pro/?utm_source=WordPress&utm_medium=Ambassadors+Campaign+Modal+More&utm_campaign=WP+Charitable" target="_blank" class="charitable-lite-pro-popup-link">Or learn more about the Ambassadors extension →</a>'+"</div>"+'<div class="charitable-lite-pro-popup-right" >'+'<img src="'+plugin_asset_dir+'images/lite-to-pro/ambassador.png" alt="Charitable Ambassador Extension" >'+"</img>"+"</div>",closeIcon:true,alignMiddle:true,boxWidth:"986px",useBootstrap:false,animation:"none",buttons:false,type:"lite-pro-ad",onContentReady:function(){}})},initWelcome:function(){$(document).on("click","#charitable-welcome .play-video",(function(event){event.preventDefault();const video='<div class="video-container"><iframe width="1280" height="720" src="https://www.youtube-nocookie.com/embed/834h3huzzk8?rel=0&showinfo=0&autoplay=1" frameborder="0" allowfullscreen></iframe></div>';if(typeof jconfirm!=="undefined"){jconfirm.defaults={closeIcon:true,backgroundDismiss:false,escapeKey:true,animationBounce:1,useBootstrap:false,theme:"modern",animateFromElement:false};$.dialog({title:false,content:video,closeIcon:true,boxWidth:"1300"})}}))},initUpgradeModal:function(){$(document).on("click",".charitable-upgrade-modal",(function(){$.alert({title:charitable_admin.thanks_for_interest,content:charitable_admin.upgrade_modal,icon:"fa fa-info-circle",type:"blue",boxWidth:"550px",useBootstrap:false,theme:"modern,charitable-install-form",closeIcon:false,draggable:false,buttons:{confirm:{text:charitable_admin.ok,btnClass:"btn-confirm",keys:["enter"]}}})}))},initSquareLegacyModal:function(){$(document).on("click",'a[href*="charitable_action=enable_gateway"][href*="gateway_id=square_core"]',(function(e){if(typeof CHARITABLE!=="undefined"&&CHARITABLE.square_legacy_active&&!CHARITABLE.square_core_active){e.preventDefault();$.alert({title:CHARITABLE.heads_up,content:CHARITABLE.square_legacy_modal_message,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:CHARITABLE.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){$.post(CHARITABLE.ajax_url,{action:"charitable_switch_square_gateways",nonce:CHARITABLE.nonce},(function(response){if(response.success){window.location.href=response.data.redirect_url}else{$.alert({title:CHARITABLE.oops,content:CHARITABLE.square_legacy_switch_error,icon:"fa fa-exclamation-circle",type:"red",buttons:{confirm:{text:CHARITABLE.ok,btnClass:"btn-confirm",keys:["enter"]}}})}})).fail((function(){$.alert({title:CHARITABLE.oops,content:CHARITABLE.square_legacy_switch_error,icon:"fa fa-exclamation-circle",type:"red",buttons:{confirm:{text:CHARITABLE.ok,btnClass:"btn-confirm",keys:["enter"]}}})}))}},cancel:{text:CHARITABLE.cancel,keys:["esc"]}}})}}));$(document).on("click",'a[href*="charitable_action=enable_gateway"][href*="gateway_id=square"]',(function(e){if(typeof CHARITABLE!=="undefined"&&CHARITABLE.square_core_active&&!CHARITABLE.square_legacy_active){e.preventDefault();$.alert({title:CHARITABLE.heads_up,content:CHARITABLE.square_core_modal_message,icon:"fa fa-exclamation-circle",type:"orange",buttons:{confirm:{text:CHARITABLE.ok,btnClass:"btn-confirm",keys:["enter"],action:function(){$.post(CHARITABLE.ajax_url,{action:"charitable_switch_square_core_to_legacy",nonce:CHARITABLE.nonce},(function(response){if(response.success){window.location.href=response.data.redirect_url}else{$.alert({title:CHARITABLE.oops,content:CHARITABLE.square_legacy_switch_error,icon:"fa fa-exclamation-circle",type:"red",buttons:{confirm:{text:CHARITABLE.ok,btnClass:"btn-confirm",keys:["enter"]}}})}})).fail((function(){$.alert({title:CHARITABLE.oops,content:CHARITABLE.square_legacy_switch_error,icon:"fa fa-exclamation-circle",type:"red",buttons:{confirm:{text:CHARITABLE.ok,btnClass:"btn-confirm",keys:["enter"]}}})}))}},cancel:{text:CHARITABLE.cancel,keys:["esc"]}}})}}))}};return app}(document,window,jQuery);CharitableAdminUI.init();
/home/batcwwjx/www/wp-content/plugins/charitable/assets/js/admin/charitable-admin-2.0.min.js