diff options
Diffstat (limited to 'Postman/Postman-Configuration/postman_manual_config.js')
-rw-r--r-- | Postman/Postman-Configuration/postman_manual_config.js | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Postman/Postman-Configuration/postman_manual_config.js b/Postman/Postman-Configuration/postman_manual_config.js index 14d4d9f..e7668b7 100644 --- a/Postman/Postman-Configuration/postman_manual_config.js +++ b/Postman/Postman-Configuration/postman_manual_config.js @@ -23,6 +23,26 @@ jQuery(document).ready( switchBetweenPasswordAndOAuth(); }); + jQuery('select#input_notification_service').change(function() { + var selected = $( this ).val(); + + if ( selected == 'default' ) { + $('#slack_cred').fadeOut('fast'); + $('#pushover_cred').fadeOut('fast'); + } + + if ( selected == 'pushover' ) { + $('#slack_cred').fadeOut('fast'); + $('#pushover_cred').fadeIn(); + } + + if ( selected == 'slack' ) { + $('#pushover_cred').fadeOut('fast'); + $('#slack_cred').fadeIn(); + } + }); + + // add an event on the authentication input field // on user changing the auth type, determine whether to show // password or oauth section @@ -52,6 +72,7 @@ jQuery(document).ready( } } }); + function reloadOauthSection() { var hostname = jQuery(postman_hostname_element_name).val(); var transport = jQuery('#input_transport_type').val(); @@ -74,5 +95,5 @@ function switchBetweenPasswordAndOAuth() { var transportName = jQuery('select#input_transport_type').val(); transports.forEach(function(item) { item.handleTransportChange(transportName); - }) + }); } |