Subversion Repositories Sites.outils-naturalistes.fr

Rev

Rev 38 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 38 Rev 42
Line 10... Line 10...
10
    loading_image : 'squelettes/images/loading.gif',
10
    loading_image : 'squelettes/images/loading.gif',
11
    close_image   : 'squelettes/images/closelabel.gif'
11
    close_image   : 'squelettes/images/closelabel.gif'
12
  }); 
12
  }); 
13
});
13
});
Line 14... Line -...
14
 
-
 
15
 
14
 
Line 16... Line 15...
16
function changerAccordeonOuOnglets(ongletId) {
15
function changerAccordeonOuOnglets(ongletId) {
17
 
16
 
Line 207... Line 206...
207
		bouton_valider[0].setAttribute("title","Enregistrer la fiche et la soumettre au copil pour publication"); 
206
		bouton_valider[0].setAttribute("title","Enregistrer la fiche et la soumettre au copil pour publication"); 
208
	}
207
	}
Line 209... Line 208...
209
	
208
	
Line -... Line 209...
-
 
209
	bouton_valider.before("<input type=\"button\" title=\"Sauvegarder la fiche sans la v&eacute;rifier (celle ci ne sera pas publi&eacute;e)\" id=\"sauvegarde_form\" onclick=\"validerFormulaire(false)\" value=\"sauvegarder\" />");
Line 210... Line 210...
210
	bouton_valider.before("<input type=\"button\" title=\"Sauvegarder la fiche sans la v&eacute;rifier (celle ci ne sera pas publi&eacute;e)\" id=\"sauvegarde_form\" onclick=\"validerFormulaire(false)\" value=\"sauvegarder\" />");
210
	
211
	
211
	recherche = false;
212
	
212
	
213
  }
213
  }
Line 374... Line 374...
374
		
374
		
375
		url_ajax = $("#formulaire").attr("action");
375
		url_ajax = $("#formulaire").attr("action");
Line 376... Line 376...
376
		url_ajax += "&valider_fiche=0";
376
		url_ajax += "&valider_fiche=0";
-
 
377
		
-
 
378
		var callback = function(reponse_json) {
-
 
379
		
Line 377... Line 380...
377
		
380
			reponse_brute = reponse_json.match('{"success":(?:false|true,"id_fiche":[0-9]+)}') ;
Line 378... Line 381...
378
		var callback = function(reponse_json) {
381
			reponse_json = reponse_brute[0] ;		
379
			
382
			
Line 404... Line 407...
404
		
407
		
405
		return false ;
408
		return false ;
406
	}
409
	}
Line 407... Line -...
407
}
-
 
408
 
410
}
-
 
411
 
-
 
412
$(document).ready(ajouterAccordeonOuOnglets);
-
 
413
 
-
 
414
 
-
 
415
 
-
 
416
var champsSontCaches ;
-
 
417
 
-
 
418
function ajouterLienRechercheAvancee() {
-
 
419
 
-
 
420
  champsCaches = $(".form_depliable > table > tbody > tr");
-
 
421
  var i = 1 ;
-
 
422
  
-
 
423
  champsSontCaches = true;
-
 
424
  
-
 
425
  longueur = champsCaches.length ;
-
 
426
  
-
 
427
  champsCaches.each(function() {
-
 
428
		
-
 
429
	  if(i == 2) {
-
 
430
    	  this.setAttribute("id","emplacement_recherche_avancee_base");
-
 
431
      }
-
 
432
	  
-
 
433
      if(i >= 2 && i < longueur) {
-
 
434
    	  this.setAttribute("class","emplacement_recherche_avancee");
-
 
435
      }
-
 
436
      i++;
-
 
437
    });
-
 
438
  
-
 
439
  $("#emplacement_recherche_avancee_base").before("<tr id=\"cell_lien_rech_avancee\"><td><a href=# id=\"lien_rech_avancee\">+ recherche avancee</a></td></tr>");
-
 
440
  $(".emplacement_recherche_avancee").hide();
-
 
441
  
-
 
442
  $("#lien_rech_avancee").click(function (champsSontCaches) {
-
 
443
	  cacherAfficherLiensRechercheAvancee();
-
 
444
  });
-
 
445
    
-
 
446
}
-
 
447
 
-
 
448
function cacherAfficherLiensRechercheAvancee() {
-
 
449
	
-
 
450
	$(".emplacement_recherche_avancee").toggle();
-
 
451
	
-
 
452
	if(champsSontCaches) {
-
 
453
		$("#lien_rech_avancee").text("-  recherche simple");
-
 
454
		champsSontCaches = false;
-
 
455
	} else {
-
 
456
		$("#lien_rech_avancee").text("+ recherche avancee");
-
 
457
		champsSontCaches = true;
-
 
458
	}
-
 
459
}
-
 
460