reset the bulkaction field after submitting a bulk action.

svn path=/plone.app.discussion/trunk/; revision=27732
This commit is contained in:
Timo Stollenwerk 2009-06-29 20:08:39 +00:00
parent be04439891
commit 450204fc43

View File

@ -56,6 +56,7 @@ jq(document).ready(function() {
var valArray = jq('input:checkbox:checked'); var valArray = jq('input:checkbox:checked');
var currentFilter = jq(this).find("[name='form.button.Filter']").attr("value"); var currentFilter = jq(this).find("[name='form.button.Filter']").attr("value");
var currentAction = jq(this).find("[name='form.select.BulkAction']").val(); var currentAction = jq(this).find("[name='form.select.BulkAction']").val();
var selectField = jq(this).find("[name='form.select.BulkAction']");
if (valArray.length) { if (valArray.length) {
jq.post(target, params, function(data) { jq.post(target, params, function(data) {
valArray.each(function () { valArray.each(function () {
@ -86,6 +87,8 @@ jq(document).ready(function() {
// Todo: nicer and translated message // Todo: nicer and translated message
alert("You haven't selected anything for this bulk action."); alert("You haven't selected anything for this bulk action.");
} }
// reset the bulkaction select
selectField.find("option[value='-1']").attr( 'selected', 'selected' );
}); });
}); });