Merge commit 'e33d57cb2829eb4c7a861571cb3c7db1d02b571f'
This commit is contained in:
commit
969d1a0585
|
@ -183,6 +183,8 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
|||
user_error('Sort column '.$this->sortColumn.' could not be found in '.$gridField->getModelClass().'\'s ancestry', E_USER_ERROR);
|
||||
exit;
|
||||
}
|
||||
|
||||
$baseDataClass=ClassInfo::baseDataClass($gridField->getModelClass());
|
||||
}
|
||||
|
||||
|
||||
|
@ -201,6 +203,10 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
|||
DB::query('UPDATE "' . $table
|
||||
. '" SET "' . $sortColumn . '" = ' . ($max + $i)
|
||||
. ' WHERE "ID" = '. $obj->ID);
|
||||
|
||||
DB::query('UPDATE "' . $baseDataClass
|
||||
. '" SET "LastEdited" = \'' . date('Y-m-d H:i:s') . '\''
|
||||
. ' WHERE "ID" = '. $obj->ID);
|
||||
}
|
||||
|
||||
$i++;
|
||||
|
@ -308,6 +314,8 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
|||
user_error('Sort column '.$this->sortColumn.' could not be found in '.$gridField->getModelClass().'\'s ancestry', E_USER_ERROR);
|
||||
exit;
|
||||
}
|
||||
|
||||
$baseDataClass=ClassInfo::baseDataClass($gridField->getModelClass());
|
||||
}
|
||||
|
||||
|
||||
|
@ -328,6 +336,10 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
|
|||
DB::query('UPDATE "' . $table
|
||||
. '" SET "' . $sortColumn . '" = ' . (($sort + 1) + $pageOffset)
|
||||
. ' WHERE "ID" = '. $id);
|
||||
|
||||
DB::query('UPDATE "' . $baseDataClass
|
||||
. '" SET "LastEdited" = \'' . date('Y-m-d H:i:s') . '\''
|
||||
. ' WHERE "ID" = '. $id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
var self=this;
|
||||
var refCheckbox=$(this);
|
||||
var gridField=this.getGridField();
|
||||
var form=gridField.closest('form');
|
||||
var pageSort=false;
|
||||
|
||||
if($(this).is(':checked')) {
|
||||
|
@ -49,7 +50,9 @@
|
|||
name: 'ItemIDs',
|
||||
value: dataRows
|
||||
}
|
||||
]});
|
||||
]},function() {
|
||||
form.removeClass('loading');
|
||||
});
|
||||
}
|
||||
}).disableSelection();
|
||||
|
||||
|
@ -109,6 +112,8 @@
|
|||
var form = gridField.closest('form'),
|
||||
focusedElName = gridField.find(':input:focus').attr('name'); // Save focused element for restoring after refresh
|
||||
|
||||
form.addClass('loading');
|
||||
|
||||
ajaxOpts.data = ajaxOpts.data.concat(form.find(':input').serializeArray());
|
||||
|
||||
// Include any GET parameters from the current URL, as the view state might depend on it.
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
it:
|
||||
GridFieldSortableRows:
|
||||
ALLOW_DRAG_DROP: "Consenti il trascinamento"
|
||||
DISABLE_PAGINATOR: "Disabilita impaginatore"
|
||||
SORT_TO_PAGE: "Ordina alla pagina"
|
||||
EditPermissionsFailure: "Non hai i permessi per modificare"
|
Loading…
Reference in New Issue