Skip to content

Commit

Permalink
MINOR Triggering LeftAndMain.EditForm.js load() callback after loadin…
Browse files Browse the repository at this point in the history
…g the response - this makes more sense, as the inserted HTML can be parsed at this point

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92707 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 21, 2009
1 parent 05d1f6e commit 81e3fd0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions javascript/LeftAndMain.EditForm.js
Expand Up @@ -160,12 +160,12 @@

/**
* @param {String} url
* @param {Function} callback (Optional)
* @param {Function} callback (Optional) Called after the form content as been loaded
* @param {ajaxOptions} Object literal merged into the jQuery.ajax() call (Optional)
*/
load: function(url, callback, ajaxOptions) {
var self = this;
var self = this;

// Alert when unsaved changes are present
if(this._checkChangeTracker(true) == false) return false;

Expand All @@ -176,10 +176,10 @@
complete: function(xmlhttp, status) {
// TODO This should be using the plugin API
self.removeClass('changed');

if(callback) callback.apply(self, arguments);

self._loadResponse(xmlhttp.responseText, status, xmlhttp);

if(callback) callback.apply(self, arguments);
},
dataType: 'html'
}, ajaxOptions));
Expand Down

0 comments on commit 81e3fd0

Please sign in to comment.