|
44 | 44 | </div> |
45 | 45 |
|
46 | 46 | <div class="form-row credentials"> |
47 | | - <label> </label> |
48 | | - <input type="checkbox" id="node-input-default-endpoint" style="display: inline-block; width: auto; vertical-align: top;"> |
49 | | - <label for="node-input-default-endpoint" style="width: 70%;"> Use Default Service Endpoint</label> |
50 | | - </div> |
51 | | - <div class="form-row"> |
52 | 47 | <label for="node-input-service-endpoint"><i class="fa fa-tag"></i> Service Endpoint</label> |
53 | 48 | <input type="text" id="node-input-service-endpoint" placeholder="https://stream.watsonplatform.net/text-to-speech/api"> |
54 | 49 | </div> |
|
233 | 228 | var k = $('#node-input-apikey').val(); |
234 | 229 |
|
235 | 230 | if ( (k && k.length) || (u && u.length && p) ) { |
236 | | - if (!ttsv1qbb.voices) { |
| 231 | + if (!ttsv1qbb.voices) {; |
237 | 232 | ttsv1qbb.getVoices(); |
238 | 233 | } |
239 | 234 | } |
|
382 | 377 | } |
383 | 378 | }); |
384 | 379 |
|
385 | | - $('#node-input-default-endpoint').change(function () { |
386 | | - var checked = $('#node-input-default-endpoint').prop('checked') |
387 | | - if (checked) { |
388 | | - $('#node-input-service-endpoint').parent().hide(); |
389 | | - } else { |
390 | | - $('#node-input-service-endpoint').parent().show(); |
391 | | - } |
392 | | - }); |
393 | 380 | } |
394 | 381 |
|
395 | 382 | // The dynamic nature of the selection fields in this node has caused problems. |
|
496 | 483 | var e = $('#node-input-service-endpoint').val(); |
497 | 484 | var creds = {un: u, pwd: p, key: k}; |
498 | 485 |
|
499 | | - if (! $('#node-input-default-endpoint').prop('checked')) { |
500 | | - creds.e = e; |
501 | | - } |
| 486 | + creds.e = e; |
| 487 | + |
502 | 488 | $.getJSON('watson-text-to-speech-v1-query-builder/voices/',creds) |
503 | 489 | .done(function (data) { |
504 | 490 | if (data.error) { |
|
565 | 551 | 'tts-voice-or-custom' : {value: ''}, |
566 | 552 | 'tts-voice': {value: ""}, |
567 | 553 | 'tts-voicehidden': {value: ""}, |
568 | | - 'default-endpoint' :{value: true}, |
569 | | - 'service-endpoint' :{value: 'https://stream.watsonplatform.net/text-to-speech/api'} |
| 554 | + 'service-endpoint' :{value: ''} |
570 | 555 | }, |
571 | 556 | credentials: { |
572 | 557 | username: {type:'text'} //, |
|
0 commit comments