From 450204fc438c4e46a9a70647f11cad1387d9b213 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 29 Jun 2009 20:08:39 +0000 Subject: [PATCH] reset the bulkaction field after submitting a bulk action. svn path=/plone.app.discussion/trunk/; revision=27732 --- plone/app/discussion/browser/javascripts/moderation.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plone/app/discussion/browser/javascripts/moderation.js b/plone/app/discussion/browser/javascripts/moderation.js index e983fa8..4b01c7c 100644 --- a/plone/app/discussion/browser/javascripts/moderation.js +++ b/plone/app/discussion/browser/javascripts/moderation.js @@ -56,6 +56,7 @@ jq(document).ready(function() { var valArray = jq('input:checkbox:checked'); var currentFilter = jq(this).find("[name='form.button.Filter']").attr("value"); var currentAction = jq(this).find("[name='form.select.BulkAction']").val(); + var selectField = jq(this).find("[name='form.select.BulkAction']"); if (valArray.length) { jq.post(target, params, function(data) { valArray.each(function () { @@ -86,6 +87,8 @@ jq(document).ready(function() { // Todo: nicer and translated message alert("You haven't selected anything for this bulk action."); } + // reset the bulkaction select + selectField.find("option[value='-1']").attr( 'selected', 'selected' ); }); }); \ No newline at end of file