diff --git a/ChangeLog b/ChangeLog index 9d721d3a1e..ef70d93d76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ phpMyAdmin - ChangeLog - issue #17143 Use composer/ca-bundle to manage the CA cert file - issue #17143 Require the openssl PHP extension - issue #17171 Remove the printview.css file from themes +- issue #17203 Redesign the export and the import pages 5.1.2 (not yet released) - issue Replaced MySQL documentation redirected links diff --git a/js/src/export.js b/js/src/export.js index f91bd057c6..983c66d25a 100644 --- a/js/src/export.js +++ b/js/src/export.js @@ -282,9 +282,9 @@ AJAX.registerOnload('export.js', function () { * according to the currently selected plugin from the dropdown list */ $('#plugins').on('change', function () { - $('#format_specific_opts').find('div.format_specific_options').hide(); + $('#format_specific_opts').find('div.format_specific_options').addClass('d-none'); var selectedPluginName = $('#plugins').find('option:selected').val(); - $('#' + selectedPluginName + '_options').show(); + $('#' + selectedPluginName + '_options').removeClass('d-none'); }); /** @@ -704,15 +704,15 @@ Export.toggleQuickOrCustom = function () { $('#rows').show(); $('#output').show(); $('#format_specific_opts').show(); - $('#output_quick_export').hide(); + $('#output_quick_export').addClass('d-none'); var selectedPluginName = $('#plugins').find('option:selected').val(); - $('#' + selectedPluginName + '_options').show(); + $('#' + selectedPluginName + '_options').removeClass('d-none'); } else { // quick $('#databases_and_tables').hide(); $('#rows').hide(); $('#output').hide(); $('#format_specific_opts').hide(); - $('#output_quick_export').show(); + $('#output_quick_export').removeClass('d-none'); } }; @@ -835,14 +835,8 @@ Export.addAlias = function (type, name, field, value) { AJAX.registerOnload('export.js', function () { $('input[type=\'radio\'][name=\'quick_or_custom\']').on('change', Export.toggleQuickOrCustom); - $('#scroll_to_options_msg').hide(); $('#format_specific_opts').find('div.format_specific_options') - .hide() - .css({ - 'border': 0, - 'margin': 0, - 'padding': 0 - }) + .addClass('d-none') .find('h3') .remove(); Export.toggleQuickOrCustom(); @@ -860,7 +854,7 @@ AJAX.registerOnload('export.js', function () { * Disables the "Dump some row(s)" sub-options when it is not selected */ $('input[type=\'radio\'][name=\'allrows\']').on('change', function () { - if ($('input[type=\'radio\'][name=\'allrows\']').prop('checked')) { + if ($('#radio_allrows_0').prop('checked')) { Export.enableDumpSomeRowsSubOptions(); } else { Export.disableDumpSomeRowsSubOptions(); diff --git a/js/src/import.js b/js/src/import.js index 94fe01954a..989b35b51f 100644 --- a/js/src/import.js +++ b/js/src/import.js @@ -14,10 +14,11 @@ function changePluginOpts () { }); var selectedPluginName = $('#plugins').find('option:selected').val(); $('#' + selectedPluginName + '_options').fadeIn('slow'); + + const importNotification = document.getElementById('import_notification'); + importNotification.innerText = ''; if (selectedPluginName === 'csv') { - $('#import_notification').text(Messages.strImportCSV); - } else { - $('#import_notification').text(''); + importNotification.innerHTML = ''; } } @@ -58,8 +59,8 @@ AJAX.registerTeardown('import.js', function () { AJAX.registerOnload('import.js', function () { // import_file_form validation. $(document).on('submit', '#import_file_form', function () { - var radioLocalImport = $('#radio_local_import_file'); - var radioImport = $('#radio_import_file'); + var radioLocalImport = $('#localFileTab'); + var radioImport = $('#uploadFileTab'); var fileMsg = ''; var wrongTblNameMsg = ''; var wrongDBNameMsg = ''; @@ -67,13 +68,13 @@ AJAX.registerOnload('import.js', function () { if (radioLocalImport.length !== 0) { // remote upload. - if (radioImport.is(':checked') && $('#input_import_file').val() === '') { + if (radioImport.hasClass('active') && $('#input_import_file').val() === '') { $('#input_import_file').trigger('focus'); Functions.ajaxShowMessage(fileMsg, false); return false; } - if (radioLocalImport.is(':checked')) { + if (radioLocalImport.hasClass('active')) { if ($('#select_local_import_file').length === 0) { Functions.ajaxShowMessage('', false); return false; @@ -129,30 +130,11 @@ AJAX.registerOnload('import.js', function () { matchFile($(this).val()); }); - /* - * When the "Browse the server" form is clicked or the "Select from the web server upload directory" - * form is clicked, the radio button beside it becomes selected and the other form becomes disabled. - */ - $('#input_import_file').on('focus change', function () { - $('#radio_import_file').prop('checked', true); - $('#radio_local_import_file').prop('checked', false); - }); - $('#select_local_import_file').on('focus', function () { - $('#radio_local_import_file').prop('checked', true); - $('#radio_import_file').prop('checked', false); - }); - /** * Set up the interface for Javascript-enabled browsers since the default is for * Javascript-disabled browsers */ - $('#scroll_to_options_msg').hide(); $('#format_specific_opts').find('div.format_specific_options') - .css({ - 'border': 0, - 'margin': 0, - 'padding': 0 - }) .find('h3') .remove(); // $("form[name=import] *").unwrap(); diff --git a/js/src/normalization.js b/js/src/normalization.js index b1cb296a63..a8c794b6ff 100644 --- a/js/src/normalization.js +++ b/js/src/normalization.js @@ -309,11 +309,11 @@ function goTo2NFStep2 (pd, primaryKey) { for (var dependson in pd) { if (dependson !== primaryKey) { pdFound = true; - extra += '

