Skip to content

Commit

Permalink
Add event for submit of export sql form to remove error of undefined …
Browse files Browse the repository at this point in the history
…function.

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
  • Loading branch information
Piyush3079 committed Jul 30, 2018
1 parent 85c16c1 commit d111a2c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion js/src/export.js
Expand Up @@ -5,7 +5,7 @@ import { createTemplate, loadTemplate, updateTemplate,
check_table_selected, toggle_table_select, toggle_table_select_all_str,
check_selected_tables, toggle_table_select_all_data, setup_table_structure_or_data,
toggle_quick_or_custom, toggle_sql_include_comments, disable_dump_some_rows_sub_options,
enable_dump_some_rows_sub_options, aliasToggleRow, addAlias, createAliasModal
enable_dump_some_rows_sub_options, aliasToggleRow, addAlias, createAliasModal, check_time_out
} from './functions/export';
import { PMA_Messages as PMA_messages } from './variables/export_variables';
import { PMA_commonParams } from './variables/common_params';
Expand Down Expand Up @@ -35,6 +35,7 @@ export function teardown1 () {
$('select[name="template"]').off('change');
$('input[name="updateTemplate"]').off('click');
$('input[name="deleteTemplate"]').off('click');
$('form[name=\'dump\']').off('submit');
}

export function onload1 () {
Expand Down Expand Up @@ -128,6 +129,12 @@ export function onload1 () {
$('input[type="checkbox"][name="as_separate_files"]').prop('checked', false);
}
});

// Handle submit of form to export sql
$('form[name=\'dump\']').on('submit', function (e) {
var timeout = $('input[type=\'submit\'][id=\'buttonGo\']').data().timeout;
check_time_out(timeout);
});
}

export function onload2 () {
Expand Down
2 changes: 1 addition & 1 deletion templates/display/export/options_format.twig
Expand Up @@ -19,6 +19,6 @@
{#- If the time limit set is zero, then time out won't occur so no need
to check for time out. -#}
{%- if exec_time_limit > 0 %}
onclick="check_time_out({{ exec_time_limit }})"
data-timeout={{ exec_time_limit }}
{%- endif %}>
</div>

0 comments on commit d111a2c

Please sign in to comment.