Drop unused js
This commit is contained in:
parent
c49db4b5a4
commit
212dee1565
2 changed files with 0 additions and 43 deletions
|
@ -1,42 +0,0 @@
|
|||
import $ from 'jquery';
|
||||
|
||||
function showNotFound() {
|
||||
$('.dossier-link .text-info').hide();
|
||||
$('.dossier-link .text-warning').show();
|
||||
}
|
||||
|
||||
function showData(data) {
|
||||
$('.dossier-link .dossier-text-summary').text(data.textSummary);
|
||||
$('.dossier-link .text-info').show();
|
||||
$('.dossier-link .text-warning').hide();
|
||||
}
|
||||
|
||||
function hideEverything() {
|
||||
$('.dossier-link .text-info').hide();
|
||||
$('.dossier-link .text-warning').hide();
|
||||
}
|
||||
|
||||
function fetchProcedureLibelle(e) {
|
||||
const dossierId = $(e.target).val();
|
||||
if (dossierId) {
|
||||
$.get(`/users/dossiers/${dossierId}/text_summary`)
|
||||
.done(showData)
|
||||
.fail(showNotFound);
|
||||
} else {
|
||||
hideEverything();
|
||||
}
|
||||
}
|
||||
|
||||
let timeOut;
|
||||
function debounceFetchProcedureLibelle(e) {
|
||||
if (timeOut) {
|
||||
clearTimeout(timeOut);
|
||||
}
|
||||
timeOut = setTimeout(() => fetchProcedureLibelle(e), 300);
|
||||
}
|
||||
|
||||
$(document).on(
|
||||
'input',
|
||||
'[data-type=dossier-link]',
|
||||
debounceFetchProcedureLibelle
|
||||
);
|
|
@ -21,7 +21,6 @@ import '../new_design/form-validation';
|
|||
import '../new_design/carto';
|
||||
import '../new_design/select2';
|
||||
|
||||
import '../new_design/champs/dossier-link';
|
||||
import '../new_design/champs/linked-drop-down-list';
|
||||
import '../new_design/champs/siret';
|
||||
|
||||
|
|
Loading…
Reference in a new issue