diff --git a/desktop/js/Abeille.js b/desktop/js/Abeille.js index 91138e6c40..56bc294d93 100755 --- a/desktop/js/Abeille.js +++ b/desktop/js/Abeille.js @@ -78,6 +78,8 @@ function refreshAdvEq() { document.getElementById("idZbManuf").value = eq.zbManuf; document.getElementById("idModelName").value = eq.modelName; document.getElementById("idModelSource").value = eq.modelSource; + docUrl = document.getElementById("idDocUrl"); + docUrl.setAttribute("href", js_urlProducts + "/" + eq.modelName); if (eq.modelSource == "local") { $("#idDelLocalBtn").show(); } @@ -118,24 +120,22 @@ function refreshAdvEq() { console.log("paramType: " + eq.paramType); if (eq.paramType == "telecommande") { - document.getElementById("telecommande" ).style.display = "block"; + document.getElementById("telecommande").style.display = "block"; + } else { + document.getElementById("telecommande").style.display = "none"; } - else { - document.getElementById("telecommande" ).style.display = "none"; - } if (eq.paramType == "telecommande7groups") { - document.getElementById("telecommande7groups").style.display = "block"; + document.getElementById("telecommande7groups").style.display = + "block"; + } else { + document.getElementById("telecommande7groups").style.display = + "none"; } - else { - document.getElementById("telecommande7groups").style.display = "none"; - } if (eq.paramType == "paramABC") { - document.getElementById("paramABC" ).style.display = "block"; + document.getElementById("paramABC").style.display = "block"; + } else { + document.getElementById("paramABC").style.display = "none"; } - else { - document.getElementById("paramABC" ).style.display = "none"; - } - // Updating info cmds const advInfoCmds = document.querySelectorAll("[advInfo]"); // All with attribute named "advInfo" @@ -827,15 +827,17 @@ $("#idModelChangeBtn").on("click", function () { console.log("idModelChangeBtn on " + curEqId); // Open empty dialog - var myPopup = bootbox.dialog({ - message: '
', // must not be empty + var myPopup = bootbox.dialog({ + message: "", // must not be empty title: "{{Choisir le modèle de votre équipement}}", - className: "abeille_modelChangePopup" + className: "abeille_modelChangePopup", }); // Content template is defined in Abeille-Eq-Advanced-Device.php var $content = myPopup.find(".bootbox-body"); - $content.empty().append($(".abeille-model-change-popup-content").clone().show()); + $content + .empty() + .append($(".abeille-model-change-popup-content").clone().show()); var $datalist = $("#abeille-all-models-list").empty(); // Ajax query to populate datalist options (= list of knwow models) @@ -901,9 +903,7 @@ $("#idModelChangeBtn").on("click", function () { // Check user input var strSaisie = $content.find("input[type=search]").val(); if ($datalist.find('option[value="' + strSaisie + '"]').length == 0) { - alert( - "{{Erreur: vous devez choisir un modèle dans la liste.}}" - ); + alert("{{Erreur: vous devez choisir un modèle dans la liste.}}"); return; } @@ -913,7 +913,12 @@ $("#idModelChangeBtn").on("click", function () { strSuppBatterie = "