|
239 | 239 | targetLanguageDiv.style.display = 'inline-grid'; |
240 | 240 | } |
241 | 241 |
|
| 242 | + function hideUITargetLanguageOption(optionValue) { |
| 243 | + const selectElement = document.getElementById('targetLanguage'); |
| 244 | + const options = selectElement.getElementsByTagName('option'); |
| 245 | + for (let i = 0; i < options.length; i++) { |
| 246 | + const option = options[i]; |
| 247 | + if (option.value === optionValue) { |
| 248 | + option.style.display = 'none'; |
| 249 | + break; |
| 250 | + } |
| 251 | + } |
| 252 | + } |
| 253 | + |
| 254 | + function showUITargetLanguageOption(optionValue) { |
| 255 | + const selectElement = document.getElementById('targetLanguage'); |
| 256 | + const options = selectElement.getElementsByTagName('option'); |
| 257 | + for (let i = 0; i < options.length; i++) { |
| 258 | + const option = options[i]; |
| 259 | + if (option.value === optionValue) { |
| 260 | + option.style.display = 'block'; |
| 261 | + break; |
| 262 | + } |
| 263 | + } |
| 264 | + } |
| 265 | + |
242 | 266 | function updateUIOutputFolderFromData() { |
243 | 267 | const outputFolderText = document.getElementById("outputFolderText"); |
244 | 268 | outputFolderText.value = globalConversionInfo.outputFolder; |
|
259 | 283 | hideUITargetLanguage(); |
260 | 284 | } else { |
261 | 285 | showUITargetLanguage(); |
| 286 | + |
| 287 | + if (isTargetSelectionOptionDisabled('DOT')) { |
| 288 | + hideUITargetLanguageOption('DOT'); |
| 289 | + } else { |
| 290 | + showUITargetLanguageOption('DOT'); |
| 291 | + } |
262 | 292 | } |
263 | 293 | } |
264 | 294 |
|
|
299 | 329 | return false; |
300 | 330 | } |
301 | 331 |
|
| 332 | + function isTargetSelectionOptionDisabled(option) { |
| 333 | + const curr = getCurrentUIType(); |
| 334 | + if (curr !== "uipath" && option === 'DOT') { |
| 335 | + return true; |
| 336 | + } |
| 337 | + return false; |
| 338 | + } |
| 339 | + |
302 | 340 | function getCurrentUIType() { |
303 | 341 | return document.getElementById("inputBotFormat").value; |
304 | 342 | } |
|
560 | 598 | <select id="targetLanguage" onchange="onTargetLanguageChanged()"> |
561 | 599 | <option value="PYTHON">Python</option> |
562 | 600 | <option value="RF">Robot Framework</option> |
| 601 | + <option value="DOT">Graphviz DOT</option> |
563 | 602 | </select> |
564 | 603 | </div> |
565 | 604 |
|
|
0 commit comments