2012-04-15 10:30:34 +02:00
|
|
|
$(function () {
|
2012-04-15 12:40:35 +02:00
|
|
|
$('.button').click(function (event) {
|
2012-04-15 10:30:34 +02:00
|
|
|
button = $(this);
|
2012-04-15 12:40:35 +02:00
|
|
|
if (button.hasClass('disabled')) {
|
|
|
|
event.preventDefault();
|
|
|
|
} else {
|
|
|
|
button.addClass('disabled');
|
|
|
|
setTimeout(function () {
|
|
|
|
button.removeClass('disabled');
|
|
|
|
}, 1000);
|
|
|
|
}
|
2012-04-15 10:30:34 +02:00
|
|
|
});
|
2012-04-20 22:43:12 +02:00
|
|
|
// activate an element to show it on projector
|
|
|
|
$('.activate_link').click(function(event) {
|
|
|
|
event.preventDefault();
|
|
|
|
var link = $(this);
|
|
|
|
$.ajax({
|
|
|
|
type: 'GET',
|
|
|
|
url: $(this).attr('href'),
|
|
|
|
dataType: 'json',
|
|
|
|
data: '',
|
|
|
|
success: function(data) {
|
|
|
|
$('.activate_link').removeClass('active');
|
|
|
|
$('tr').removeClass('activeline');
|
|
|
|
link.parent().parent().parent().addClass('activeline');
|
|
|
|
link.addClass('active');
|
|
|
|
},
|
|
|
|
error: function () {
|
|
|
|
alert("Ajax Error");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
2012-04-15 10:30:34 +02:00
|
|
|
});
|
2012-04-17 13:41:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
function new_message(text, type) {
|
2012-04-17 14:45:25 +02:00
|
|
|
var message = $('#dummy-notification').clone(true);
|
|
|
|
$(message).removeAttr('id').addClass(type).children('em').html(text);
|
2012-04-17 13:41:43 +02:00
|
|
|
$('#notifications').append(message);
|
2012-04-17 14:45:25 +02:00
|
|
|
message.slideDown('fast');
|
2012-04-17 13:41:43 +02:00
|
|
|
}
|