From b46196760b4a8153ddbb9f49292b97754ba584e4 Mon Sep 17 00:00:00 2001 From: colymba Date: Mon, 29 Apr 2013 19:03:32 +0300 Subject: [PATCH] clean up --- css/GridFieldBulkManager.css | 8 +----- javascript/GridFieldBulkManager.js | 41 ++++-------------------------- 2 files changed, 6 insertions(+), 43 deletions(-) diff --git a/css/GridFieldBulkManager.css b/css/GridFieldBulkManager.css index aafab09..f966177 100644 --- a/css/GridFieldBulkManager.css +++ b/css/GridFieldBulkManager.css @@ -10,8 +10,6 @@ .bulkManagerOptions { - /*float: right; - margin: 0 0 0 20px;*/ } .bulkManagerOptions th.bulkmanagerselect @@ -42,8 +40,4 @@ vertical-align: middle; background-position: 2px 0px; background-repeat: no-repeat no-repeat; -} - -/* ************************************************************************ - * EDITING - */ \ No newline at end of file +} \ No newline at end of file diff --git a/javascript/GridFieldBulkManager.js b/javascript/GridFieldBulkManager.js index 1c5afaa..75f6208 100644 --- a/javascript/GridFieldBulkManager.js +++ b/javascript/GridFieldBulkManager.js @@ -29,22 +29,7 @@ onunmatch: function(){ }, 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({ @@ -142,6 +127,9 @@ } }); + + /* ************************************************************************************** + * EDITING */ $('.bulkEditingFieldHolder').entwine({ onmatch: function(){ @@ -162,8 +150,6 @@ if ( !$(form).hasClass('hasUpdate') ) { $(form).addClass('hasUpdate'); } - - //$('#bulkEditingUpdateFinishBtn').addClass('dirty'); } }); @@ -181,8 +167,7 @@ url = $(this).data('url'); if ( $(formsWithUpadtes).length > 0 ) $(this).addClass('loading'); - - //@TODO execute 'doFinish' even when no form have been changed + $(formsWithUpadtes).each(function(){ cacheBuster = new Date().getTime() + '_' + $(this).attr('name'); data = $(this).serialize(); @@ -206,14 +191,8 @@ $(this).removeClass('hasUpdate'); if ( counter == totalForms ) { - //$('#bulkEditingUpdateFinishBtn').removeClass('dirty'); $('#bulkEditingUpdateBtn').data('completedForms', 0); $('#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(); - } - } - }); - */ });