mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-82309-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE
This commit is contained in:
commit
00ce502c67
@ -100,9 +100,9 @@ M.core_comment = {
|
||||
var newcomment = Y.Node.create(result.html);
|
||||
container.appendChild(newcomment);
|
||||
var ids = result.ids;
|
||||
var linkText = Y.one('#comment-link-text-' + cid);
|
||||
if (linkText) {
|
||||
linkText.set('innerHTML', M.util.get_string('commentscount', 'moodle', obj.count));
|
||||
var linkTextCount = Y.one('#comment-link-text-' + cid + ' .comment-link-count');
|
||||
if (linkTextCount) {
|
||||
linkTextCount.set('innerHTML', obj.count);
|
||||
}
|
||||
for(var i in ids) {
|
||||
var attributes = {
|
||||
@ -249,9 +249,9 @@ M.core_comment = {
|
||||
scope: scope,
|
||||
params: params,
|
||||
callback: async function(id, ret, args) {
|
||||
var linkText = Y.one('#comment-link-text-' + scope.client_id);
|
||||
if (ret.count && linkText) {
|
||||
linkText.set('innerHTML', M.util.get_string('commentscount', 'moodle', ret.count));
|
||||
var linkTextCount = Y.one('#comment-link-text-' + scope.client_id + ' .comment-link-count');
|
||||
if (linkTextCount) {
|
||||
linkTextCount.set('innerHTML', ret.count);
|
||||
}
|
||||
var container = Y.one('#comment-list-'+scope.client_id);
|
||||
var pagination = Y.one('#comment-pagination-'+scope.client_id);
|
||||
@ -284,10 +284,10 @@ M.core_comment = {
|
||||
params = {'commentid': id};
|
||||
function remove_dom(type, anim, cmt) {
|
||||
cmt.remove();
|
||||
var linkText = Y.one('#comment-link-text-' + cid),
|
||||
var linkTextCount = Y.one('#comment-link-text-' + cid + ' .comment-link-count'),
|
||||
comments = Y.all('#comment-list-' + cid + ' li');
|
||||
if (linkText && comments) {
|
||||
linkText.set('innerHTML', M.util.get_string('commentscount', 'moodle', comments.size()));
|
||||
if (linkTextCount) {
|
||||
linkTextCount.set('innerHTML', comments.size());
|
||||
}
|
||||
}
|
||||
this.request({
|
||||
|
@ -263,7 +263,6 @@ class comment {
|
||||
$page->requires->strings_for_js(array(
|
||||
'addcomment',
|
||||
'comments',
|
||||
'commentscount',
|
||||
'commentsrequirelogin',
|
||||
'deletecommentbyon'
|
||||
),
|
||||
@ -454,7 +453,7 @@ class comment {
|
||||
// comments open and closed
|
||||
$countstring = '';
|
||||
if ($this->displaytotalcount) {
|
||||
$countstring = '('.$this->count().')';
|
||||
$countstring = '(' . html_writer::span($this->count(), 'comment-link-count') . ')';
|
||||
}
|
||||
$collapsedimage= 't/collapsed';
|
||||
if (right_to_left()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user