diff --git a/jupyter-openbis-extension/static/connectionDialog.js b/jupyter-openbis-extension/static/connectionDialog.js index 40c88225a504b0971efb6bb05afcbed4a8c652da..177372e0264f6654aca73113ffdd85b8b66d7e35 100644 --- a/jupyter-openbis-extension/static/connectionDialog.js +++ b/jupyter-openbis-extension/static/connectionDialog.js @@ -48,8 +48,22 @@ define( var row = tbody.insertRow() row.insertCell().appendChild(conn) - row.insertCell().textContent = connection.name - row.insertCell().textContent = connection.url + var nameCell = row.insertCell() + nameCell.textContent = connection.name + nameCell.onclick = function () { + var radio = this.parentElement.firstElementChild.firstElementChild + radio.checked = 1 + state.connection.candidateName = radio.value + state.connection.candidateDTO = getConnectionByName(state.connection.candidateName); + } + var urlCell = row.insertCell() + urlCell.textContent = connection.url + urlCell.onclick = function () { + var radio = this.parentElement.firstElementChild.firstElementChild + radio.checked = 1 + state.connection.candidateName = radio.value + state.connection.candidateDTO = getConnectionByName(state.connection.candidateName); + } var status_cell = row.insertCell() @@ -122,8 +136,15 @@ define( pwform.appendChild(password) pwform.appendChild(connect_button) - var cell = row.insertCell() - cell.appendChild(pwform) + var pwCell = row.insertCell() + pwCell.appendChild(pwform) + + pwCell.onclick = function () { + var radio = this.parentElement.firstElementChild.firstElementChild + radio.checked = 1 + state.connection.candidateName = radio.value + state.connection.candidateDTO = getConnectionByName(state.connection.candidateName); + } } // add row for new connection