Disabled "Dump some row(s)" sub-options when they are not selected, fixed comments, minor refactoring

This commit is contained in:
lorilee
2010-07-08 11:55:21 -07:00
parent 3c1e06a3e6
commit 0692c8f0b7

View File

@@ -118,7 +118,7 @@ $(document).ready(function() {
});
/**
* For SQL plugin, if "CREATE TABLE options" is checked/uncheck, check/uncheck each of its sub-options
* For SQL plugin, if "CREATE TABLE options" is checked/unchecked, check/uncheck each of its sub-options
*/
$(document).ready(function() {
$("#checkbox_sql_create_table_statements").change(function() {
@@ -154,8 +154,7 @@ $(document).ready(function() {
*/
$(document).ready(function() {
$("input[type='radio'][name='quick_or_custom']").change(function() {
export_type = $("input[type='radio'][name='quick_or_custom']:checked").attr("value");
if(export_type == "custom") {
if($("$(this):checked").attr("value") == "custom") {
$("#databases_and_tables").show();
$("#rows").show();
$("#output").show();
@@ -180,6 +179,7 @@ $(document).ready(function() {
$(document).ready(function() {
$("#quick_or_custom").show();
$("#databases_and_tables").hide();
$("#rows").hide();
$("#output_quick_export").show();
$("#output").hide();
$("#format_specific_opts").hide();
@@ -188,3 +188,23 @@ $(document).ready(function() {
$(".format_specific_options").css({ "border": 0, "margin": 0, "padding": 0});
$(".format_specific_options h3").remove();
});
/**
* Disables the "Dump some row(s)" sub-options when it is not selected
*/
$(document).ready(function() {
$("input[type='radio'][name='allrows']").change(function() {
// alert(("$(this):checked").attr("name"));
if($("input[type='radio'][name='allrows']:checked").attr("value") == "1") {
$("label[for='limit_to']").fadeTo('fast', 0.4);
$("label[for='limit_from']").fadeTo('fast', 0.4);
$("input[type='text'][name='limit_to']").attr('disabled', 'disabled');
$("input[type='text'][name='limit_from']").attr('disabled', 'disabled');
} else {
$("label[for='limit_to']").fadeTo('fast', 1);
$("label[for='limit_from']").fadeTo('fast', 1);
$("input[type='text'][name='limit_to']").removeAttr('disabled');
$("input[type='text'][name='limit_from']").removeAttr('disabled');
}
});
});