MDL-34741 use 2in3 in groups UI

This commit is contained in:
Petr Škoda 2012-08-06 19:02:55 +02:00
parent b8b4f65b9c
commit e3c1d655f8
3 changed files with 10 additions and 5 deletions

View file

@ -77,7 +77,9 @@ function UpdatableGroupsCombo(wwwRoot, courseId) {
*/ */
// Hide the updategroups input since AJAX will take care of this. // Hide the updategroups input since AJAX will take care of this.
YAHOO.util.Dom.setStyle("updategroups", "display", "none"); YUI().use('yui2-dom', function (Y) {
Y.YUI2.util.Dom.setStyle("updategroups", "display", "none");
});
} }
@ -129,7 +131,9 @@ function UpdatableMembersCombo(wwwRoot, courseId) {
}; };
// Hide the updatemembers input since AJAX will take care of this. // Hide the updatemembers input since AJAX will take care of this.
YAHOO.util.Dom.setStyle("updatemembers", "display", "none"); YUI().use('yui2-dom', function (Y) {
Y.YUI2.util.Dom.setStyle("updatemembers", "display", "none");
});
} }
/** /**
@ -181,7 +185,10 @@ UpdatableMembersCombo.prototype.refreshMembers = function () {
if(singleSelection) { if(singleSelection) {
var sUrl = this.wwwRoot+"/group/index.php?id="+this.courseId+"&group="+groupId+"&act_ajax_getmembersingroup"; var sUrl = this.wwwRoot+"/group/index.php?id="+this.courseId+"&group="+groupId+"&act_ajax_getmembersingroup";
YAHOO.util.Connect.asyncRequest("GET", sUrl, this.connectCallback, null); var callback = this.connectCallback;
YUI().use('yui2-connection', function (Y) {
Y.YUI2.util.Connect.asyncRequest("GET", sUrl, callback, null);
});
} }
}; };

View file

@ -56,7 +56,6 @@ $PAGE->set_url($url);
// Make sure that the user has permissions to manage groups. // Make sure that the user has permissions to manage groups.
require_login($course); require_login($course);
$PAGE->requires->yui2_lib('connection');
$PAGE->requires->js('/group/clientlib.js'); $PAGE->requires->js('/group/clientlib.js');
$context = context_course::instance($course->id); $context = context_course::instance($course->id);

View file

@ -84,7 +84,6 @@ $strusergroupmembership = get_string('usergroupmembership', 'group');
$groupname = format_string($group->name); $groupname = format_string($group->name);
$PAGE->requires->yui2_lib('connection');
$PAGE->requires->js('/group/clientlib.js'); $PAGE->requires->js('/group/clientlib.js');
$PAGE->navbar->add($strparticipants, new moodle_url('/user/index.php', array('id'=>$course->id))); $PAGE->navbar->add($strparticipants, new moodle_url('/user/index.php', array('id'=>$course->id)));
$PAGE->navbar->add($strgroups, new moodle_url('/group/index.php', array('id'=>$course->id))); $PAGE->navbar->add($strgroups, new moodle_url('/group/index.php', array('id'=>$course->id)));