From 80face0a946fa1e90564770a9fb5cafe4123b7d6 Mon Sep 17 00:00:00 2001 From: Jitendra Banjara Date: Thu, 19 Dec 2024 22:49:29 +0530 Subject: [PATCH] PROD-8348 - Grunt --- src/bp-templates/bp-nouveau/js/buddypress-notifications.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bp-templates/bp-nouveau/js/buddypress-notifications.min.js b/src/bp-templates/bp-nouveau/js/buddypress-notifications.min.js index 98bd238457..b66fac3c62 100644 --- a/src/bp-templates/bp-nouveau/js/buddypress-notifications.min.js +++ b/src/bp-templates/bp-nouveau/js/buddypress-notifications.min.js @@ -1 +1 @@ -window.bp=window.bp||{},function(o){"undefined"!=typeof BP_Nouveau&&(bp.Nouveau=bp.Nouveau||{},bp.Nouveau.Notifications={start:function(){this.setupGlobals(),this.addListeners()},setupGlobals:function(){bp.Nouveau.setStorage("bp-notifications","extras","DESC")},addListeners:function(){o('#buddypress [data-bp-list="notifications"]').on("bp_ajax_request",this.prepareDocument),o('#buddypress [data-bp-list="notifications"]').on("click","[data-bp-notifications-order]",bp.Nouveau,this.sortNotifications),o('#buddypress [data-bp-list="notifications"]').on("change","#notification-select",this.enableBulkSubmit),o('#buddypress [data-bp-list="notifications"]').on("click","#select-all-notifications",this.selectAll),o('#buddypress [data-bp-list="notifications"]').on("click",".notification-check",this.checkSelectAllOrNot),o(window).on("unload",this.resetFilter)},prepareDocument:function(){"ASC"===bp.Nouveau.getStorage("bp-notifications").extras?(o('[data-bp-notifications-order="DESC"]').show(),o('[data-bp-notifications-order="ASC"]').hide()):(o('[data-bp-notifications-order="ASC"]').show(),o('[data-bp-notifications-order="DESC"]').hide()),o("#notification-bulk-manage").prop("disabled","disabled")},sortNotifications:function(t){var i=t.data.getStorage("bp-notifications"),e=i.scope||null,a=i.filter||null,i=(i.extra,"");t.preventDefault(),t=o(t.currentTarget).data("bp-notifications-order"),bp.Nouveau.setStorage("bp-notifications","extras",t),o('#buddypress [data-bp-search="notifications"] input[type=search]').length&&(i=o('#buddypress [data-bp-search="notifications"] input[type=search]').val()),bp.Nouveau.objectRequest({object:"notifications",scope:e,filter:a,search_terms:i,extras:t,page:1})},enableBulkSubmit:function(e){o("#notification-bulk-manage").prop("disabled",o(e.currentTarget).val().length<=0),!0===o('#buddypress [data-bp-list="notifications"]').find("#select-all-notifications").prop("checked")&&o.each(o(".notification-check"),function(t,i){"unread"!==o(e.currentTarget).val()&&""!==o(e.currentTarget).val()||""===o(i).attr("data-readonly")?o(i).prop("checked",!0):o(i).prop("checked",!1)})},selectAll:function(e){var a=o("#notification-select").val();o.each(o(".notification-check"),function(t,i){("unread"!==a&&""!==a||""===o(i).attr("data-readonly"))&&o(i).prop("checked",o(e.currentTarget).prop("checked"))})},checkSelectAllOrNot:function(t){var e=0;"1"===o(this).attr("data-readonly")&&(o(this).blur(),t.preventDefault()),o.each(o(".notification-check"),function(t,i){0==o(i).prop("checked")&&(e=parseInt(e)+1)}),0==e?o('#buddypress [data-bp-list="notifications"]').find("#select-all-notifications").prop("checked",!0):o('#buddypress [data-bp-list="notifications"]').find("#select-all-notifications").prop("checked",!1)},resetFilter:function(){bp.Nouveau.setStorage("bp-notifications","filter",0)}},bp.Nouveau.Notifications.start())}((bp,jQuery)); \ No newline at end of file +window.bp=window.bp||{},function(o){"undefined"!=typeof BP_Nouveau&&(bp.Nouveau=bp.Nouveau||{},bp.Nouveau.Notifications={start:function(){this.setupGlobals(),this.addListeners(),this.prepareDocument()},setupGlobals:function(){bp.Nouveau.setStorage("bp-notifications","extras","DESC")},addListeners:function(){o('#buddypress [data-bp-list="notifications"]').on("bp_ajax_request",this.prepareDocument),o('#buddypress [data-bp-list="notifications"]').on("click","[data-bp-notifications-order]",bp.Nouveau,this.sortNotifications),o('#buddypress [data-bp-list="notifications"]').on("change","#notification-select",this.enableBulkSubmit),o('#buddypress [data-bp-list="notifications"]').on("click","#select-all-notifications",this.selectAll),o('#buddypress [data-bp-list="notifications"]').on("click",".notification-check",this.checkSelectAllOrNot),o(window).on("unload",this.resetFilter)},prepareDocument:function(){("ASC"===bp.Nouveau.getStorage("bp-notifications").extras?(o('[data-bp-notifications-order="DESC"]').show(),o('[data-bp-notifications-order="ASC"]')):(o('[data-bp-notifications-order="ASC"]').show(),o('[data-bp-notifications-order="DESC"]'))).hide(),o("#notification-bulk-manage").prop("disabled","disabled")},sortNotifications:function(t){var i=t.data.getStorage("bp-notifications"),e=i.scope||null,a=i.filter||null,i=(i.extra,"");t.preventDefault(),t=o(t.currentTarget).data("bp-notifications-order"),bp.Nouveau.setStorage("bp-notifications","extras",t),o('#buddypress [data-bp-search="notifications"] input[type=search]').length&&(i=o('#buddypress [data-bp-search="notifications"] input[type=search]').val()),bp.Nouveau.objectRequest({object:"notifications",scope:e,filter:a,search_terms:i,extras:t,page:1})},enableBulkSubmit:function(e){o("#notification-bulk-manage").prop("disabled",o(e.currentTarget).val().length<=0),!0===o('#buddypress [data-bp-list="notifications"]').find("#select-all-notifications").prop("checked")&&o.each(o(".notification-check"),function(t,i){"unread"!==o(e.currentTarget).val()&&""!==o(e.currentTarget).val()||""===o(i).attr("data-readonly")?o(i).prop("checked",!0):o(i).prop("checked",!1)})},selectAll:function(e){var a=o("#notification-select").val();o.each(o(".notification-check"),function(t,i){("unread"!==a&&""!==a||""===o(i).attr("data-readonly"))&&o(i).prop("checked",o(e.currentTarget).prop("checked"))})},checkSelectAllOrNot:function(t){var e=0;"1"===o(this).attr("data-readonly")&&(o(this).blur(),t.preventDefault()),o.each(o(".notification-check"),function(t,i){0==o(i).prop("checked")&&(e=parseInt(e)+1)}),0==e?o('#buddypress [data-bp-list="notifications"]').find("#select-all-notifications").prop("checked",!0):o('#buddypress [data-bp-list="notifications"]').find("#select-all-notifications").prop("checked",!1)},resetFilter:function(){bp.Nouveau.setStorage("bp-notifications","filter",0)}},bp.Nouveau.Notifications.start())}((bp,jQuery)); \ No newline at end of file