Disabled "Dump some row(s)" sub-options when they are not selected, fixed comments, minor refactoring
This commit is contained in:
26
js/export.js
26
js/export.js
@@ -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() {
|
$(document).ready(function() {
|
||||||
$("#checkbox_sql_create_table_statements").change(function() {
|
$("#checkbox_sql_create_table_statements").change(function() {
|
||||||
@@ -154,8 +154,7 @@ $(document).ready(function() {
|
|||||||
*/
|
*/
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("input[type='radio'][name='quick_or_custom']").change(function() {
|
$("input[type='radio'][name='quick_or_custom']").change(function() {
|
||||||
export_type = $("input[type='radio'][name='quick_or_custom']:checked").attr("value");
|
if($("$(this):checked").attr("value") == "custom") {
|
||||||
if(export_type == "custom") {
|
|
||||||
$("#databases_and_tables").show();
|
$("#databases_and_tables").show();
|
||||||
$("#rows").show();
|
$("#rows").show();
|
||||||
$("#output").show();
|
$("#output").show();
|
||||||
@@ -180,6 +179,7 @@ $(document).ready(function() {
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#quick_or_custom").show();
|
$("#quick_or_custom").show();
|
||||||
$("#databases_and_tables").hide();
|
$("#databases_and_tables").hide();
|
||||||
|
$("#rows").hide();
|
||||||
$("#output_quick_export").show();
|
$("#output_quick_export").show();
|
||||||
$("#output").hide();
|
$("#output").hide();
|
||||||
$("#format_specific_opts").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").css({ "border": 0, "margin": 0, "padding": 0});
|
||||||
$(".format_specific_options h3").remove();
|
$(".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');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
Reference in New Issue
Block a user