ENHANCEMENT: delete button keep spinning when cancel a deletion operation from the confirm window.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@71597 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Normann Lou 2009-02-10 03:41:37 +00:00 committed by Sam Minnee
parent 5328056fcd
commit 1d074a7e7a

View File

@ -209,7 +209,10 @@ $(document).ready(function() {
*/
$('#right #form_actions_right input[name=action_doDelete]').livequery('click', function(){
var confirmed = confirm(ss.i18n._t('ModelAdmin.REALLYDELETE'));
if(!confirmed) return false;
if(!confirmed) {
$(this).removeClass('loading')
return false;
}
var form = $('#right form');
var formAction = form.attr('action') + '?' + $(this).fieldSerialize();