diff --git a/archivebox/templates/admin/base.html b/archivebox/templates/admin/base.html index 8cdd0f80..50af51ee 100644 --- a/archivebox/templates/admin/base.html +++ b/archivebox/templates/admin/base.html @@ -148,14 +148,18 @@ $('') .appendTo(buttons) .attr('name', this.value) + .attr('type', 'button') .addClass('button') .text(this.text) - .click(function () { + .click(function (e) { + e.preventDefault() + e.stopPropagation() container.find('select') - .find(':selected').attr('selected', '').end() - .find('[value=' + this.name + ']').attr('selected', 'selected'); + .find(':selected').removeAttr('selected').end() + .find('[value=' + name + ']').attr('selected', 'selected').click(); $('#changelist-form button[name="index"]').click(); document.querySelector('#logo').outerHTML = '' + return false }); }); }