Commit a4faa171 authored by Olivier Lezoray's avatar Olivier Lezoray 🇫🇷
Browse files

Modification Hal.js

parent be1e0bfb
......@@ -86,7 +86,11 @@
sort:"producedDateY_i desc",
wt:"json",
rows:500},
function(result){
function(result){
if(!result.response) {
$("#publications").html("");
return;
}
var docs = result.response.docs;
var output="";
if(docs.length>0) {
......@@ -146,6 +150,10 @@
"json"
);
}
function firstNameChange(){
if($("#lastName").length && $("#firstName").length)
typeChange();
}
/**
* Description.
* Makes an update of the document on a change of year.
......@@ -165,8 +173,8 @@
* Makes an update of the document on a change of document type.
**/
function typeChange(){
lastName=$("#lastName").val();
firstName=$("#firstName").val();
if($("#lastName").length) lastName=$("#lastName").val();
if($("#firstName").length) firstName=$("#firstName").val();
var selectedDocType=$("#documentTypeSelect").val();
if(selectedDocType=="None" || (lastName=="")) {
$("#publications").html("");
......
......@@ -35,14 +35,14 @@
<img src="img/hal.logo.png"></a>
</div>
<div class="row">
<div class="col-sm-6 left">
<label for="firstName">Prénom :</label>
<input id="firstName" type="text" value="">
</div>
<div class="col-sm-6 left">
<label for="lastName">Nom :</label>
<input id="lastName" type="text" value="">
<input id="lastName" type="text" value="" onchange="firstNameChange()">
</div>
<div class="col-sm-6 left">
<label for="firstName">Prénom :</label>
<input id="firstName" type="text" value="" >
</div>
</div>
<div class="row">
<div class="col-md-7 left">
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment