diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index f624598a..791e1fef 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -145,59 +145,6 @@ function ajaxSubmitForm(automated, callAfter, form, action, verb) { return false; }; -/** - * Post the given fields to the given url - */ -function ajaxSubmitFieldSet(href, fieldSet, extraData) { - // Build data - var i,field,data = "ajax=1"; - for(i=0;field=fieldSet[i];i++) { - data += '&' + Form.Element.serialize(field); - } - if(extraData){ - data += '&'+extraData; - } - // Send request - new Ajax.Request(href, { - method : 'post', postBody : data, - onSuccess : function(response) { - //alert(response.responseText); - Ajax.Evaluator(response); - }, - onFailure : function(response) { - alert(response.responseText); - //errorMessage('Error: ', response); - } - }); -} - -/** - * Post the given fields to the given url - */ -function ajaxLink(href) { - // Send request - new Ajax.Request(href + (href.indexOf("?") == -1 ? "?" : "&") + "ajax=1", { - method : 'get', - onSuccess : Ajax.Evaluator, - onFailure : ajaxErrorHandler - }); -} - -/** - * Load a URL into the given form - */ -function ajaxLoadPage() { - statusMessage('loading...', 2, true); - new Ajax.Request(this.URL + '&ajax=1', { - method : 'get', - onSuccess : ajaxLoadPage_success.bind(this) - }); -} -function ajaxLoadPage_success(response) { - statusMessage('loaded'); - $(this.form).loadNewPage(response.responseText); -} - /** * Behaviour of the statuts message. */ diff --git a/javascript/MemberTableField.js b/javascript/MemberTableField.js index 33f7fa98..f7d8b604 100755 --- a/javascript/MemberTableField.js +++ b/javascript/MemberTableField.js @@ -277,3 +277,29 @@ MemberFilterButton.prototype = { Behaviour.register({ '#Form_EditForm div.MemberTableField table.data input.text' : AjaxMemberLookup }); + +/** + * Post the given fields to the given url + */ +function ajaxSubmitFieldSet(href, fieldSet, extraData) { + // Build data + var i,field,data = "ajax=1"; + for(i=0;field=fieldSet[i];i++) { + data += '&' + Form.Element.serialize(field); + } + if(extraData){ + data += '&'+extraData; + } + // Send request + new Ajax.Request(href, { + method : 'post', postBody : data, + onSuccess : function(response) { + //alert(response.responseText); + Ajax.Evaluator(response); + }, + onFailure : function(response) { + alert(response.responseText); + //errorMessage('Error: ', response); + } + }); +} \ No newline at end of file