mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX TableField delete row inconsistency with TableListField which caused table fields to not fade the row out
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65141 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1817fc6051
commit
6ef535d6ce
@ -84,22 +84,20 @@ TableField.prototype = {
|
||||
method: 'post',
|
||||
postBody: 'ajax=1' + ($('SecurityID') ? '&SecurityID=' + $('SecurityID').value : ''),
|
||||
onComplete: function(response){
|
||||
if(response.responseText == "1"){
|
||||
Effect.Fade(
|
||||
row,
|
||||
{
|
||||
afterFinish: function(obj) {
|
||||
// remove row from DOM
|
||||
obj.element.parentNode.removeChild(obj.element);
|
||||
// recalculate summary if needed (assumes that TableListField.js is present)
|
||||
// TODO Proper inheritance
|
||||
if(this._summarise) this._summarise();
|
||||
// custom callback
|
||||
if(this.callback_deleteRecord) this.callback_deleteRecord(e);
|
||||
}.bind(this)
|
||||
}
|
||||
);
|
||||
}
|
||||
Effect.Fade(
|
||||
row,
|
||||
{
|
||||
afterFinish: function(obj) {
|
||||
// remove row from DOM
|
||||
obj.element.parentNode.removeChild(obj.element);
|
||||
// recalculate summary if needed (assumes that TableListField.js is present)
|
||||
// TODO Proper inheritance
|
||||
if(this._summarise) this._summarise();
|
||||
// custom callback
|
||||
if(this.callback_deleteRecord) this.callback_deleteRecord(e);
|
||||
}.bind(this)
|
||||
}
|
||||
);
|
||||
}.bind(this),
|
||||
onFailure: ajaxErrorHandler
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user