177 |
}; |
}; |
178 |
})(jQuery); |
})(jQuery); |
179 |
|
|
180 |
function changeQuartier(){ |
function changeDataSelect(tn, ds, joker){ |
181 |
|
|
182 |
var idArrondissement = $("#arrondissement option:selected").val(); |
var idArrondissement = $("#"+ds+" option:selected").val(); |
183 |
link = "../app/listeQuartier.php?idx=" + idArrondissement; |
link = "../app/listData.php?idx=" + idArrondissement + "&tn=" + tn + "&ds=" + ds; |
184 |
$.ajax({ |
$.ajax({ |
185 |
type: "GET", |
type: "GET", |
186 |
url: link, |
url: link, |
187 |
cache: false, |
cache: false, |
188 |
|
dataType: "json", |
189 |
success: function(html){ |
success: function(html){ |
190 |
if ( html !== '' ){ |
|
191 |
|
$('#'+tn).empty(); |
192 |
$('#quartier').empty(); |
|
193 |
$('#quartier').append( |
if ( joker == true ) |
194 |
|
$('#'+tn).append( |
195 |
'<option value="" selected="selected">*</option>' |
'<option value="" selected="selected">*</option>' |
196 |
); |
); |
197 |
|
else |
198 |
|
$('#'+tn).append( |
199 |
|
'<option value="" selected="selected">Choisir ' + tn + '</option>' |
200 |
|
); |
201 |
|
|
202 |
|
if ( html !== '' ){ |
203 |
|
|
204 |
html = html.split(';'); |
html = html.split(';'); |
205 |
for ( i = 0 ; i < html.length - 1 ; i++ ){ |
for ( i = 0 ; i < html.length - 1 ; i++ ){ |
206 |
|
|
207 |
html_temp = html[i].split('_'); |
html_temp = html[i].split('_'); |
208 |
$('#quartier').append( |
$('#'+tn).append( |
209 |
'<option value="'+html_temp[0]+'" >'+html_temp[1]+'</option>' |
'<option value="'+html_temp[0]+'" >'+html_temp[1]+'</option>' |
210 |
); |
); |
211 |
} |
} |
235 |
//pfenetre = window.open("../spg/upload2.php?origine="+champ,"upload2","width=300,height=100,top=120,left=120"); |
//pfenetre = window.open("../spg/upload2.php?origine="+champ,"upload2","width=300,height=100,top=120,left=120"); |
236 |
// |
// |
237 |
fenetreouverte = true; |
fenetreouverte = true; |
|
} |
|
238 |
|
} |
239 |
|
|
240 |
|
$(function() { |
241 |
|
hideFields(); |
242 |
|
}); |
243 |
|
|
244 |
|
function changeDemandeType(){ |
245 |
|
|
246 |
|
var idDossierAutorisationTypeDetaille = $("#dossier_autorisation_type_detaille option:selected").val(); |
247 |
|
|
248 |
|
if ( $.isNumeric(idDossierAutorisationTypeDetaille) ){ |
249 |
|
|
250 |
|
changeDataSelect('demande_type','dossier_autorisation_type_detaille'); |
251 |
|
|
252 |
|
$('#demande_type').parent().parent().show(); |
253 |
|
} |
254 |
|
else { |
255 |
|
hideFields(); |
256 |
|
} |
257 |
|
} |
258 |
|
|
259 |
|
function hideFields(){ |
260 |
|
$('.bloc').each( |
261 |
|
function(){ |
262 |
|
if ( !$(this).hasClass('dossier_type') && !$(this).hasClass('dossier_type_demande_date') ) |
263 |
|
$(this).hide(); |
264 |
|
} |
265 |
|
); |
266 |
|
|
267 |
|
$('.field-type-text').hide(); |
268 |
|
$('input[type=submit]').hide(); |
269 |
|
$('#demande_type').parent().parent().hide(); |
270 |
|
} |
271 |
|
|
272 |
|
function showFormsDemande(){ |
273 |
|
$('.bloc').each( |
274 |
|
function(){ |
275 |
|
if ( !$(this).hasClass('dossier_type') && !$(this).hasClass('dossier_type_demande_date') ) |
276 |
|
$(this).show(); |
277 |
|
} |
278 |
|
); |
279 |
|
|
280 |
|
$('.field-type-text').show(); |
281 |
|
$('input[type=submit]').show(); |
282 |
|
} |