' + Functions.escapeHtml(dependson) + ' -> ' + Functions.escapeHtml(pd[dependson].toString()) + '

'; + extra += '

' + Functions.escapeHtml(dependson) + ' -> ' + Functions.escapeHtml(pd[dependson].toString()) + '

'; } } if (!pdFound) { - extra += '

' + Messages.strNoPdSelected + '

'; + extra += '

' + Messages.strNoPdSelected + '

'; extra += ''; } else { extra += ''; @@ -357,12 +357,12 @@ function goTo3NFStep2 (pd, tablesTds) { var dependson = tablesTds[table][i]; if (dependson !== '' && dependson !== table) { pdFound = true; - extra += '

' + Functions.escapeHtml(dependson) + ' -> ' + Functions.escapeHtml(pd[dependson].toString()) + '

'; + extra += '

' + Functions.escapeHtml(dependson) + ' -> ' + Functions.escapeHtml(pd[dependson].toString()) + '

'; } } } if (!pdFound) { - extra += '

' + Messages.strNoTdSelected + '

'; + extra += '

' + Messages.strNoTdSelected + '

'; extra += ''; } else { extra += ''; diff --git a/libraries/classes/Controllers/Database/ImportController.php b/libraries/classes/Controllers/Database/ImportController.php index 803400fb15..42363d4a48 100644 --- a/libraries/classes/Controllers/Database/ImportController.php +++ b/libraries/classes/Controllers/Database/ImportController.php @@ -107,6 +107,7 @@ final class ImportController extends AbstractController $options = Plugins::getOptions('Import', $importList); $skipQueriesDefault = Plugins::getDefault('Import', 'skip_queries'); $isAllowInterruptChecked = Plugins::checkboxCheck('Import', 'allow_interrupt'); + $maxUploadSize = (int) $GLOBALS['config']->get('max_upload_size'); $this->render('database/import/index', [ 'page_settings_error_html' => $pageSettingsErrorHtml, @@ -116,7 +117,8 @@ final class ImportController extends AbstractController 'hidden_inputs' => $hiddenInputs, 'db' => $db, 'table' => $table, - 'max_upload_size' => $GLOBALS['config']->get('max_upload_size'), + 'max_upload_size' => $maxUploadSize, + 'formatted_maximum_upload_size' => Util::getFormattedMaximumUploadSize($maxUploadSize), 'plugins_choice' => $choice, 'options' => $options, 'skip_queries_default' => $skipQueriesDefault, diff --git a/libraries/classes/Controllers/Server/ImportController.php b/libraries/classes/Controllers/Server/ImportController.php index 8d3cb0e88e..897e689a84 100644 --- a/libraries/classes/Controllers/Server/ImportController.php +++ b/libraries/classes/Controllers/Server/ImportController.php @@ -92,6 +92,7 @@ final class ImportController extends AbstractController $options = Plugins::getOptions('Import', $importList); $skipQueriesDefault = Plugins::getDefault('Import', 'skip_queries'); $isAllowInterruptChecked = Plugins::checkboxCheck('Import', 'allow_interrupt'); + $maxUploadSize = (int) $GLOBALS['config']->get('max_upload_size'); $this->render('server/import/index', [ 'page_settings_error_html' => $pageSettingsErrorHtml, @@ -101,7 +102,8 @@ final class ImportController extends AbstractController 'hidden_inputs' => $hiddenInputs, 'db' => $db, 'table' => $table, - 'max_upload_size' => $GLOBALS['config']->get('max_upload_size'), + 'max_upload_size' => $maxUploadSize, + 'formatted_maximum_upload_size' => Util::getFormattedMaximumUploadSize($maxUploadSize), 'plugins_choice' => $choice, 'options' => $options, 'skip_queries_default' => $skipQueriesDefault, diff --git a/libraries/classes/Controllers/Table/ImportController.php b/libraries/classes/Controllers/Table/ImportController.php index 86b3217d03..09ff7b3080 100644 --- a/libraries/classes/Controllers/Table/ImportController.php +++ b/libraries/classes/Controllers/Table/ImportController.php @@ -105,6 +105,7 @@ final class ImportController extends AbstractController $options = Plugins::getOptions('Import', $importList); $skipQueriesDefault = Plugins::getDefault('Import', 'skip_queries'); $isAllowInterruptChecked = Plugins::checkboxCheck('Import', 'allow_interrupt'); + $maxUploadSize = (int) $GLOBALS['config']->get('max_upload_size'); $this->render('table/import/index', [ 'page_settings_error_html' => $pageSettingsErrorHtml, @@ -114,7 +115,8 @@ final class ImportController extends AbstractController 'hidden_inputs' => $hiddenInputs, 'db' => $db, 'table' => $table, - 'max_upload_size' => $GLOBALS['config']->get('max_upload_size'), + 'max_upload_size' => $maxUploadSize, + 'formatted_maximum_upload_size' => Util::getFormattedMaximumUploadSize($maxUploadSize), 'plugins_choice' => $choice, 'options' => $options, 'skip_queries_default' => $skipQueriesDefault, diff --git a/libraries/classes/Export.php b/libraries/classes/Export.php index 83f62debd5..b148b23e5f 100644 --- a/libraries/classes/Export.php +++ b/libraries/classes/Export.php @@ -549,7 +549,7 @@ class Export * Displays a back button with all the $_POST data in the URL * (store in a variable to also display after the textarea) */ - $backButton = '

