|
|
|
|
@ -182,8 +182,9 @@ |
|
|
|
|
<script> |
|
|
|
|
$(document).ready(function(){ |
|
|
|
|
$('#id_exposition').select2({ |
|
|
|
|
placeholder: "Выставки", |
|
|
|
|
multiple: true, |
|
|
|
|
placeholder: "Выставка", |
|
|
|
|
multiple: false, |
|
|
|
|
width: 'element', |
|
|
|
|
ajax: { |
|
|
|
|
|
|
|
|
|
url: "/admin/exposition/search/", |
|
|
|
|
@ -213,7 +214,42 @@ $(document).ready(function(){ |
|
|
|
|
callback({id: id, text:text}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('#id_conference').select2({ |
|
|
|
|
placeholder: "Конференция", |
|
|
|
|
multiple: false, |
|
|
|
|
width: 'element', |
|
|
|
|
ajax: { |
|
|
|
|
|
|
|
|
|
url: "/admin/conference/search/", |
|
|
|
|
width: '550px', |
|
|
|
|
dataType: "json", |
|
|
|
|
quietMillis: 200, |
|
|
|
|
|
|
|
|
|
data: function(term, page, theme){ |
|
|
|
|
return {term: term, |
|
|
|
|
page: page}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
results: function (data) { |
|
|
|
|
var results = []; |
|
|
|
|
$.each(data, function(index, item){ |
|
|
|
|
results.push({ |
|
|
|
|
id: item.id, |
|
|
|
|
text: item.label |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
return {results: results}; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
initSelection : function(element, callback) { |
|
|
|
|
var id= $(element).val(); |
|
|
|
|
var text = $(element).attr('data-init-text'); |
|
|
|
|
callback({id: id, text:text}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
</script> |
|
|
|
|
|