function batch_submit(options) {
  // ensure there is at least one box checked, and error if not
  var count = batch_count_checked();
  if (count == 0)
    alert(I18n.t("layout.no_selection"));

  // else, show confirm dialog (if requested), and proceed if 'yes' clicked
  else if (options.confirm == "" || confirm(options.confirm.replace(/###/, count))) {

    // construct a temporary form
    var form = $('<form>').attr('action', options.path).attr('method', 'post');

    // copy the checked checkboxes to it
    // (we do it this way in case the main form has other stuff in it that we don't want to submit)
    form.append($('input.batch_op:checked').clone());

    // need to append form to body before submitting
    form.appendTo($('body'));

    // submit the form
    form.submit();
  }
}
// submits the batch form to the given path
submits the batch form to the given path
submits the batch form to the given path
function batch_submit(options) {
  var count = batch_count_checked();
  if (count == 0)
    alert(I18n.t("layout.no_selection"));
  else if (options.confirm == "" || confirm(options.confirm.replace(/###/, count))) {
    var form = $('<form>').attr('action', options.path).attr('method', 'post');
    form.append($('input.batch_op:checked').clone());
    form.appendTo($('body'));
    form.submit();
  }
}
function batch_submit ( options ) { var count = batch_count_checked ( ) ; if ( count == 0 ) alert ( I18n . t ( "layout.no_selection" ) ) ; else if ( options . confirm == "" || confirm ( options . confirm . replace ( / ### / , count ) ) ) { var form = $ ( '<form>' ) . attr ( 'action' , options . path ) . attr ( 'method' , 'post' ) ; form . append ( $ ( 'input.batch_op:checked' ) . clone ( ) ) ; form . appendTo ( $ ( 'body' ) ) ; form . submit ( ) ; } }
submits the batch form to the given path
submits the batch form to the given path
// ensure there is at least one box checked, and error if not // else, show confirm dialog (if requested), and proceed if 'yes' clicked // construct a temporary form // copy the checked checkboxes to it // (we do it this way in case the main form has other stuff in it that we don't want to submit) // need to append form to body before submitting // submit the form