Skip to content

Commit

Permalink
fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
poojabhimani12 committed Dec 4, 2024
1 parent cd8a3da commit 5566268
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 56 deletions.
11 changes: 9 additions & 2 deletions admin/assets/js/commenting-block-admin-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,11 @@ function showNoticeBoardonNewComments() {
}
setTimeout(function () {
if (noticeboard !== null) {

// if( noticeboard.innerHTML === "" ){
// noticeboard.setAttribute('style','display:none');
// } else {
// noticeboard.setAttribute('style','display:block');
// }
}

}, 300);
Expand Down Expand Up @@ -1145,6 +1149,9 @@ function cfgetCustomAttributeId(selectedText) {
//topOfText = document.querySelector('[datatext="' + elid + '"]').offsetTop;
topOfText = jQuery('[datatext="' + elid + '"]').offset()?.top;
} else {
// const sid = document.getElementById(elid)?.getAttribute('data-sid');
// //topOfText = document.querySelector('[id="' + sid + '"]')?.offsetTop;
// topOfText = document.getElementById( elid )?.offsetTop;
const sid = jQuery('#' + elid).attr('data-sid');
topOfText = jQuery('[id="' + sid + '"]').offset()?.top;

Expand Down Expand Up @@ -1207,7 +1214,6 @@ function cfgetCustomAttributeId(selectedText) {
setContainerDimensions("auto", `${calcLyotWidth}px`);
}
if( fromIconClick ) {

setTimeout(function () {
const notCommentOncls = document.querySelector(".multicollab_body_class");
const $boardOuter = $("#cf-comment-board-wrapper .cls-board-outer");
Expand Down Expand Up @@ -1240,3 +1246,4 @@ function cfgetCustomAttributeId(selectedText) {
}

}

43 changes: 1 addition & 42 deletions admin/assets/js/commenting-block-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,6 @@ window.addEventListener("click", function (e) {
localStorage.setItem("userURL", user.url);
})
.catch((error) => console.error("Error:", error));
// comment below code due to performance issue / Since 4.8
/* commentedId = adminLocalizer.comment_id;
if (commentedId) {
setTimeout(function () {
const editCommentButton = document.querySelector(
`#${commentedId} .js-edit-comment`
);
if (editCommentButton) {
editCommentButton.click();
}
const commentedElement = document.getElementById(commentedId);
if (commentedElement) {
commentedElement.classList.add("comment-flash");
}
}, 2000);
setTimeout(function () {
const commentedElement = document.getElementById(commentedId);
if (commentedElement) {
commentedElement.classList.remove("comment-flash");
}
}, 4000);
}*/
});

document.addEventListener("DOMContentLoaded", function () {
Expand Down Expand Up @@ -632,26 +610,7 @@ window.addEventListener("click", function (e) {
});
}
}

// Show/Hide comment toggler if the counter value is zero.
/*if (event.target.matches('#history-toggle')) {
var dataCount = event.target.getAttribute('data-count');
if (0 >= dataCount) {
document.getElementById('comments-toggle').style.display = 'none';
} else {
document.getElementById('comments-toggle').style.display = 'block';
}
}*/

// Settings page tabs toggle.
// if (event.target.matches('.cf-dashboard-layout__tabs-list span')) {
// const tabID = event.target?.dataset?.id;
// document.querySelectorAll('.cf-dashboard-layout__tabs-wrap-inner').forEach(function (element) {
// element.style.display = 'none';
// });
// document.getElementById(tabID).style.display = 'block';
// }


// Scroll to the commented text and its popup from History Popup.
const scrollCommentTarget = event.target.closest(".user-commented-on");
if (scrollCommentTarget) {
Expand Down
2 changes: 1 addition & 1 deletion admin/assets/js/dist/activityCentre.build.min.js

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions commenting-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,6 @@ function cf_custom_plugin_row_meta( $plugin_meta, $plugin_file ) {
* @author: Rishi Shah
* @version 3.4
*/
// $remote_arrd = filter_input( INPUT_SERVER, 'REMOTE_ADDR', FILTER_SANITIZE_SPECIAL_CHARS );
// if ( '127.' === substr( $remote_arrd, 0, 4 ) || '::1' === $remote_arrd ) {
// define( 'CF_PROMOTIONAL_BANNER_API_URL', 'https://multicollabstg.wpengine.com/' );
// define( 'CF_STORE_URL', 'https://multicollabstg.wpengine.com/' );
// define( 'EDD_PLAN_PRO', 2817 );
// } else {
// define( 'CF_PROMOTIONAL_BANNER_API_URL', 'https://www.multicollab.com/' );
// define( 'CF_STORE_URL', 'https://www.multicollab.com/' );
// define( 'EDD_PLAN_PRO', 3793 );
// }

define( 'CF_PROMOTIONAL_BANNER_API_URL', 'https://www.multicollab.com/' );
define( 'CF_STORE_URL', 'https://www.multicollab.com/' );
define( 'EDD_PLAN_PRO', 3793 );
Expand Down

0 comments on commit 5566268

Please sign in to comment.