Permalink
Browse files

Fixes JS, email 25/10/06 from Juliette (Bug MDL-7380 "groups".)

  • Loading branch information...
nfreear
nfreear committed Nov 7, 2006
1 parent 4fa153d commit d4003bf031680831c03f77109c87dda3997e980f
Showing with 13 additions and 28 deletions.
  1. +13 −28 group/groupui/main-selects-form.js
@@ -3,8 +3,8 @@
* and to take information from XML documents and either return information from them or modifiy the
* form appropriately.
*/
function onGroupingChange() {
hideAllForms();
showElement("groupeditform");
@@ -129,26 +129,15 @@ function updateGroupings() {
var updateGroupingsResponseCallback =
{
success:updateGroupingsResponse,
failure:responseFailure,
};
success:function(o) {
/**
* The callback function for updateGroupings()
* Takes the XML containing the grouping details that has been sent back and updates the display.
*/
function updateGroupingsResponse() {
alert("Called updateGroupingsResponse");
if (updategroupingsrequest.readyState == 4 && updategroupingsrequest.status == 200) {
alert("updateGroupingsResponse called");
var xmlDoc = updategroupingsrequest.responseXML;
error = getFromXML(updategroupingsrequest.responseXML, 'error');
// alert("updateGroupingsResponse called");
var xmlDoc = o.responseXML;
error = getFromXML(o.responseXML, 'error');
if (error != null) {
alert(error);
}
alert(updategroupingsrequest.responseText);
// alert(o.responseXML);
var noofoptions = addOptionsFromXML("groupings", xmlDoc);
// If the selected grouping is not set, set it to the first grouping in the list
@@ -173,8 +162,12 @@ function updateGroupingsResponse() {
enableButton("showcreategroupform");
enableButton("showaddgroupstogroupingform");
}
}
}
},
failure:responseFailure,
};
/**
* Updates the list of groups when groupingid is marked as selected
@@ -245,11 +238,3 @@ function updateSelectedGroupResponse() {
}

0 comments on commit d4003bf

Please sign in to comment.