mirror of
https://github.com/moodle/moodle.git
synced 2025-01-16 21:18:33 +01:00
Merge branch 'MDL-83940-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE
This commit is contained in:
commit
10f47d3811
@ -72,16 +72,14 @@ M.core_comment = {
|
||||
scope.toggle_textarea(false);
|
||||
},
|
||||
post: function() {
|
||||
var container = Y.one('#comment-list-'+this.client_id);
|
||||
var ta = Y.one('#dlg-content-'+this.client_id);
|
||||
var scope = this;
|
||||
var value = ta.get('value');
|
||||
if (value && value != M.util.get_string('addcomment', 'moodle')) {
|
||||
ta.set('disabled', true);
|
||||
ta.setStyles({
|
||||
'backgroundImage': 'url(' + M.util.image_url('i/loading_small', 'core') + ')',
|
||||
'backgroundRepeat': 'no-repeat',
|
||||
'backgroundPosition': 'center center'
|
||||
});
|
||||
var spinner = M.util.add_spinner(Y, container);
|
||||
spinner.show();
|
||||
var params = {'content': value};
|
||||
this.request({
|
||||
action: 'add',
|
||||
@ -93,7 +91,7 @@ M.core_comment = {
|
||||
var ta = Y.one('#dlg-content-'+cid);
|
||||
ta.set('value', '');
|
||||
ta.set('disabled', false);
|
||||
ta.setStyle('backgroundImage', 'none');
|
||||
spinner.remove();
|
||||
scope.toggle_textarea(false);
|
||||
var container = Y.one('#comment-list-'+cid);
|
||||
var result = await scope.render([obj], true);
|
||||
@ -401,8 +399,6 @@ M.core_comment = {
|
||||
var collapsedimage = 't/collapsed'; // ltr mode
|
||||
if ( Y.one(document.body).hasClass('dir-rtl') ) {
|
||||
collapsedimage = 't/collapsed_rtl';
|
||||
} else {
|
||||
collapsedimage = 't/collapsed';
|
||||
}
|
||||
if (img) {
|
||||
img.set('src', M.util.image_url(collapsedimage, 'core'));
|
||||
@ -451,7 +447,8 @@ M.core_comment = {
|
||||
},
|
||||
wait: function() {
|
||||
var container = Y.one('#comment-list-'+this.client_id);
|
||||
container.set('innerHTML', '<div class="mdl-align"><img src="'+M.util.image_url('i/loading_small', 'core')+'" /></div>');
|
||||
container.set('innerHTML', '');
|
||||
M.util.add_spinner(Y, container).show();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -458,8 +458,6 @@ class comment {
|
||||
$collapsedimage= 't/collapsed';
|
||||
if (right_to_left()) {
|
||||
$collapsedimage= 't/collapsed_rtl';
|
||||
} else {
|
||||
$collapsedimage= 't/collapsed';
|
||||
}
|
||||
$html .= html_writer::start_tag('a', array(
|
||||
'class' => 'comment-link',
|
||||
@ -468,7 +466,8 @@ class comment {
|
||||
'role' => 'button',
|
||||
'aria-expanded' => 'false')
|
||||
);
|
||||
$html .= $OUTPUT->pix_icon($collapsedimage, $this->linktext);
|
||||
$html .= html_writer::img($OUTPUT->image_url($collapsedimage), $this->linktext,
|
||||
['id' => 'comment-img-' . $this->cid, 'class' => 'icon']);
|
||||
$html .= html_writer::tag('span', $this->linktext.' '.$countstring, array('id' => 'comment-link-text-'.$this->cid));
|
||||
$html .= html_writer::end_tag('a');
|
||||
}
|
||||
|
@ -111,8 +111,6 @@ M.util.CollapsibleRegion = function(Y, id, userpref, strtooltip) {
|
||||
var collapsedimage = 't/collapsed'; // ltr mode
|
||||
if (right_to_left()) {
|
||||
collapsedimage = 't/collapsed_rtl';
|
||||
} else {
|
||||
collapsedimage = 't/collapsed';
|
||||
}
|
||||
if (this.div.hasClass('collapsed')) {
|
||||
// Add the correct image and record the YUI node created in the process
|
||||
|
Loading…
x
Reference in New Issue
Block a user