forked from expo/troggle
b816463d1d
* Slight models cleanup- get rid of TroggleImageModel class, use mixin instead. * Collect various troggle shared functions into utils.py
20 lines
493 B
JavaScript
20 lines
493 B
JavaScript
$(document).ready(function(){
|
|
|
|
$('.number:first').append("<a href='javascript:void(0)' class='next_qm_link'>get next number</a>");
|
|
|
|
new_qm_link=function(e){
|
|
if ($('#id_cave:first')[0].value != "")
|
|
{
|
|
|
|
$.post('/newqmnumber/',{'cave':$('#id_cave')[0].value,'year':$('#id_expedition')[0].value}, function(data){
|
|
$('#id_QMs_found-0-number')[0].value=data;
|
|
});
|
|
}
|
|
else {
|
|
alert('Please choose a cave and try again.')
|
|
};
|
|
};
|
|
|
|
$('.next_qm_link').bind("click", new_qm_link);
|
|
|
|
}); |