mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
Merged from 1.7.
This commit is contained in:
parent
22206b6722
commit
607c1bc1c6
@ -99,6 +99,18 @@ switch($_SERVER['REQUEST_METHOD']) {
|
||||
set_coursemodule_groupmode($mod->id, $value);
|
||||
break;
|
||||
|
||||
case 'indentleft':
|
||||
if ($mod->indent > 0) {
|
||||
$mod->indent--;
|
||||
update_record('course_modules', $mod);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'indentright':
|
||||
$mod->indent++;
|
||||
update_record('course_modules', $mod);
|
||||
break;
|
||||
|
||||
case 'move':
|
||||
if (!$section = get_record('course_sections','course',$course->id,'section',$sectionid)) {
|
||||
error_log('AJAX commands.php: Bad section ID '.$sectionid);
|
||||
|
@ -647,7 +647,7 @@ resource_class.prototype.indent_left = function() {
|
||||
var spacer = YAHOO.util.Dom.getElementsByClassName('spacer',
|
||||
'img', this.getEl())[0];
|
||||
if (!spacer) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
if (spacer.width > 20) {
|
||||
spacer.width -= 20;
|
||||
@ -665,7 +665,8 @@ resource_class.prototype.indent_left = function() {
|
||||
|
||||
commandContainer.removeChild(indentLeftBtn);
|
||||
}
|
||||
return;
|
||||
main.connect('POST', 'class=resource&field=indentleft', null, 'id='+this.id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -702,6 +703,7 @@ resource_class.prototype.indent_right = function() {
|
||||
YAHOO.util.Event.addListener(button, 'click', this.indent_left, this, true);
|
||||
commandContainer.insertBefore(button, indentRightBtn);
|
||||
}
|
||||
main.connect('POST', 'class=resource&field=indentright', null, 'id='+this.id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user