From fe82f394f1ebe3c33470919e62685576a3700825 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 03:14:26 +0000 Subject: [PATCH] API CHANGE Removed unused ajaxSubmitForm() javascript in LeftAndMain.js, please use LeftAndMain.EditForm.js instead git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92693 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/LeftAndMain.js | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index 5a54603e..d4cb5f30 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -312,43 +312,6 @@ function unlockStatusMessage() { } } -/** - * Submit the given form and evaluate the Ajax response. - * Needs to be bound to an object with the following parameters to work: - * - form - * - action - * - verb - * - * The bound function can then be called, with the arguments passed - */ - -function ajaxSubmitForm(automated, callAfter, form, action, verb) { - var alreadySaved = false; - if($(form).elements.length < 2) alreadySaved = true; - - if(alreadySaved) { - if(callAfter) callAfter(); - - } else { - statusMessage(verb + '...', '', true); - - var success = function(response) { - Ajax.Evaluator(response); - if(callAfter) callAfter(); - } - - if(callAfter) success = success.bind({callAfter : callAfter}); - Ajax.SubmitForm(form, action, { - onSuccess : success, - onFailure : function(response) { - errorMessage('Error ' + verb, response); - } - }); - } - - return false; -}; - /** * Behaviour of the statuts message. */