OpenSlides/openslides/static/javascript/utils.js
2012-04-17 14:45:25 +02:00

22 lines
591 B
JavaScript

$(function () {
$('.button').click(function (event) {
button = $(this);
if (button.hasClass('disabled')) {
event.preventDefault();
} else {
button.addClass('disabled');
setTimeout(function () {
button.removeClass('disabled');
}, 1000);
}
});
});
function new_message(text, type) {
var message = $('#dummy-notification').clone(true);
$(message).removeAttr('id').addClass(type).children('em').html(text);
$('#notifications').append(message);
message.slideDown('fast');
}