clean up : removed update+finish btn references

This commit is contained in:
colymba 2013-03-04 10:56:03 +02:00
parent 3d3e50e596
commit 7546bd08c0
2 changed files with 1 additions and 30 deletions

View File

@ -196,20 +196,7 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
->setUseButtonTag(true)
//->setDisabled(true)
);
/*
if($crumbs && $crumbs->count()>=2)
{
$actions->push(
FormAction::create('SaveAndFinish', 'Save All & Finish')
->setAttribute('id', 'bulkImageUploadUpdateFinishBtn')
->addExtraClass('ss-ui-action-constructive cms-panel-link')
->setAttribute('data-icon', 'accept')
->setAttribute('data-url', $this->Link('update'))
->setAttribute('data-return-url', $one_level_up->Link)
->setUseButtonTag(true)
);
}
*/
$actions->push(
FormAction::create('Cancel', 'Cancel & Delete All')
->setAttribute('id', 'bulkImageUploadUpdateCancelBtn')

View File

@ -73,8 +73,6 @@
$(itemStatus).removeClass('updated').addClass('dirty').html('Changed');
if ( $(itemInfo).hasClass('updated') ) $(itemInfo).removeClass('updated');
if ( !$(itemInfo).hasClass('dirty') ) $(itemInfo).addClass('dirty');
$('#bulkImageUploadUpdateFinishBtn').addClass('dirty');
$('#bulkImageUploadUpdateBtn').removeClass('ui-state-disabled ssui-button-disabled');
$('#bulkImageUploadUpdateBtn').attr('aria-disabled', 'false');
@ -143,14 +141,9 @@
$(this).removeClass('hasUpdate');
if ( counter == totalForms ) {
$('#bulkImageUploadUpdateFinishBtn').removeClass('dirty');
$('#bulkImageUploadUpdateBtn').data('completedForms', 0);
$('#bulkImageUploadUpdateBtn').removeClass('loading');
$('#bulkImageUploadUpdateBtn').addClass('ui-state-disabled');
if ( $('#bulkImageUploadUpdateBtn').hasClass('doFinish') ) {
//@TODO find a way to pass this as CMS navigation through AJAX
window.location = $('#bulkImageUploadUpdateFinishBtn').data('return-url');
}
}
});
@ -159,15 +152,6 @@
}
});
$('#bulkImageUploadUpdateFinishBtn').entwine({
onclick: function(e){
if ( $(this).hasClass('dirty') ) {
$('#bulkImageUploadUpdateBtn').addClass('doFinish');
$('#bulkImageUploadUpdateBtn').click();
}
}
});
$('.ss-uploadfield-item-editform').entwine({
onmatch: function(e){
$('#bulkImageUploadUpdateCancelBtn').removeClass('ui-state-disabled ssui-button-disabled');