Skip to content

Commit 91fc710

Browse files
Update V4.9
1 parent 3b04e0a commit 91fc710

File tree

5 files changed

+4
-94
lines changed

5 files changed

+4
-94
lines changed

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

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -343,97 +343,6 @@ window.process = {
343343
}
344344

345345
});
346-
347-
//Set board top offset from activity center @author: Minal Diwan @since-3.4
348-
$(document).on('click', '.user-commented-on,.cf-activity-centre .user-action a', function (e) {
349-
var elID = e.target.dataset.elid;
350-
var editID = e.target?.dataset?.editid;
351-
var deleteID = e.target?.dataset?.deleteid;
352-
const iframe = document.querySelector('[name="editor-canvas"]');
353-
if (elID) {
354-
elID = elID.replace('cf-', '');
355-
//$(`#${elID}`).trigger('click');
356-
357-
setTimeout(function () {
358-
let topOfText;
359-
360-
$('#cf-comment-board-wrapper .cls-board-outer').removeAttr('style');
361-
$('#cf-comment-board-wrapper .cls-board-outer').removeClass('focus');
362-
$('#cf-comment-board-wrapper .cls-board-outer').removeClass('is-open');
363-
$('#cf-comment-board-wrapper .cls-board-outer').css('opacity', '0.4');
364-
365-
if (elID.match(/^el/m) !== null) {
366-
var element = returnCommntTextElement( elID );
367-
} else {
368-
var sID = elID.replace('sg', '');
369-
if( iframe ) {
370-
const iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
371-
var element = iframeDocument.getElementById(sID);
372-
} else {
373-
var element = document.getElementById(sID);
374-
}
375-
}
376-
377-
if (element) {
378-
element.setAttribute('data-rich-text-format-boundary', 'true');
379-
element.scrollIntoView({
380-
behavior: "smooth", // Optional: to scroll smoothly (instead of instantly)
381-
block: "center" // Optional: specifies vertical alignment (start, center, end, nearest)
382-
});
383-
setTimeout(() => {
384-
const rect = element.getBoundingClientRect();
385-
topOfText = rect.top + window.scrollY; // Adds scroll position to get position relative to the document
386-
$('#' + elID + '.cls-board-outer').addClass('focus');
387-
$('#' + elID + '.cls-board-outer').addClass('is-open');
388-
$('#' + elID + '.cls-board-outer').css('opacity', '1');
389-
$('#' + elID + '.cls-board-outer').offset({ top: topOfText });
390-
function checkElementAndProceed() {
391-
if( isElementCompletelyVisible( document.getElementById(elID) ) ){
392-
if( "Reply to this comment" === e.target?.children[0]?.innerText?.trim() ) {
393-
if (elID.match(/^el/m) !== null) {
394-
jQuery("#txt" + elID).focus();
395-
jQuery("#txt" + elID).select();
396-
} else {
397-
jQuery("#txt" + sID).focus();
398-
jQuery("#txt" + sID).select();
399-
}
400-
} else if( "Edit" === e.target?.children[0]?.innerText?.trim() ) {
401-
jQuery("#" + elID + " .shareCommentContainer").hide();
402-
jQuery(`#${elID} #${editID} .js-edit-comment`).trigger("click");
403-
setTimeout(() => {
404-
jQuery("#edit-" + editID).focus();
405-
jQuery("#edit-" + editID).select();
406-
}, 100);
407-
} else if( "Mark as Resolved" === e.target?.children[0]?.innerText?.trim() ) {
408-
var elementBoard = document.getElementById(elID);
409-
if (elementBoard) {
410-
var resolveCheckbox = elementBoard.querySelector('.resolve-cb');
411-
if (resolveCheckbox) {
412-
resolveCheckbox.click(); // Trigger click on the resolve checkbox
413-
}
414-
}
415-
} else if( "Delete" === e.target?.children[0]?.innerText?.trim() ) {
416-
const deleteElement = document.getElementById(deleteID);
417-
if (deleteElement) {
418-
const deleteOverlay = deleteElement.querySelector(".comment-delete-overlay");
419-
if (deleteOverlay) {
420-
deleteOverlay.classList.add("show"); // Add 'show' class to overlay
421-
}
422-
}
423-
}
424-
} else {
425-
setTimeout(() => {
426-
checkElementAndProceed();
427-
}, 500);
428-
}
429-
}
430-
checkElementAndProceed();
431-
}, 1000);
432-
433-
}
434-
}, 500);
435-
}
436-
});
437346
});
438347
})(jQuery);
439348

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.

admin/assets/js/dist/dashboard.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.

includes/class-commenting-block.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ private function define_admin_hooks() {
172172
$plugin_admin = new Commenting_block_Admin( $this->get_plugin_name(), $this->get_version() );
173173

174174
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'cf_enqueue_styles' );
175+
$this->loader->add_action( 'enqueue_block_assets', $plugin_admin, 'cf_enqueue_styles' );
175176
$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'cf_enqueue_scripts' );
176177
$this->loader->add_action( 'wp_ajax_cf_comments_history', $plugin_admin, 'cf_comments_history' );
177178
$this->loader->add_action( 'wp_ajax_cf_update_click', $plugin_admin, 'cf_update_click' );

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ If you’d still like help, simply <a href="https://bit.ly/3KPzx2I" target="_bla
252252

253253
== Changelog ==
254254

255-
= 4.9 - 21.03.2025 =
255+
= 4.9 - 24.03.2025 =
256256
* [New] Multicollab is now fully compatible with Gutenberg API 3.
257257
* [Enhancement] Optimized performance for faster and smoother collaboration.
258258
* [Bug Fixes] Fixed minor bugs related to the plugin’s interactions with Gutenberg blocks, providing a smoother editing experience.

0 commit comments

Comments
 (0)