This commit is contained in:
colymba 2013-04-29 19:03:32 +03:00
parent 5d0b844592
commit b46196760b
2 changed files with 6 additions and 43 deletions

View File

@ -10,8 +10,6 @@
.bulkManagerOptions .bulkManagerOptions
{ {
/*float: right;
margin: 0 0 0 20px;*/
} }
.bulkManagerOptions th.bulkmanagerselect .bulkManagerOptions th.bulkmanagerselect
@ -42,8 +40,4 @@
vertical-align: middle; vertical-align: middle;
background-position: 2px 0px; background-position: 2px 0px;
background-repeat: no-repeat no-repeat; background-repeat: no-repeat no-repeat;
} }
/* ************************************************************************
* EDITING
*/

View File

@ -29,22 +29,7 @@
onunmatch: function(){ onunmatch: function(){
}, },
onclick: function(e) { onclick: function(e) {
//e.preventDefault(); }
//return false;
}/*,
onchange: function(){
var idList, id;
idList = $('#doBulkActionButton').data('selection');
if ( !idList ) idList = '';
id = $(this).attr('name').split('_')[1];
if ( !$(this).prop('checked') ) idList.replace( '#' + id, '');
else idList = idList + '#' + id;
$('#doBulkActionButton').data('selection', idList);
}*/
}); });
$('.toggleSelectAll').entwine({ $('.toggleSelectAll').entwine({
@ -142,6 +127,9 @@
} }
}); });
/* **************************************************************************************
* EDITING */
$('.bulkEditingFieldHolder').entwine({ $('.bulkEditingFieldHolder').entwine({
onmatch: function(){ onmatch: function(){
@ -162,8 +150,6 @@
if ( !$(form).hasClass('hasUpdate') ) { if ( !$(form).hasClass('hasUpdate') ) {
$(form).addClass('hasUpdate'); $(form).addClass('hasUpdate');
} }
//$('#bulkEditingUpdateFinishBtn').addClass('dirty');
} }
}); });
@ -181,8 +167,7 @@
url = $(this).data('url'); url = $(this).data('url');
if ( $(formsWithUpadtes).length > 0 ) $(this).addClass('loading'); if ( $(formsWithUpadtes).length > 0 ) $(this).addClass('loading');
//@TODO execute 'doFinish' even when no form have been changed
$(formsWithUpadtes).each(function(){ $(formsWithUpadtes).each(function(){
cacheBuster = new Date().getTime() + '_' + $(this).attr('name'); cacheBuster = new Date().getTime() + '_' + $(this).attr('name');
data = $(this).serialize(); data = $(this).serialize();
@ -206,14 +191,8 @@
$(this).removeClass('hasUpdate'); $(this).removeClass('hasUpdate');
if ( counter == totalForms ) { if ( counter == totalForms ) {
//$('#bulkEditingUpdateFinishBtn').removeClass('dirty');
$('#bulkEditingUpdateBtn').data('completedForms', 0); $('#bulkEditingUpdateBtn').data('completedForms', 0);
$('#bulkEditingUpdateBtn').removeClass('loading'); $('#bulkEditingUpdateBtn').removeClass('loading');
/*
if ( $('#bulkEditingUpdateBtn').hasClass('doFinish') ) {
//@TODO find a way to pass this as CMS navigation through AJAX
window.location = $('#bulkEditingUpdateFinishBtn').data('return-url');
} */
} }
}); });
@ -221,16 +200,6 @@
} }
}); });
/*
$('#bulkEditingUpdateFinishBtn').entwine({
onclick: function(e){
if ( $(this).hasClass('dirty') ) {
$('#bulkEditingUpdateBtn').addClass('doFinish');
$('#bulkEditingUpdateBtn').click();
}
}
});
*/
}); });