diff options
author | Chirayu Chiripal <chirayu.chiripal@gmail.com> | 2014-09-29 11:16:45 +0400 |
---|---|---|
committer | Chirayu Chiripal <chirayu.chiripal@gmail.com> | 2014-09-29 17:20:12 +0400 |
commit | aae1b30d62393cc0da8e51a519f0d3aa14ef4e22 (patch) | |
tree | e81e46c4421ab808a00e194dae6341b1dd95cdc6 /js/export.js | |
parent | cbb03aea4a89d9dfcd7934562150a04785a9d999 (diff) |
fix export with more than 1000 input fields (db/table/column alias)
Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>
Diffstat (limited to 'js/export.js')
-rw-r--r-- | js/export.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/js/export.js b/js/export.js index 1dabf31d32..72f87caafc 100644 --- a/js/export.js +++ b/js/export.js @@ -265,9 +265,22 @@ function aliasSelectHandler(event) { $('input#' + $label.attr('for')).addClass('hide'); $('input#' + inputId).removeClass('hide'); $label.attr('for', inputId); - //alert('#' + $label.attr('for')); $('#alias_modal ' + sel + '[id$=' + type + ']:visible').addClass('hide'); - $('#alias_modal ' + sel + '#' + inputId + type).removeClass('hide'); + var $inputWrapper = $('#alias_modal ' + sel + '#' + inputId + type); + $inputWrapper.removeClass('hide'); + if (type === '_cols' && $inputWrapper.length > 0) { + var outer = $inputWrapper[0].outerHTML; + // Replace opening tags + var regex = /<dummy_inp/gi; + var newTag = outer.replace(regex, '<input'); + // Replace closing tags + regex = /<\/dummy_inp/gi; + newTag = newTag.replace(regex, '</input'); + // Assign replacement + $inputWrapper.replaceWith(newTag); + } else if (type === '_tables') { + $('.table_alias_select:visible').change(); + } $("#alias_modal").dialog("option", "position", "center"); } @@ -314,6 +327,8 @@ function createAliasModal(event) { }, position: 'center' }); + // Call change event of .table_alias_select + $('.table_alias_select:visible').trigger('change'); } AJAX.registerOnload('export.js', function () { |