Skip to content

Commit 5566268

Browse files
fix minor issues
1 parent cd8a3da commit 5566268

4 files changed

Lines changed: 11 additions & 56 deletions

File tree

admin/assets/js/commenting-block-admin-functions.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,11 @@ function showNoticeBoardonNewComments() {
529529
}
530530
setTimeout(function () {
531531
if (noticeboard !== null) {
532-
532+
// if( noticeboard.innerHTML === "" ){
533+
// noticeboard.setAttribute('style','display:none');
534+
// } else {
535+
// noticeboard.setAttribute('style','display:block');
536+
// }
533537
}
534538

535539
}, 300);
@@ -1145,6 +1149,9 @@ function cfgetCustomAttributeId(selectedText) {
11451149
//topOfText = document.querySelector('[datatext="' + elid + '"]').offsetTop;
11461150
topOfText = jQuery('[datatext="' + elid + '"]').offset()?.top;
11471151
} else {
1152+
// const sid = document.getElementById(elid)?.getAttribute('data-sid');
1153+
// //topOfText = document.querySelector('[id="' + sid + '"]')?.offsetTop;
1154+
// topOfText = document.getElementById( elid )?.offsetTop;
11481155
const sid = jQuery('#' + elid).attr('data-sid');
11491156
topOfText = jQuery('[id="' + sid + '"]').offset()?.top;
11501157

@@ -1207,7 +1214,6 @@ function cfgetCustomAttributeId(selectedText) {
12071214
setContainerDimensions("auto", `${calcLyotWidth}px`);
12081215
}
12091216
if( fromIconClick ) {
1210-
12111217
setTimeout(function () {
12121218
const notCommentOncls = document.querySelector(".multicollab_body_class");
12131219
const $boardOuter = $("#cf-comment-board-wrapper .cls-board-outer");
@@ -1240,3 +1246,4 @@ function cfgetCustomAttributeId(selectedText) {
12401246
}
12411247

12421248
}
1249+

admin/assets/js/commenting-block-admin.js

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -174,28 +174,6 @@ window.addEventListener("click", function (e) {
174174
localStorage.setItem("userURL", user.url);
175175
})
176176
.catch((error) => console.error("Error:", error));
177-
// comment below code due to performance issue / Since 4.8
178-
/* commentedId = adminLocalizer.comment_id;
179-
if (commentedId) {
180-
setTimeout(function () {
181-
const editCommentButton = document.querySelector(
182-
`#${commentedId} .js-edit-comment`
183-
);
184-
if (editCommentButton) {
185-
editCommentButton.click();
186-
}
187-
const commentedElement = document.getElementById(commentedId);
188-
if (commentedElement) {
189-
commentedElement.classList.add("comment-flash");
190-
}
191-
}, 2000);
192-
setTimeout(function () {
193-
const commentedElement = document.getElementById(commentedId);
194-
if (commentedElement) {
195-
commentedElement.classList.remove("comment-flash");
196-
}
197-
}, 4000);
198-
}*/
199177
});
200178

201179
document.addEventListener("DOMContentLoaded", function () {
@@ -632,26 +610,7 @@ window.addEventListener("click", function (e) {
632610
});
633611
}
634612
}
635-
636-
// Show/Hide comment toggler if the counter value is zero.
637-
/*if (event.target.matches('#history-toggle')) {
638-
var dataCount = event.target.getAttribute('data-count');
639-
if (0 >= dataCount) {
640-
document.getElementById('comments-toggle').style.display = 'none';
641-
} else {
642-
document.getElementById('comments-toggle').style.display = 'block';
643-
}
644-
}*/
645-
646-
// Settings page tabs toggle.
647-
// if (event.target.matches('.cf-dashboard-layout__tabs-list span')) {
648-
// const tabID = event.target?.dataset?.id;
649-
// document.querySelectorAll('.cf-dashboard-layout__tabs-wrap-inner').forEach(function (element) {
650-
// element.style.display = 'none';
651-
// });
652-
// document.getElementById(tabID).style.display = 'block';
653-
// }
654-
613+
655614
// Scroll to the commented text and its popup from History Popup.
656615
const scrollCommentTarget = event.target.closest(".user-commented-on");
657616
if (scrollCommentTarget) {

admin/assets/js/dist/activityCentre.build.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

commenting-block.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,6 @@ function cf_custom_plugin_row_meta( $plugin_meta, $plugin_file ) {
7878
* @author: Rishi Shah
7979
* @version 3.4
8080
*/
81-
// $remote_arrd = filter_input( INPUT_SERVER, 'REMOTE_ADDR', FILTER_SANITIZE_SPECIAL_CHARS );
82-
// if ( '127.' === substr( $remote_arrd, 0, 4 ) || '::1' === $remote_arrd ) {
83-
// define( 'CF_PROMOTIONAL_BANNER_API_URL', 'https://multicollabstg.wpengine.com/' );
84-
// define( 'CF_STORE_URL', 'https://multicollabstg.wpengine.com/' );
85-
// define( 'EDD_PLAN_PRO', 2817 );
86-
// } else {
87-
// define( 'CF_PROMOTIONAL_BANNER_API_URL', 'https://www.multicollab.com/' );
88-
// define( 'CF_STORE_URL', 'https://www.multicollab.com/' );
89-
// define( 'EDD_PLAN_PRO', 3793 );
90-
// }
91-
9281
define( 'CF_PROMOTIONAL_BANNER_API_URL', 'https://www.multicollab.com/' );
9382
define( 'CF_STORE_URL', 'https://www.multicollab.com/' );
9483
define( 'EDD_PLAN_PRO', 3793 );

0 commit comments

Comments
 (0)