From 59899c68cfdf3f289fda9f348f32d3e971d0b783 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 13 Jan 2010 00:08:37 +0000 Subject: [PATCH] ENHANCEMENT: Added 'greyed out' status of batch action checkboxes while applicable pages are being loaded via ajax. (from r94774) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96820 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- css/cms_left.css | 3 +++ images/tickbox-greyedout.gif | Bin 0 -> 64 bytes javascript/CMSMain_left.js | 5 ++++- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 images/tickbox-greyedout.gif diff --git a/css/cms_left.css b/css/cms_left.css index 5475e65d..89c8b887 100644 --- a/css/cms_left.css +++ b/css/cms_left.css @@ -116,6 +116,9 @@ ul.tree.multiselect span.a span.b a { ul.tree.multiselect span.a.nodelete span.b a { background-image: url(../images/tickbox-canttick.gif) !important; } +ul.tree.multiselect span.a.treeloading span.b a { + background-image: url(../images/tickbox-greyedout.gif) !important; +} ul.tree.multiselect span.a.selected span.b span.c a { diff --git a/images/tickbox-greyedout.gif b/images/tickbox-greyedout.gif new file mode 100644 index 0000000000000000000000000000000000000000..df2106f98185aedc88d2aaf00b8af33371a228be GIT binary patch literal 64 zcmZ?wbhEHb=cy7_0$W*Aox` literal 0 HcmV?d00001 diff --git a/javascript/CMSMain_left.js b/javascript/CMSMain_left.js index 1a584db2..f13d4ece 100755 --- a/javascript/CMSMain_left.js +++ b/javascript/CMSMain_left.js @@ -402,7 +402,8 @@ batchActionGlobals = { if(id) ids.push(id); // Disable the nodes while the ajax request is being processed - this.addNodeClass('nodelete'); + this.removeNodeClass('nodelete'); + this.addNodeClass('treeloading'); }); // Post to the server to ask which pages can have this batch action applied @@ -414,6 +415,8 @@ batchActionGlobals = { // Set a CSS class on each tree node indicating which can be batch-actioned and which can't jQuery(rootNode).find('li').each(function() { + this.removeNodeClass('treeloading'); + var id = parseInt(this.id.replace('record-','')); if(id) { if(applicableIDMap[id] === true) {