Upgraded phpmyadmin to 4.0.4 (All Languages) - No modifications yet
[openemr.git] / phpmyadmin / js / import.js
blobc250baedc327f31bac1776cb5e4bd3947b0f71f8
1 function changePluginOpts(){$("#format_specific_opts div.format_specific_options").each(function(){$(this).hide()});var a=$("#plugins option:selected").val();$("#"+a+"_options").fadeIn("slow");if(a=="csv"){$("#import_notification").text(PMA_messages.strImportCSV)}else{$("#import_notification").text("")}}function matchFile(d){var b=d.toLowerCase().split(".");var a=b.length;if(a!=0){var c=b[a-1];if(c=="gz"||c=="bz2"||c=="zip"){a--}if($("select[name='format'] option").filterByValue(b[a-1]).length==1){$("select[name='format'] option").filterByValue(b[a-1]).prop("selected",true);changePluginOpts()}}}AJAX.registerTeardown("import.js",function(){$("#plugins").unbind("change");$("#input_import_file").unbind("change");$("#select_local_import_file").unbind("change");$("#input_import_file").unbind("change").unbind("focus");$("#select_local_import_file").unbind("focus")});AJAX.registerOnload("import.js",function(){changePluginOpts();$("#plugins").change(function(){changePluginOpts()});$("#input_import_file").change(function(){matchFile($(this).val())});$("#select_local_import_file").change(function(){matchFile($(this).val())});$("#input_import_file").bind("focus change",function(){$("#radio_import_file").prop("checked",true);$("#radio_local_import_file").prop("checked",false)});$("#select_local_import_file").focus(function(){$("#radio_local_import_file").prop("checked",true);$("#radio_import_file").prop("checked",false)});$("#scroll_to_options_msg").hide();$("#format_specific_opts div.format_specific_options").css({border:0,margin:0,padding:0}).find("h3").remove()});