From d4003bf031680831c03f77109c87dda3997e980f Mon Sep 17 00:00:00 2001 From: nfreear Date: Tue, 7 Nov 2006 15:48:29 +0000 Subject: [PATCH] Fixes JS, email 25/10/06 from Juliette (Bug MDL-7380 "groups".) --- group/groupui/main-selects-form.js | 41 ++++++++++-------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/group/groupui/main-selects-form.js b/group/groupui/main-selects-form.js index 3b5c08ef2e..d936242a0e 100644 --- a/group/groupui/main-selects-form.js +++ b/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() { } - - - - - - - - -- 2.39.5