Skip to content
Snippets Groups Projects
Commit 6052d68e authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Merge pull request #447 from EreMaijala/bulk-button-title

Show Lightbox title also for bulk action buttons.
parents ddb835c6 e94fe76e
No related merge requests found
......@@ -118,7 +118,8 @@ function phoneNumberFormHandler(numID, regionCode) {
* is called and the 'shown' lightbox event is triggered
*/
function bulkActionSubmit($form) {
var submit = $form.find('[type="submit"][clicked=true]').attr('name');
var button = $form.find('[type="submit"][clicked=true]');
var submit = button.attr('name');
var checks = $form.find('input.checkbox-select-item:checked');
if(checks.length == 0 && submit != 'empty') {
Lightbox.displayError(vufindString['bulk_noitems_advice']);
......@@ -132,6 +133,8 @@ function bulkActionSubmit($form) {
}
document.location.href = url;
} else {
$('#modal .modal-title').html(button.attr('title'));
Lightbox.titleSet = true;
Lightbox.submit($form, Lightbox.changeContent);
}
return false;
......@@ -543,4 +546,4 @@ $(document).ready(function() {
var parts = this.href.split('/');
return Lightbox.get(parts[parts.length-3],'Save',{id:$(this).attr('id')});
});
});
\ No newline at end of file
});
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment