Alessia Spadi 1 год назад
Родитель
Сommit
7ea605578b
3 измененных файлов с 20 добавлено и 5 удалено
  1. 6 0
      js/object.js
  2. 7 5
      js/people.js
  3. 7 0
      object.html

+ 6 - 0
js/object.js

@@ -266,6 +266,7 @@ function handle_objectData(json) {
         var graph = value['graph']['value'];
         var label = value['label']['value'];
         var uri = value['uri']['value'];
+        var siglaRegistro = "";
         var identifier = "";
         var dimensions = "";
         var consistence = "";
@@ -294,6 +295,10 @@ function handle_objectData(json) {
             $("#consistenza").css("display", "flex");
             consistence = value['consistency']['value'];
         }
+        if (value.hasOwnProperty('sigla_registro')) {
+          $("#IDreg").css("display", "flex");
+          siglaRegistro = value['sigla_registro']['value'];
+      }
         if (value.hasOwnProperty('condition')) {
           $("#STCC").css("display", "flex");
           condition = value['condition']['value'];
@@ -349,6 +354,7 @@ function handle_objectData(json) {
         document.getElementById("nome_oggetto").innerHTML = label;
         document.getElementById("identifier").innerHTML = button_ext;
         document.getElementById("nota").innerHTML = description;
+        document.getElementById("sigla_registro").innerHTML = siglaRegistro;
         document.getElementById("dimensions").innerHTML = dimensions;
         document.getElementById("materials").innerHTML = materials;
         document.getElementById("consistence").innerHTML = consistence;

+ 7 - 5
js/people.js

@@ -580,8 +580,8 @@ function handle_data(json) {
 
         var first_name = "";
 
-        if ((givenName != "") || (second_name != "  ") || (familyName != "") || (provenence != "")) {
-          first_name = givenName + " " + second_name + " " + familyName + " " + provenence;
+        if ((givenName != "") || (second_name != "  ") || (provenence != "")) {
+          first_name = givenName + " " + second_name + " " + provenence;
         } else {
           first_name = name;
         }
@@ -769,7 +769,7 @@ function handle_Relazioni(json) {
       var type = tipo.charAt(0).toUpperCase() + tipo.slice(1) + principale;
 
       if ((type == "Socio") || (type == "Socio principale")) {
-        type = type + " di";
+        type = "Società";
       }
 
       if (type == "Mano lettera") {
@@ -1329,6 +1329,7 @@ function handle_map(json) {
           place_names.push(uri);
           const coordinates = coord.split(", ");
           loc.push(uri);
+          label = titleCase(label);
           loc.push(label);
           myPlaces += "<div class='item-place-person'><div class='clickPlace item-place-person-label' data-point='"+ coordinates + "'>" + label + "</div><div class='item-place-person-action'><div class='luogo' id='" + 
       uri + "'><i class='far fa-map' style='cursor:pointer'></i></div></div></div>";
@@ -1402,9 +1403,10 @@ function handle_map(json) {
     for (var i = 0; i < luoghi.length; i++) {
       var a = luoghi[i];
       var len = a.length;
-      var title = "<b>" + a[0] + "</b>";
+      var title = "<h2>" + titleCase(a[0]) + "</h2>";
       for (var k=3; k<len; k++) {
-        title = title + "<br />" + a[k];
+        var dix = a[k].replace("Invio:", "Invio lettere:").replace("Ricezione:", "Ricezione lettere:");
+        title = title + "<p style='font-size: 14px;'>" + dix + " occorrenze</p><hr>";
       }
       var marker = new L.Marker(new L.LatLng(a[1], a[2]), { title: title });
       marker.bindPopup(title);

+ 7 - 0
object.html

@@ -135,6 +135,13 @@
 											<div class="col-auto" id="btn_other_identifier"></div>
 										</div>
 
+										<div class="row mb-2" id="IDreg" style="display:none;">
+											<div class="col-sm-4">
+												<span class="label">Segnatura originale:</span>
+											</div>
+											<div class="col" id="sigla_registro"></div>
+										</div>
+
 										<div class="row mb-2" id="current_owner" style="display:none;">
 											<div class="col-sm-4">
 												<span class="label">Istituto di conservazione:</span>