diff --git a/js/export.js b/js/export.js index 35f554c196..f9fe774c78 100644 --- a/js/export.js +++ b/js/export.js @@ -4,6 +4,28 @@ * */ +/** + * Disables the "Dump some row(s)" sub-options + */ +function disable_dump_some_rows_sub_options() +{ + $("label[for='limit_to']").fadeTo('fast', 0.4); + $("label[for='limit_from']").fadeTo('fast', 0.4); + $("input[type='text'][name='limit_to']").prop('disabled', 'disabled'); + $("input[type='text'][name='limit_from']").prop('disabled', 'disabled'); +} + +/** + * Enables the "Dump some row(s)" sub-options + */ +function enable_dump_some_rows_sub_options() +{ + $("label[for='limit_to']").fadeTo('fast', 1); + $("label[for='limit_from']").fadeTo('fast', 1); + $("input[type='text'][name='limit_to']").prop('disabled', ''); + $("input[type='text'][name='limit_from']").prop('disabled', ''); +} + /** * Unbind all event handlers before tearing down a page */ @@ -221,7 +243,7 @@ AJAX.registerOnload('export.js', function () { * Initially disables the "Dump some row(s)" sub-options */ disable_dump_some_rows_sub_options(); - + /** * Disables the "Dump some row(s)" sub-options when it is not selected */ @@ -233,25 +255,3 @@ AJAX.registerOnload('export.js', function () { } }); }); - -/** - * Disables the "Dump some row(s)" sub-options - */ -function disable_dump_some_rows_sub_options() -{ - $("label[for='limit_to']").fadeTo('fast', 0.4); - $("label[for='limit_from']").fadeTo('fast', 0.4); - $("input[type='text'][name='limit_to']").prop('disabled', 'disabled'); - $("input[type='text'][name='limit_from']").prop('disabled', 'disabled'); -} - -/** - * Enables the "Dump some row(s)" sub-options - */ -function enable_dump_some_rows_sub_options() -{ - $("label[for='limit_to']").fadeTo('fast', 1); - $("label[for='limit_from']").fadeTo('fast', 1); - $("input[type='text'][name='limit_to']").prop('disabled', ''); - $("input[type='text'][name='limit_from']").prop('disabled', ''); -}