You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
786 B
26 lines
786 B
$.ajaxSetup({ |
|
cache: false |
|
}); |
|
$(function() { |
|
//console.log('Load'); |
|
if ($('#connection_security').length) { |
|
//console.log('connection_security select exists'); |
|
$("#connection_security").change(function(){ |
|
var connection_security_value = $("#connection_security").val(); |
|
var port_value = $("#port").val(); |
|
//console.log('connection_security changed: ['+connection_security_value+'], port was: ['+port_value+']'); |
|
if (connection_security_value == 'ssl_tls') { |
|
if (port_value != '993') { |
|
$("#port").val('993'); |
|
//console.log('port changed to: ['+$("#port").val()+']'); |
|
} |
|
} |
|
else { |
|
if (port_value != '143') { |
|
$("#port").val('143'); |
|
//console.log('port changed to: ['+$("#port").val()+']'); |
|
} |
|
} |
|
}); |
|
} |
|
});
|
|
|