if (window.location.hash) {
$("input[name='_current_tab']").val(window.location.hash.substr(1));
}
+
+ if($('[data-class="external_path_server_select"]').length > 0) {
+ function applyServerChange(s) {
+ if (getInitialValue() !== $(s).val()) {
+ $('a#s_section_downloads').addClass('non-default')
+ $("[name=hidden_install_online]").val($(s).val())
+ } else {
+ $('a#s_section_downloads').removeClass('non-default')
+ $("[name=hidden_install_online]").val(getInitialValue())
+ }
+ }
+
+ function getInitialValue() {
+ return $("[name=hidden_install_online]").attr('data-initial')
+ }
+
+ function setInitialValue() {
+ $("[name=hidden_install_online]").attr('data-initial', $('[data-class="external_path_server_select"]').val())
+ }
+
+ setInitialValue()
+
+ $(document).on('change', '[data-class="external_path_server_select"]', function () {
+ applyServerChange($(this));
+ });
+
+ $(document).on('keyup keydown', '[data-class="external_path_server_path"]', function () {
+ applyServerChange($(this));
+ });
+ }
});
</script>