Plugin Directory

Changeset 2290154


Ignore:
Timestamp:
04/23/2020 01:55:44 PM (6 years ago)
Author:
BuddyBoss
Message:

Updated Readme and Tested with WP 5.4

Location:
buddypress-edit-activity
Files:
28 added
5 edited

Legend:

Unmodified
Added
Removed
  • buddypress-edit-activity/trunk/assets/js/buddypress-edit-activity.js

    r1795112 r2290154  
    3030        B_E_A_.current_activity_org = $link.closest('[id^=acomment]').find(' > .acomment-content').html();
    3131    } else {
    32         B_E_A_.current_activity_org = $link.closest('.activity-content').find('.activity-inner').html();
     32        B_E_A_.current_activity_org = $link.closest('li').find('.activity-inner').html();
    3333    }
    3434
     
    6060                } else {
    6161                    //editing activity
    62                     $link.closest('.activity-content').find('.activity-inner').html('').hide().after($form_wrapper);
     62                    $link.closest('li').find('.activity-inner').html('').hide().after($form_wrapper);
    6363                    $cancel_button.addClass('button');
    6464                }
     
    103103                } else {
    104104                    //editing activity
    105                     $link.closest('.activity-content').find('.activity-inner').html(response.content).show();
     105                    $link.closest('li').find('.activity-inner').html(response.content).show();
    106106                }
    107107
     
    135135    } else {
    136136        //editing activity
    137         $cancel_button.closest('.activity-content').find('.activity-inner').html(B_E_A_.current_activity_org).show();
    138         $save_button = $cancel_button.closest('.activity-content').find('.buddyboss_edit_activity.action-save');
     137        $cancel_button.closest('li').find('.activity-inner').html(B_E_A_.current_activity_org).show();
     138        $save_button = $cancel_button.closest('li').find('.buddyboss_edit_activity.action-save');
    139139    }
    140140
  • buddypress-edit-activity/trunk/assets/js/buddypress-edit-activity.min.js

    r1795112 r2290154  
    1 function buddypress_edit_activity_initiate(a){return jQuery(a).hasClass("action-save")?buddypress_edit_activity_save(a):buddypress_edit_activity_get(a),!1}function buddypress_edit_activity_get(a){if(1==jQuery("li.activity-item #buddypress-edit-activity-wrapper").length&&($edit_wrapper=jQuery("li.activity-item #buddypress-edit-activity-wrapper"),$cancel_button=$edit_wrapper.next().children(".buddyboss_edit_activity_cancel"),$cancel_button.trigger("click"),window.keep_activity_changes))return!1;$link=jQuery(a),$form=jQuery("#frm_buddypress-edit-activity"),$form_wrapper=$form.parent(),$link.addClass("loading"),$link.hasClass("buddyboss_edit_activity_comment")?B_E_A_.current_activity_org=$link.closest("[id^=acomment]").find(" > .acomment-content").html():B_E_A_.current_activity_org=$link.closest(".activity-content").find(".activity-inner").html();var b={action:$form.find('input[name="action_get"]').val(),buddypress_edit_activity_nonce:$form.find('input[name="buddypress_edit_activity_nonce"]').val(),activity_id:$link.data("activity_id")};jQuery.ajax({type:"POST",url:ajaxurl,data:b,success:function(a){if(a=jQuery.parseJSON(a),a.status){$link.removeClass("loading").addClass("action-save").html(B_E_A_.button_text.save);var c=jQuery("<a href='#'>").addClass("bp-secondary-action buddyboss_edit_activity_cancel").html(B_E_A_.button_text.cancel);$link.before(c),c.attr("onclick","return buddypress_edit_activity_cancel(this);"),c.data("target_type","activity"),$link.hasClass("buddyboss_edit_activity_comment")?($link.closest("[id^=acomment]").find(" > .acomment-content").html("").hide().after($form_wrapper),c.data("target_type","comment")):($link.closest(".activity-content").find(".activity-inner").html("").hide().after($form_wrapper),c.addClass("button")),$form_wrapper.show(),$form.find('input[name="activity_id"]').val(b.activity_id),$form.find("textarea").val(a.content)}}})}function buddypress_edit_activity_save(a){$link=jQuery(a),$form=jQuery("#frm_buddypress-edit-activity"),$form_wrapper=$form.parent(),$link.addClass("loading"),jQuery(".buddyboss_edit_activity_cancel").remove();var b={action:$form.find('input[name="action_save"]').val(),buddypress_edit_activity_nonce:$form.find('input[name="buddypress_edit_activity_nonce"]').val(),activity_id:$link.data("activity_id"),content:$form.find("textarea").val()};jQuery.ajax({type:"POST",url:ajaxurl,data:b,success:function(a){a=jQuery.parseJSON(a),a.status&&($link.removeClass("loading").removeClass("action-save").html(B_E_A_.button_text.edit),$link.hasClass("buddyboss_edit_activity_comment")?$link.closest("[id^=acomment]").find(" > .acomment-content").html(a.content).show():$link.closest(".activity-content").find(".activity-inner").html(a.content).show(),$form_wrapper.hide(),jQuery("body").append($form_wrapper),window.activity_content_changed=!1,window.keep_activity_changes=!1)}})}function buddypress_edit_activity_cancel(a){if(window.activity_content_changed&&!window.confirm(B_E_A_.warn_activity_changes))return window.keep_activity_changes=!0,!1;var b=jQuery(a),c=jQuery("#frm_buddypress-edit-activity"),d=c.parent(),e="";return"comment"==b.data("target_type")?(b.closest("[id^=acomment]").find(" > .acomment-content").html(B_E_A_.current_activity_org).show(),e=b.closest("[id^=acomment]").find(".buddyboss_edit_activity_comment.action-save")):(b.closest(".activity-content").find(".activity-inner").html(B_E_A_.current_activity_org).show(),e=b.closest(".activity-content").find(".buddyboss_edit_activity.action-save")),e.removeClass("action-save").html(B_E_A_.button_text.edit),d.hide(),jQuery("body").append(d),b.remove(),window.activity_content_changed=!1,window.keep_activity_changes=!1,!1}jQuery('textarea[name="activity_content"]').on("change",function(a){window.activity_content_changed=!0}),jQuery(".acomment-reply").on("click",function(a){1==jQuery("li.activity-item #buddypress-edit-activity-wrapper").length&&($edit_wrapper=jQuery("li.activity-item #buddypress-edit-activity-wrapper"),$cancel_button=$edit_wrapper.next().children(".buddyboss_edit_activity_cancel"),$cancel_button.trigger("click"))});
     1function buddypress_edit_activity_initiate(a){return jQuery(a).hasClass("action-save")?buddypress_edit_activity_save(a):buddypress_edit_activity_get(a),!1}function buddypress_edit_activity_get(a){if(1==jQuery("li.activity-item #buddypress-edit-activity-wrapper").length&&($edit_wrapper=jQuery("li.activity-item #buddypress-edit-activity-wrapper"),$cancel_button=$edit_wrapper.next().children(".buddyboss_edit_activity_cancel"),$cancel_button.trigger("click"),window.keep_activity_changes))return!1;$link=jQuery(a),$form=jQuery("#frm_buddypress-edit-activity"),$form_wrapper=$form.parent(),$link.addClass("loading"),$link.hasClass("buddyboss_edit_activity_comment")?B_E_A_.current_activity_org=$link.closest("[id^=acomment]").find(" > .acomment-content").html():B_E_A_.current_activity_org=$link.closest("li").find(".activity-inner").html();var b={action:$form.find('input[name="action_get"]').val(),buddypress_edit_activity_nonce:$form.find('input[name="buddypress_edit_activity_nonce"]').val(),activity_id:$link.data("activity_id")};jQuery.ajax({type:"POST",url:ajaxurl,data:b,success:function(a){if(a=jQuery.parseJSON(a),a.status){$link.removeClass("loading").addClass("action-save").html(B_E_A_.button_text.save);var c=jQuery("<a href='#'>").addClass("bp-secondary-action buddyboss_edit_activity_cancel").html(B_E_A_.button_text.cancel);$link.before(c),c.attr("onclick","return buddypress_edit_activity_cancel(this);"),c.data("target_type","activity"),$link.hasClass("buddyboss_edit_activity_comment")?($link.closest("[id^=acomment]").find(" > .acomment-content").html("").hide().after($form_wrapper),c.data("target_type","comment")):($link.closest("li").find(".activity-inner").html("").hide().after($form_wrapper),c.addClass("button")),$form_wrapper.show(),$form.find('input[name="activity_id"]').val(b.activity_id),$form.find("textarea").val(a.content)}}})}function buddypress_edit_activity_save(a){$link=jQuery(a),$form=jQuery("#frm_buddypress-edit-activity"),$form_wrapper=$form.parent(),$link.addClass("loading"),jQuery(".buddyboss_edit_activity_cancel").remove();var b={action:$form.find('input[name="action_save"]').val(),buddypress_edit_activity_nonce:$form.find('input[name="buddypress_edit_activity_nonce"]').val(),activity_id:$link.data("activity_id"),content:$form.find("textarea").val()};jQuery.ajax({type:"POST",url:ajaxurl,data:b,success:function(a){a=jQuery.parseJSON(a),a.status&&($link.removeClass("loading").removeClass("action-save").html(B_E_A_.button_text.edit),$link.hasClass("buddyboss_edit_activity_comment")?$link.closest("[id^=acomment]").find(" > .acomment-content").html(a.content).show():$link.closest("li").find(".activity-inner").html(a.content).show(),$form_wrapper.hide(),jQuery("body").append($form_wrapper),window.activity_content_changed=!1,window.keep_activity_changes=!1)}})}function buddypress_edit_activity_cancel(a){if(window.activity_content_changed&&!window.confirm(B_E_A_.warn_activity_changes))return window.keep_activity_changes=!0,!1;var b=jQuery(a),c=jQuery("#frm_buddypress-edit-activity"),d=c.parent(),e="";return"comment"==b.data("target_type")?(b.closest("[id^=acomment]").find(" > .acomment-content").html(B_E_A_.current_activity_org).show(),e=b.closest("[id^=acomment]").find(".buddyboss_edit_activity_comment.action-save")):(b.closest("li").find(".activity-inner").html(B_E_A_.current_activity_org).show(),e=b.closest("li").find(".buddyboss_edit_activity.action-save")),e.removeClass("action-save").html(B_E_A_.button_text.edit),d.hide(),jQuery("body").append(d),b.remove(),window.activity_content_changed=!1,window.keep_activity_changes=!1,!1}jQuery('textarea[name="activity_content"]').on("change",function(a){window.activity_content_changed=!0}),jQuery(".acomment-reply").on("click",function(a){1==jQuery("li.activity-item #buddypress-edit-activity-wrapper").length&&($edit_wrapper=jQuery("li.activity-item #buddypress-edit-activity-wrapper"),$cancel_button=$edit_wrapper.next().children(".buddyboss_edit_activity_cancel"),$cancel_button.trigger("click"))});
  • buddypress-edit-activity/trunk/buddypress-edit-activity.php

    r2101664 r2290154  
    66 * Author:      BuddyBoss
    77 * Author URI:  https://www.buddyboss.com/
    8  * Version:     1.1.0
     8 * Version:     1.1.1
    99 */
    1010// Exit if accessed directly
     
    1919// Codebase version
    2020if (!defined( 'BUDDYBOSS_EDIT_ACTIVITY_PLUGIN_VERSION' ) ) {
    21   define( 'BUDDYBOSS_EDIT_ACTIVITY_PLUGIN_VERSION', '1.1.0' );
     21  define( 'BUDDYBOSS_EDIT_ACTIVITY_PLUGIN_VERSION', '1.1.1' );
    2222}
    2323
  • buddypress-edit-activity/trunk/languages/buddypress-edit-activity.pot

    r1795112 r2290154  
    1 # Copyright (C) 2018
     1# Copyright (C) 2020
    22# This file is distributed under the same license as the  package.
    33msgid ""
     
    55"Project-Id-Version: \n"
    66"Report-Msgid-Bugs-To: https://www.buddyboss.com/contact/\n"
    7 "POT-Creation-Date: 2018-01-01 09:19:26+00:00\n"
     7"POT-Creation-Date: 2020-04-23 13:27:09+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
     11"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
    1212"Last-Translator: BuddyBoss <[email protected]>\n"
    1313"Language-Team: BuddyBoss <[email protected]>\n"
  • buddypress-edit-activity/trunk/readme.txt

    r2101664 r2290154  
    44Tags: buddypress, social networking, activity, profiles, messaging, friends, groups, forums, notifications, settings, social, community, networks, networking
    55Requires at least: 3.8
    6 Tested up to: 5.2.1
    7 Stable tag: 1.1.0
     6Tested up to: 5.4
     7Stable tag: 1.1.1
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    6060
    6161== Changelog ==
     62
     63= 1.1.1 =
     64* Tested with WordPress 5.4
    6265
    6366= 1.1.0 =
Note: See TracChangeset for help on using the changeset viewer.