2019-12-23 05:54:09 +00:00
|
|
|
$.ajaxSetup({
|
|
|
|
cache: false
|
|
|
|
});
|
|
|
|
$(function() {
|
2019-12-28 04:12:13 +00:00
|
|
|
//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()+']');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2019-12-23 05:54:09 +00:00
|
|
|
});
|