34 lines
644 B
JavaScript
34 lines
644 B
JavaScript
$(function () {
|
|
// todo
|
|
// change this with python normally
|
|
$('#id_boa-name').val($('#id_search_name').val());
|
|
|
|
// Events
|
|
$('[name=search_results]').on('change',
|
|
function (e) {
|
|
new_stay_0($(this));
|
|
})
|
|
|
|
$('#id_search_name').on('keyup',
|
|
function (e) {
|
|
$('#id_name').val($(this).val())
|
|
})
|
|
|
|
$('#switch_boat_search').on('click',
|
|
function (e) {
|
|
console.log('lol')
|
|
$('#new_boat').hide();
|
|
$('#search_boat').show();
|
|
})
|
|
|
|
// New Stay
|
|
// new_stay-0
|
|
function new_stay_0(elem) {
|
|
if (elem.val() < 0) {
|
|
$('#new_boat').show();
|
|
$('#search_boat').hide();
|
|
}
|
|
}
|
|
|
|
})
|