[ ' + $html .= '

' . __('No partial dependencies found!') . '

'; } diff --git a/libraries/classes/Plugins.php b/libraries/classes/Plugins.php index 3f25972661..4215f2607c 100644 --- a/libraries/classes/Plugins.php +++ b/libraries/classes/Plugins.php @@ -284,8 +284,7 @@ class Plugins $properties = [$propertyGroup]; } else { // for main groups - $ret .= '
'; + $ret .= '
'; $text = null; if (method_exists($propertyGroup, 'getText')) { @@ -293,10 +292,10 @@ class Plugins } if ($text != null) { - $ret .= '

' . self::getString($text) . '

'; + $ret .= '
' . self::getString($text) . '
'; } - $ret .= '
    '; + $ret .= '
      '; } } @@ -322,7 +321,7 @@ class Plugins $ret .= self::getOneOption($section, $plugin_name, $subgroup_header); } - $ret .= '
    • getName() . '">'; } else { @@ -396,8 +395,9 @@ class Plugins $property_class = get_class($propertyItem); switch ($property_class) { case BoolPropertyItem::class: - $ret .= '
    • ' . "\n"; - $ret .= '' . "\n"; + $ret .= '
      ' . "\n"; + $ret .= 'getName() . '">' - . self::getString($propertyItem->getText()) . ''; + . self::getString($propertyItem->getText()) . '
      '; break; case DocPropertyItem::class: echo DocPropertyItem::class; break; case HiddenPropertyItem::class: - $ret .= '
    • '; break; case MessageOnlyPropertyItem::class: - $ret .= '
    • ' . "\n"; - $ret .= '

      ' . self::getString($propertyItem->getText()) . '

      '; + $ret .= '
    • ' . "\n"; + $ret .= self::getString($propertyItem->getText()); break; case RadioPropertyItem::class: /** @@ -450,31 +450,35 @@ class Plugins $plugin_name . '_' . $pitem->getName() ); + $ret .= '
    • '; + foreach ($pitem->getValues() as $key => $val) { - $ret .= '
    • getName() . '_' . $key . '">' - . self::getString($val) . '
    • '; + . self::getString($val) . '
'; } + $ret .= ''; + break; case SelectPropertyItem::class: /** * @var SelectPropertyItem $pitem */ $pitem = $propertyItem; - $ret .= '
  • ' . "\n"; + $ret .= '
  • ' . "\n"; $ret .= ''; - $ret .= 'getName() . '" class="desc">' + . $propertyItem->getName() . '" class="form-label">' . self::getString($propertyItem->getText()) . ''; - $ret .= '' . __('This format has no options') . '

    '; } $ret .= '
  • '; diff --git a/libraries/classes/Twig/UtilExtension.php b/libraries/classes/Twig/UtilExtension.php index 55bf7c43d0..9e365c4dd5 100644 --- a/libraries/classes/Twig/UtilExtension.php +++ b/libraries/classes/Twig/UtilExtension.php @@ -35,10 +35,6 @@ class UtilExtension extends AbstractExtension 'format_byte_down', [Util::class, 'formatByteDown'] ), - new TwigFunction( - 'get_formatted_maximum_upload_size', - [Util::class, 'getFormattedMaximumUploadSize'] - ), new TwigFunction( 'format_number', [Util::class, 'formatNumber'] diff --git a/templates/database/export/index.twig b/templates/database/export/index.twig index 0d5af46402..be1b32ef3e 100644 --- a/templates/database/export/index.twig +++ b/templates/database/export/index.twig @@ -10,10 +10,9 @@ {% block selection_options %} {% if export_type != 'raw' %} -
    -

    {% trans 'Tables:' %}

    - -
    +
    +
    {% trans 'Tables:' %}
    +
    @@ -21,17 +20,17 @@ - - + + - - + - @@ -42,11 +41,11 @@ - - + - diff --git a/templates/export.twig b/templates/export.twig index 88716edc0c..c7f679f12d 100644 --- a/templates/export.twig +++ b/templates/export.twig @@ -1,461 +1,502 @@ -{{ page_settings_error_html|raw }} -{{ page_settings_html|raw }} - -{% block message %}{% endblock %} - -
    {% trans 'Tables' %}{% trans 'Structure' %}{% trans 'Data' %}{% trans 'Structure' %}{% trans 'Data' %}
    {% trans 'Select all' %} - + {% trans 'Select all' %} + - + +
    {{ each_table.name }} + {{ each_table.name }} +
    - - - - - + + {% endif %} - - {% for db, db_data in aliases %} - {% if db_data.alias is defined and db_data.alias is not null %} + {% if has_save_dir %} +
    +
    {% trans 'Output:' %}
    +
    +
    + + +
    +
    + + +
    +
    +
    + {% endif %} + +
    - {% trans 'Defined aliases' %} -
    + - - + + + + + + {% for db, db_data in aliases %} + {% if db_data.alias is defined and db_data.alias is not null %} + + + + + + + {% endif %} + + {% for table, table_data in db_data.tables ?? [] %} + {% if table_data.alias is defined and table_data.alias is not null %} + + + + + + + {% endif %} + + {% for column, column_name in table_data.columns ?? [] %} + + + + + + + {% endfor %} + {% endfor %} + {% endfor %} + + + {# Empty row for javascript manipulations. #} + + + + - {% endif %} + +
    {% trans %}Database{% context %}Alias{% endtrans %}{{ db }} + {% trans 'Defined aliases' %} +
    {% trans %}Database{% context %}Alias{% endtrans %}{{ db }} + + + +
    {% trans %}Table{% context %}Alias{% endtrans %}{{ db }}.{{ table }} + + + +
    {% trans %}Column{% context %}Alias{% endtrans %}{{ db }}.{{ table }}.{{ column }} + + + +
    - +
    - {% for table, table_data in db_data.tables ?? [] %} - {% if table_data.alias is defined and table_data.alias is not null %} - - {% trans %}Table{% context %}Alias{% endtrans %} - {{ db }}.{{ table }} - - - - - - - - {% endif %} - - {% for column, column_name in table_data.columns ?? [] %} - - {% trans %}Column{% context %}Alias{% endtrans %} - {{ db }}.{{ table }}.{{ column }} - - - - - - - - {% endfor %} - {% endfor %} - {% endfor %} - - - {# Empty row for javascript manipulations. #} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {% trans 'Define new aliases' %}
    - - - - - - - -
    - - - - - - - -
    - - - - - - - -
    -
    - +
    - -
    -

    {% trans 'Output:' %}

    - + {% if has_zip or has_gzip %} +
  • +
    +
    + +
    +
    + +
    +
    +
  • + {% else %} + + {% endif %} - ' - )|raw }} -
    + {% if export_type == 'server' or export_type == 'database' %} +
  • +
    + + +
    +
  • + {% endif %} + + + -
    -

    {% trans 'Format-specific options:' %}

    -

    - {% trans 'Scroll down to fill in the options for the selected format and ignore the options for other formats.' %} -

    - {{ options|raw }} -
    - - {% if can_convert_kanji %} - {# Japanese encoding setting #} -
    -

    {% trans 'Encoding Conversion:' %}

    - {% include 'encoding/kanji_encoding_form.twig' %} +
  • + + +
    {% trans 'The size is measured in MiB.' %}
    +
  • +
    - {% endif %} -
    - -
    - +
    +
    {% trans 'Format-specific options:' %}
    +
    + {{ options|raw }} +
    +
    + + {% if can_convert_kanji %} + {# Japanese encoding setting #} +
    +
    {% trans 'Encoding Conversion:' %}
    +
    + {% include 'encoding/kanji_encoding_form.twig' %} +
    +
    + {% endif %} + +
    + +
    + + diff --git a/templates/import.twig b/templates/import.twig index 87671a8526..3832620940 100644 --- a/templates/import.twig +++ b/templates/import.twig @@ -1,231 +1,203 @@ -{{ page_settings_error_html|raw }} -{{ page_settings_html|raw }} +
    +

    + {{ get_image('b_import', 'Import'|trans) }} + {% block title %}{% endblock %} +

    - -
    -
    + {{ page_settings_error_html|raw }} + {{ page_settings_html|raw }} + + +
    +
    ajax clock -
    + + {{ get_hidden_inputs(hidden_inputs) }} - {{ get_hidden_inputs(hidden_inputs) }} +
    +
    {% trans 'File to import:' %}
    +
    + {# We don't have show anything about compression, when no supported #} + {% if compressions is not empty %} +

    + {{ 'File may be compressed (%s) or uncompressed.'|trans|format(compressions|join(', ')) }}
    + {% trans 'A compressed file\'s name must end in .[format].[compression]. Example: .sql.zip' %} +

    + {% endif %} - - -
    -

    {% trans 'File to import:' %}

    - - {# We don't have show anything about compression, when no supported #} - {% if compressions is not empty %} -
    -

    - {{ 'File may be compressed (%s) or uncompressed.'|trans|format(compressions|join(', ')) }} -
    - {% trans 'A compressed file\'s name must end in .[format].[compression]. Example: .sql.zip' %} -

    + {% if is_upload and upload_dir is not empty %} + {% set use_local_file_import = timeout_passed_global is not empty and local_import_file is not empty %} + +
    +
    + +
    + +
    - {% endif %} +
    +
    +

    {% trans 'You may also drag and drop a file on any page.' %}

    +
    -
    - {% if is_upload and upload_dir is not empty %} -
      -
    • - - - -
      -
      - - - - {{ get_formatted_maximum_upload_size(max_upload_size) }} - - - -

      {% trans 'You may also drag and drop a file on any page.' %}

      -
    • -
    • - - - - {% if local_files is same as(false) %} - {{ 'The directory you set for upload work cannot be reached.'|trans|error }} - {% elseif local_files is not empty %} - - {% else %} - {% trans 'There are no files to upload!' %} - {% endif %} -
    • -
    - {% elseif is_upload %} - - -
    -
    - - - - {{ get_formatted_maximum_upload_size(max_upload_size) }} - - - -

    {% trans 'You may also drag and drop a file on any page.' %}

    - {% elseif upload_dir is not empty %} - - - {% if local_files is same as(false) %} - {{ 'The directory you set for upload work cannot be reached.'|trans|error }} - {% elseif local_files is not empty %} - - {% else %} - {% trans 'There are no files to upload!' %} - {% endif %} - {% else %} - {{ 'File uploads are not allowed on this server.'|trans|notice }} - {% endif %} -
    - -
    - {# Charset of file #} - - {% if is_encoding_supported %} - - {% else %} - - {% for charset in charsets %} - - {% endfor %} + {{ local_files|raw }} + {% else %} + {% endif %} +
    -
    - -
    -

    {% trans 'Partial import:' %}

    - - {% if timeout_passed is defined and timeout_passed %} -
    - - {{ 'Previous import timed out, after resubmitting will continue from position %d.'|trans|format(offset) }} -
    - {% endif %} - -
    - - + {% elseif is_upload %} + +
    + +
    - - {% if not (timeout_passed is defined and timeout_passed) %} -
    - - -
    +
    +
    +

    {% trans 'You may also drag and drop a file on any page.' %}

    + {% elseif upload_dir is not empty %} + {% if local_files is same as(false) %} + {{ 'The directory you set for upload work cannot be reached.'|trans|error }} + {% elseif local_files is not empty %} +
    + + +
    {% else %} - {# If timeout has passed, - do not show the Skip dialog to avoid the risk of someone - entering a value here that would interfere with "skip" #} - + {% endif %} -
    + {% else %} + {{ 'File uploads are not allowed on this server.'|trans|notice }} + {% endif %} -
    -

    {% trans 'Other options:' %}

    -
    - - - -
    -
    - -
    -

    {% trans 'Format:' %}

    - + {% for charset in encodings %} + {% endfor %} - - {% for option in plugins_choice %} - - {% endfor %} - -
    + {% else %} + + {% endif %}
    +
    -
    -

    {% trans 'Format-specific options:' %}

    -

    - {% trans 'Scroll down to fill in the options for the selected format and ignore the options for other formats.' %} -

    - {{ options|raw }} -
    -
    - - {# Japanese encoding setting #} - {% if can_convert_kanji %} -
    -

    {% trans 'Encoding Conversion:' %}

    - {% include 'encoding/kanji_encoding_form.twig' %} +
    +
    {% trans 'Partial import:' %}
    +
    + {% if timeout_passed is defined and timeout_passed %} + + - {% endif %} + {% endif %} -
    - +
    + + +
    {% trans 'This might be a good way to import large files, however it can break transactions.' %}
    +
    + + {% if not (timeout_passed is defined and timeout_passed) %} + + + {% else %} + {# If timeout has passed, do not show the Skip dialog to avoid the risk of someone entering a value here that would interfere with "skip" #} + + {% endif %}
    +
    + +
    +
    {% trans 'Other options' %}
    +
    + +
    + + +
    +
    +
    + +
    +
    {% trans 'Format' %}
    +
    + + + {% for option in plugins_choice %} + + {% endfor %} + +
    +
    +
    + +
    +
    {% trans 'Format-specific options:' %}
    +
    + {{ options|raw }} +
    +
    + + {# Japanese encoding setting #} + {% if can_convert_kanji %} +
    +
    {% trans 'Encoding Conversion:' %}
    +
    + {% include 'encoding/kanji_encoding_form.twig' %} +
    +
    + {% endif %} + +
    + +
    +
    diff --git a/templates/server/export/index.twig b/templates/server/export/index.twig index aafc473c09..9db4ef7310 100644 --- a/templates/server/export/index.twig +++ b/templates/server/export/index.twig @@ -3,21 +3,15 @@ {% block title %}{% trans 'Exporting databases from the current server' %}{% endblock %} {% block selection_options %} -
    -

    {% trans 'Databases:' %}

    +
    +
    {% trans 'Databases' %}
    +
    +
    + + +
    -
    -

    - - {% trans 'Select all' %} - - / - - {% trans 'Unselect all' %} - -

    - - {% for database in databases %} ', $result); $this->assertStringContainsString('', $result); // paper size - $this->assertStringContainsString('', + $result + ); $this->assertStringContainsString('', $result); - $this->assertStringContainsString('', $result); + $this->assertStringContainsString('', $result); } } diff --git a/test/selenium/ExportTest.php b/test/selenium/ExportTest.php index 11ee724118..4c841e9f4f 100644 --- a/test/selenium/ExportTest.php +++ b/test/selenium/ExportTest.php @@ -141,7 +141,7 @@ class ExportTest extends TestBase $this->scrollIntoView('databases_and_tables', 200); sleep(1); $this->scrollIntoView('databases_and_tables', 200); - $this->byPartialLinkText('Unselect all')->click(); + $this->byId('db_unselect_all')->click(); $this->byCssSelector('option[value="' . $this->databaseName . '"]')->click(); } diff --git a/test/selenium/ImportTest.php b/test/selenium/ImportTest.php index 91b0618252..c521b24a44 100644 --- a/test/selenium/ImportTest.php +++ b/test/selenium/ImportTest.php @@ -101,7 +101,7 @@ class ImportTest extends TestBase $this->waitAjax(); $this->waitForElement('id', 'input_import_file'); - $this->waitForElement('cssSelector', 'label[for=radio_local_import_file]')->click(); + $this->waitForElement('id', 'localFileTab')->click(); $this->selectByValue( $this->byName('local_import_file'), @@ -119,6 +119,9 @@ class ImportTest extends TestBase $this->scrollToBottom(); $this->waitUntilElementIsVisible('id', 'buttonGo', 30); + $this->scrollToBottom(); + sleep(1); + $this->scrollToBottom(); $this->byId('buttonGo')->click(); sleep(2); $this->waitUntilElementIsVisible( diff --git a/themes/bootstrap/scss/_common.scss b/themes/bootstrap/scss/_common.scss index 9b0488750e..d28812ec7b 100644 --- a/themes/bootstrap/scss/_common.scss +++ b/themes/bootstrap/scss/_common.scss @@ -831,15 +831,6 @@ textarea { float: left; } -label.desc { - width: 30em; - float: left; - - sup { - position: absolute; - } -} - code { font-size: 1em; @@ -1007,164 +998,6 @@ select.invalid_value, width: 100%; } -/** - * Export and Import styles - */ - -.export_table_list_container { - display: inline-block; - max-height: 20em; - overflow-y: scroll; -} - -.export_table_select { - th { - text-align: center; - vertical-align: middle; - } - - .all { - font-weight: bold; - border-bottom: 1px solid black; - } -} - -.export_structure, -.export_data { - text-align: center; -} - -.export_table_name { - vertical-align: middle; -} - -.exportoptions { - h2 { - word-wrap: break-word; - } - - h3 { - border-bottom: 1px #999 solid; - font-size: 110%; - } -} - -.importoptions h3 { - border-bottom: 1px #999 solid; - font-size: 110%; -} - -.exportoptions ul, -.importoptions ul, -.format_specific_options ul { - list-style-type: none; - margin-bottom: 15px; -} - -.exportoptions li, -.importoptions li { - margin: 7px; -} - -.exportoptions label, -.importoptions label, -.exportoptions p, -.importoptions p { - margin: 5px; - float: none; -} - -#csv_options label.desc, -#ldi_options label.desc, -#latex_options label.desc, -#output label.desc { - float: left; - width: 15em; -} - -.exportoptions, -.importoptions { - margin: 20px 30px 30px; - margin-left: 10px; - - #buttonGo { - float: right; - } -} - -.format_specific_options { - border: 1px solid #999; - margin: 7px 0; - padding: 3px; - - h3 { - margin: 10px 0 0; - margin-left: 10px; - border: 0; - } -} - -p.desc { - margin: 5px; -} - -/** - * Export styles only - */ -select { - &#db_select, - &#table_select { - width: 400px; - } -} - -.export_sub_options { - margin: 20px 0 0; - margin-left: 30px; - - h4 { - border-bottom: 1px #999 solid; - } - - li { - margin-bottom: 0; - - &.subgroup { - display: inline-block; - margin-top: 0; - } - } -} - -#export_refresh_form { - margin-left: 20px; -} - -#export_back_button { - display: inline; -} - -#output_quick_export { - display: none; -} - -/** - * Import styles only - */ - -.importoptions #import_notification { - margin: 10px 0; - font-style: italic; -} - -input#input_import_file { - margin: 5px; -} - -.formelementrow { - margin: 5px 0 5px 0; -} - #popup_background { display: none; position: fixed; diff --git a/themes/metro/scss/_common.scss b/themes/metro/scss/_common.scss index e0d0ee5773..71ce1044b7 100644 --- a/themes/metro/scss/_common.scss +++ b/themes/metro/scss/_common.scss @@ -1025,15 +1025,6 @@ li { float: left; } -label.desc { - width: 30em; - float: left; - - sup { - position: absolute; - } -} - kbd { color: $main-color; background-color: transparent; @@ -1183,150 +1174,6 @@ input { width: 100%; } -/** - * Export and Import styles - */ - -.export_table_list_container { - display: inline-block; - max-height: 20em; - overflow-y: scroll; -} - -.export_table_select { - th { - text-align: center; - vertical-align: middle; - } - - .all { - font-weight: bold; - border-bottom: 1px solid black; - } -} - -.export_structure, -.export_data { - text-align: center; -} - -.export_table_name { - vertical-align: middle; -} - -.exportoptions h3, -.importoptions h3 { - border-bottom: 1px #ccc solid; - font-size: 110%; -} - -.exportoptions ul, -.importoptions ul, -.format_specific_options ul { - list-style-type: none; - margin-bottom: 15px; -} - -.exportoptions li, -.importoptions li { - margin: 7px; -} - -.exportoptions label, -.importoptions label, -.exportoptions p, -.importoptions p { - margin: 5px; - float: none; -} - -#csv_options label.desc, -#ldi_options label.desc, -#latex_options label.desc, -#output label.desc { - float: left; - width: 15em; -} - -.exportoptions, -.importoptions { - margin: 20px 30px 30px; - margin-left: 10px; -} - -.exportoptions #buttonGo, -.importoptions #buttonGo { - padding: 5px 12px; - text-decoration: none; - cursor: pointer; - margin: 0; -} - -.format_specific_options { - border: 1px solid #999; - margin: 7px 0; - padding: 3px; - - h3 { - margin: 10px 0 0; - margin-left: 10px; - border: 0; - } -} - -p.desc { - margin: 5px; -} - -/** - * Export styles only - */ -select { - &#db_select, - &#table_select { - width: 400px; - } -} - -.export_sub_options { - margin: 20px 0 0; - margin-left: 30px; - - h4 { - border-bottom: 1px #999 solid; - } - - li { - margin-bottom: 0; - - &.subgroup { - display: inline-block; - margin-top: 0; - } - } -} - -#output_quick_export { - display: none; -} - -/** - * Import styles only - */ - -.importoptions #import_notification { - margin: 10px 0; - font-style: italic; -} - -input#input_import_file { - margin: 5px; -} - -.formelementrow { - margin: 5px 0 5px 0; -} - #popup_background { display: none; position: fixed; diff --git a/themes/original/scss/_common.scss b/themes/original/scss/_common.scss index 69b15e26a3..a7d3c37a08 100644 --- a/themes/original/scss/_common.scss +++ b/themes/original/scss/_common.scss @@ -813,15 +813,6 @@ textarea { float: left; } -label.desc { - width: 30em; - float: left; - - sup { - position: absolute; - } -} - kbd { color: $main-color; background-color: transparent; @@ -1000,150 +991,6 @@ select.invalid_value, width: 100%; } -/** - * Export and Import styles - */ - -.export_table_list_container { - display: inline-block; - max-height: 20em; - overflow-y: scroll; -} - -.export_table_select { - th { - text-align: center; - vertical-align: middle; - } - - .all { - font-weight: bold; - border-bottom: 1px solid black; - } -} - -.export_structure, -.export_data { - text-align: center; -} - -.export_table_name { - vertical-align: middle; -} - -.exportoptions { - h2 { - word-wrap: break-word; - } - - h3 { - border-bottom: 1px #999 solid; - font-size: 110%; - } -} - -.importoptions h3 { - border-bottom: 1px #999 solid; - font-size: 110%; -} - -.exportoptions ul, -.importoptions ul, -.format_specific_options ul { - list-style-type: none; - margin-bottom: 15px; -} - -.exportoptions li, -.importoptions li { - margin: 7px; -} - -.exportoptions label, -.importoptions label, -.exportoptions p, -.importoptions p { - margin: 5px; - float: none; -} - -#csv_options label.desc, -#ldi_options label.desc, -#latex_options label.desc, -#output label.desc { - float: left; - width: 15em; -} - -.exportoptions, -.importoptions { - margin: 20px 30px 30px 10px; -} - -.format_specific_options { - border: 1px solid #999; - margin: 7px 0; - padding: 3px; - - h3 { - margin: 10px 0 0 10px; - border: 0; - } -} - -p.desc { - margin: 5px; -} - -/** - * Export styles only - */ - -select { - &#db_select, - &#table_select { - width: 400px; - } -} - -.export_sub_options { - margin: 20px 0 0 30px; - - h4 { - border-bottom: 1px #999 solid; - } - - li { - margin-bottom: 0; - - &.subgroup { - display: inline-block; - margin-top: 0; - } - } -} - -#output_quick_export { - display: none; -} - -/** - * Import styles only - */ - -.importoptions #import_notification { - margin: 10px 0; - font-style: italic; -} - -input#input_import_file { - margin: 5px; -} - -.formelementrow { - margin: 5px 0 5px 0; -} - #popup_background { display: none; position: fixed; diff --git a/themes/pmahomme/scss/_common.scss b/themes/pmahomme/scss/_common.scss index d891b15f8a..c54430153a 100644 --- a/themes/pmahomme/scss/_common.scss +++ b/themes/pmahomme/scss/_common.scss @@ -1008,15 +1008,6 @@ textarea { float: left; } -label.desc { - width: 30em; - float: left; - - sup { - position: absolute; - } -} - kbd { color: $main-color; background-color: transparent; @@ -1189,168 +1180,10 @@ select.invalid_value, width: 100%; } -/** - * Export and Import styles - */ - -.export_table_list_container { - display: inline-block; - max-height: 20em; - overflow-y: scroll; -} - -.export_table_select { - th { - text-align: center; - vertical-align: middle; - } - - .all { - font-weight: bold; - border-bottom: 1px solid black; - } -} - -.export_structure, -.export_data { - text-align: center; -} - -.export_table_name { - vertical-align: middle; -} - -.exportoptions { - h2 { - word-wrap: break-word; - } - - h3 { - border-bottom: 1px #999 solid; - font-size: 110%; - } -} - -.importoptions h3 { - border-bottom: 1px #999 solid; - font-size: 110%; -} - -.exportoptions ul, -.importoptions ul, -.format_specific_options ul { - list-style-type: none; - margin-bottom: 15px; -} - -.exportoptions li, -.importoptions li { - margin: 7px; -} - -.exportoptions label, -.importoptions label, -.exportoptions p, -.importoptions p { - margin: 5px; - float: none; -} - -#csv_options label.desc, -#ldi_options label.desc, -#latex_options label.desc, -#output label.desc { - float: left; - width: 15em; -} - -.exportoptions, -.importoptions { - margin: 20px 30px 30px; - margin-left: 10px; - - #buttonGo { - float: right; - } -} - -.format_specific_options { - border: 1px solid #999; - margin: 7px 0; - padding: 3px; - - h3 { - margin: 10px 0 0; - margin-left: 10px; - border: 0; - } -} - -p.desc { - margin: 5px; -} - -/** - * Export styles only - */ -select { - &#db_select, - &#table_select { - width: 400px; - } -} - -.export_sub_options { - margin: 20px 0 0; - margin-left: 30px; - - h4 { - border-bottom: 1px #999 solid; - } - - li { - margin-bottom: 0; - - &.subgroup { - display: inline-block; - margin-top: 0; - } - } -} - -#export_refresh_form { - margin-left: 20px; -} - -#export_back_button { - display: inline; -} - -#output_quick_export { - display: none; -} - -/** - * Import styles only - */ - -.importoptions #import_notification { - margin: 10px 0; - font-style: italic; -} - -input#input_import_file { - margin: 5px; -} - input#import_merge { margin: 0; } -.formelementrow { - margin: 5px 0 5px 0; -} - #popup_background { display: none; position: fixed;