mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
MDL-8807: The icon's title attribute wasn't being updated along with its img.src
MDL-8997: A couple of typos: groupseparate instead of groupsseparate etc...
This commit is contained in:
parent
b318ecfd47
commit
cddbd5d5fe
@ -2258,12 +2258,12 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
|
||||
if ($mod->groupmode !== false) {
|
||||
if ($mod->groupmode == SEPARATEGROUPS) {
|
||||
$grouptitle = $str->groupsseparate;
|
||||
$groupclass = 'editing_groupseparate';
|
||||
$groupclass = 'editing_groupsseparate';
|
||||
$groupimage = $CFG->pixpath.'/t/groups.gif';
|
||||
$grouplink = $path.'/mod.php?id='.$mod->id.'&groupmode=0&sesskey='.$sesskey;
|
||||
} else if ($mod->groupmode == VISIBLEGROUPS) {
|
||||
$grouptitle = $str->groupsvisible;
|
||||
$groupclass = 'editing_groupvisible';
|
||||
$groupclass = 'editing_groupsvisible';
|
||||
$groupimage = $CFG->pixpath.'/t/groupv.gif';
|
||||
$grouplink = $path.'/mod.php?id='.$mod->id.'&groupmode=1&sesskey='.$sesskey;
|
||||
} else {
|
||||
|
@ -760,6 +760,23 @@ resource_class.prototype.toggle_groupmode = function() {
|
||||
if (this.groupmode > 2) {
|
||||
this.groupmode = 0;
|
||||
}
|
||||
|
||||
var newtitle = this.groupButton.getElementsByTagName('img')[0].title;
|
||||
|
||||
switch (this.groupmode) {
|
||||
case 0:
|
||||
newtitle = main.portal.strings['groupsnone']+' ('+main.portal.strings['clicktochange']+')';
|
||||
break;
|
||||
case 1:
|
||||
newtitle = main.portal.strings['groupsseparate']+' ('+main.portal.strings['clicktochange']+')';
|
||||
break;
|
||||
case 2:
|
||||
newtitle = main.portal.strings['groupsvisible']+' ('+main.portal.strings['clicktochange']+')';
|
||||
break;
|
||||
}
|
||||
|
||||
this.groupButton.getElementsByTagName('img')[0].title = newtitle;
|
||||
|
||||
this.groupButton.getElementsByTagName('img')[0].src = main.portal.strings['pixpath']+this.groupImages[this.groupmode];
|
||||
main.connect('POST', 'class=resource&field=groupmode', null, 'value='+this.groupmode+'&id='+this.id);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user