Remove printview.css theme files

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2021-10-31 17:35:55 -03:00
parent 78104be8fb
commit 220ed30ef8
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
39 changed files with 419 additions and 614 deletions

View File

@ -378,7 +378,7 @@ var AJAX = {
msg = data.errSubmitMsg;
}
if (data.errors) {
$('<div></div>', { id : 'pma_errors', class : 'clearfloat' })
$('<div></div>', { id : 'pma_errors', class : 'clearfloat d-print-none' })
.insertAfter('#selflink')
.append(data.errors);
// bind for php error reporting forms (bottom)
@ -553,7 +553,7 @@ var AJAX = {
msg = data.errSubmitMsg;
}
if (data.errors) {
$('<div></div>', { id : 'pma_errors', class : 'clearfloat' })
$('<div></div>', { id : 'pma_errors', class : 'clearfloat d-print-none' })
.insertAfter('#selflink')
.append(data.errors);
// bind for php error reporting forms (bottom)

View File

@ -27,7 +27,6 @@ AJAX.registerTeardown('database/structure.js', function () {
$(document).off('click', 'a.drop_table_anchor.ajax');
$(document).off('click', '#real_end_input');
$(document).off('click', 'a.favorite_table_anchor.ajax');
$(document).off('click', '#printView');
$('a.real_row_count').off('click');
$('a.row_count_sum').off('click');
$('select[name=submit_mult]').off('change');
@ -399,16 +398,6 @@ AJAX.registerOnload('database/structure.js', function () {
}, Functions.loadForeignKeyCheckbox);
}); // end of Drop Table Ajax action
/**
* Attach Event Handler for 'Print' link
*/
$(document).on('click', '#printView', function (event) {
event.preventDefault();
// Take to preview mode
Functions.printPreview();
}); // end of Print View action
// Calculate Real End for InnoDB
/**
* Ajax Event handler for calculating the real end for a InnoDB table

View File

@ -3924,11 +3924,6 @@ Functions.getCellValue = function (td) {
}
};
$(window).on('popstate', function () {
$('#printcss').attr('media','print');
return true;
});
/**
* Unbind all event handlers before tearing down a page
*/
@ -3946,49 +3941,10 @@ AJAX.registerOnload('functions.js', function () {
});
/**
* Produce print preview
* @implements EventListener
*/
Functions.printPreview = function () {
$('#printcss').attr('media','all');
Functions.createPrintAndBackButtons();
};
/**
* Create print and back buttons in preview page
*/
Functions.createPrintAndBackButtons = function () {
var backButton = $('<input>',{
type: 'button',
value: Messages.back,
class: 'btn btn-secondary',
id: 'back_button_print_view'
});
backButton.on('click', Functions.removePrintAndBackButton);
backButton.appendTo('#page_content');
var printButton = $('<input>',{
type: 'button',
value: Messages.print,
class: 'btn btn-primary',
id: 'print_button_print_view'
});
printButton.on('click', Functions.printPage);
printButton.appendTo('#page_content');
};
/**
* Remove print and back buttons and revert to normal view
*/
Functions.removePrintAndBackButton = function () {
$('#printcss').attr('media','print');
$('#back_button_print_view').remove();
$('#print_button_print_view').remove();
};
/**
* Print page
*/
Functions.printPage = function () {
if (typeof(window.print) !== 'undefined') {
const PrintPage = {
handleEvent: () => {
window.print();
}
};
@ -3997,14 +3953,20 @@ Functions.printPage = function () {
* Unbind all event handlers before tearing down a page
*/
AJAX.registerTeardown('functions.js', function () {
$('input#print').off('click');
document.querySelectorAll('.jsPrintButton').forEach(item => {
item.removeEventListener('click', PrintPage);
});
$(document).off('click', 'a.create_view.ajax');
$(document).off('keydown', '#createViewModal input, #createViewModal select');
$(document).off('change', '#fkc_checkbox');
});
AJAX.registerOnload('functions.js', function () {
$('input#print').on('click', Functions.printPage);
document.querySelectorAll('.jsPrintButton').forEach(item => {
item.addEventListener('click', PrintPage);
});
$('.logout').on('click', function () {
var form = $(
'<form method="POST" action="' + $(this).attr('href') + '" class="disableAjax">' +

View File

@ -1786,7 +1786,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid
});
// attach to first row first col of the grid
var thFirst = $(g.t).find('th.print_ignore');
var thFirst = $(g.t).find('th.d-print-none');
$(thFirst).append(g.cDrop);
$(thFirst).append(g.cList);

View File

@ -203,7 +203,6 @@ AJAX.registerTeardown('sql.js', function () {
$(document).off('click', 'th.column_heading.marker');
$(document).off('scroll', window);
$(document).off('keyup', '.filter_rows');
$(document).off('click', '#printView');
if (codeMirrorEditor) {
codeMirrorEditor.off('change');
} else {
@ -398,16 +397,6 @@ AJAX.registerOnload('sql.js', function () {
document.body.removeChild(textArea);
}); // end of Copy to Clipboard action
/**
* Attach Event Handler for 'Print' link
*/
$(document).on('click', '#printView', function (event) {
event.preventDefault();
// Take to preview mode
Functions.printPreview();
}); // end of 'Print' action
/**
* Attach the {@link makegrid} function to a custom event, which will be
* triggered manually everytime the table of results is reloaded

View File

@ -49,7 +49,6 @@ AJAX.registerTeardown('table/structure.js', function () {
$(document).off('click', 'a.drop_column_anchor.ajax');
$(document).off('click', 'a.add_key.ajax');
$(document).off('click', '#move_columns_anchor');
$(document).off('click', '#printView');
$(document).off('submit', '.append_fields_form.ajax');
$('body').off('click', '#fieldsForm.ajax button');
$(document).off('click', 'a[id^=partition_action].ajax');
@ -243,16 +242,6 @@ AJAX.registerOnload('table/structure.js', function () {
});
}); // end of Drop Column Anchor action
/**
* Attach Event Handler for 'Print' link
*/
$(document).on('click', '#printView', function (event) {
event.preventDefault();
// Take to preview mode
Functions.printPreview();
}); // end of Print View action
/**
* Ajax Event handler for adding keys
*/

View File

@ -1067,7 +1067,7 @@ class Config
{
$retval = '';
if (@file_exists($filename)) {
$retval .= '<div id="' . $id . '">';
$retval .= '<div id="' . $id . '" class="d-print-none">';
ob_start();
include $filename;
$retval .= ob_get_clean();

View File

@ -578,10 +578,6 @@ final class JavaScriptMessagesController
'dropImportDropFiles' => __('Drop files here'),
'dropImportSelectDB' => __('Select database first'),
/* For Print view */
'print' => __('Print'),
'back' => __('Back'),
// this approach does not work when the parameter is changed via user prefs
'strGridEditFeatureHint' => $cfg['GridEditing'] === 'double-click'
? __('You can also edit most values<br>by double-clicking directly on them.')

View File

@ -1360,7 +1360,7 @@ class Results
$displayParams['emptypre'] = $emptyPreCondition ? 4 : 0;
$buttonHtml .= '<th class="column_action sticky print_ignore" ' . $colspan
$buttonHtml .= '<th class="column_action sticky d-print-none" ' . $colspan
. '>' . $fullOrPartialTextLink . '</th>';
} elseif (
$leftOrBoth
@ -2106,7 +2106,7 @@ class Results
&& ($displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE) ? 4 : 1;
$rightColumnHtml .= "\n"
. '<th class="column_action print_ignore" ' . $colspan . '>'
. '<th class="column_action d-print-none" ' . $colspan . '>'
. $fullOrPartialTextLink
. '</th>';
} elseif (
@ -2122,7 +2122,7 @@ class Results
$displayParams['emptyafter'] = ($displayParts['edit_lnk'] != self::NO_EDIT_OR_DELETE)
&& ($displayParts['del_lnk'] != self::NO_EDIT_OR_DELETE) ? 4 : 1;
$rightColumnHtml .= "\n" . '<td class="print_ignore" ' . $colspan
$rightColumnHtml .= "\n" . '<td class="d-print-none" ' . $colspan
. '></td>';
}

View File

@ -721,7 +721,7 @@ class Generator
$retval .= $queryBase;
$retval .= '</div>';
$retval .= '<div class="tools print_ignore">';
$retval .= '<div class="tools d-print-none">';
$retval .= '<form action="' . Url::getFromRoute('/sql') . '" method="post">';
$retval .= Url::getHiddenInputs($GLOBALS['db'], $GLOBALS['table']);
$retval .= '<input type="hidden" name="sql_query" value="'

View File

@ -1,4 +1,4 @@
<div id="pma_console_container">
<div id="pma_console_container" class="d-print-none">
<div id="pma_console">
{# Console toolbar #}
{% include 'console/toolbar.twig' with {

View File

@ -5,7 +5,7 @@
{% endif %}
<p class="d-print-none">
<input type="button" class="btn btn-secondary button" id="print" value="{% trans 'Print' %}">
<button type="button" class="btn btn-secondary jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
</p>
<div>
@ -121,6 +121,6 @@
</div>
<p class="d-print-none">
<input type="button" class="btn btn-secondary button" id="print" value="{% trans 'Print' %}">
<button type="button" class="btn btn-secondary jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
</p>
</div>

View File

@ -1,4 +1,4 @@
<div class="clearfloat print_ignore">
<div class="clearfloat d-print-none">
<img class="selectallarrow" src="{{ image('arrow_' ~ text_dir ~ '.png') }}" width="38" height="22" alt="{% trans 'With selected:' %}">
<input type="checkbox" id="tablesForm_checkall" class="checkall_box" title="{% trans 'Check all' %}">
<label for="tablesForm_checkall">{% trans 'Check all' %}</label>

View File

@ -15,10 +15,8 @@
{{ list_navigator_html|raw }}
</div>
<hr>
<p class="print_ignore">
<a href="#" id="printView">
{{ get_icon('b_print', 'Print'|trans, true) }}
</a>
<p class="d-print-none">
<button type="button" class="btn btn-link p-0 jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
<a href="{{ url('/database/data-dictionary', {'db': database, 'goto': url('/database/structure')}) }}">
{{ get_icon('b_tblanalyse', 'Data dictionary'|trans, true) }}
</a>

View File

@ -1,6 +1,6 @@
{% if position == 'left' %}
{% if has_checkbox %}
<td class="text-center print_ignore">
<td class="text-center d-print-none">
<input type="checkbox" class="multi_checkbox checkall" id="id_rows_to_delete
{{- row_number }}_left" name="rows_to_delete[{{ row_number }}]" value="{{ where_clause }}">
<input type="hidden" class="condition_array" value="{{ condition }}">
@ -8,7 +8,7 @@
{% endif %}
{% if edit.url is not empty %}
<td class="text-center print_ignore edit_row_anchor{{ not edit.clause_is_unique ? ' nonunique' }}">
<td class="text-center d-print-none edit_row_anchor{{ not edit.clause_is_unique ? ' nonunique' }}">
<span class="text-nowrap">
{{ link_or_button(edit.url, edit.string) }}
{% if where_clause is not empty %}
@ -19,7 +19,7 @@
{% endif %}
{% if copy.url is not empty %}
<td class="text-center print_ignore">
<td class="text-center d-print-none">
<span class="text-nowrap">
{{ link_or_button(copy.url, copy.string) }}
{% if where_clause is not empty %}
@ -30,7 +30,7 @@
{% endif %}
{% if delete.url is not empty %}
<td class="text-center print_ignore{{ is_ajax ? ' ajax' }}">
<td class="text-center d-print-none{{ is_ajax ? ' ajax' }}">
<span class="text-nowrap">
{{ link_or_button(delete.url, delete.string, {'class': 'delete_row requireConfirm' ~ (is_ajax ? ' ajax') }) }}
{% if js_conf is not empty %}
@ -41,7 +41,7 @@
{% endif %}
{% elseif position == 'right' %}
{% if delete.url is not empty %}
<td class="text-center print_ignore{{ is_ajax ? ' ajax' }}">
<td class="text-center d-print-none{{ is_ajax ? ' ajax' }}">
<span class="text-nowrap">
{{ link_or_button(delete.url, delete.string, {'class': 'delete_row requireConfirm' ~ (is_ajax ? ' ajax') }) }}
{% if js_conf is not empty %}
@ -52,7 +52,7 @@
{% endif %}
{% if copy.url is not empty %}
<td class="text-center print_ignore">
<td class="text-center d-print-none">
<span class="text-nowrap">
{{ link_or_button(copy.url, copy.string) }}
{% if where_clause is not empty %}
@ -63,7 +63,7 @@
{% endif %}
{% if edit.url is not empty %}
<td class="text-center print_ignore edit_row_anchor{{ not edit.clause_is_unique ? ' nonunique' }}">
<td class="text-center d-print-none edit_row_anchor{{ not edit.clause_is_unique ? ' nonunique' }}">
<span class="text-nowrap">
{{ link_or_button(edit.url, edit.string) }}
{% if where_clause is not empty %}
@ -74,7 +74,7 @@
{% endif %}
{% if has_checkbox %}
<td class="text-center print_ignore">
<td class="text-center d-print-none">
<input type="checkbox" class="multi_checkbox checkall" id="id_rows_to_delete
{{- row_number }}_right" name="rows_to_delete[{{ row_number }}]" value="{{ where_clause }}">
<input type="hidden" class="condition_array" value="{{ condition }}">
@ -82,7 +82,7 @@
{% endif %}
{% else %}
{% if has_checkbox %}
<td class="text-center print_ignore">
<td class="text-center d-print-none">
<input type="checkbox" class="multi_checkbox checkall" id="id_rows_to_delete
{{- row_number }}_left" name="rows_to_delete[{{ row_number }}]" value="{{ where_clause }}">
<input type="hidden" class="condition_array" value="{{ condition }}">

View File

@ -1,6 +1,6 @@
{% set navigation_html %}
{% if navigation is not empty %}
<table class="navigation print_ignore">
<table class="navigation d-print-none">
<tr>
<td class="navigation_separator"></td>
@ -65,7 +65,7 @@
</td>
<td class="largescreenonly">
{% if navigation.sort_by_key is not empty %}
<form action="{{ url('/sql') }}" method="post" class="print_ignore">
<form action="{{ url('/sql') }}" method="post" class="d-print-none">
{{ get_hidden_fields(navigation.sort_by_key.hidden_fields) }}
{% trans 'Sort by key:' %}
<select name="sql_query" class="autosubmit">
@ -104,7 +104,7 @@
{% endif %}
{% if headers.options is not empty %}
<form method="post" action="{{ url('/sql') }}" name="displayOptionsForm" class="ajax print_ignore">
<form method="post" action="{{ url('/sql') }}" name="displayOptionsForm" class="ajax d-print-none">
{{ get_hidden_inputs({
'db': db,
'table': table,
@ -218,7 +218,7 @@
</div>
{% if bulk_links is not empty %}
<div class="print_ignore">
<div class="d-print-none">
<img class="selectallarrow" src="{{ image('arrow_' ~ text_dir ~ '.png') }}" width="38" height="22" alt="{% trans 'With selected:' %}">
<input type="checkbox" id="resultsForm_{{ unique_id }}_checkall" class="checkall_box" title="{% trans 'Check all' %}">
<label for="resultsForm_{{ unique_id }}_checkall">{% trans 'Check all' %}</label>
@ -251,16 +251,11 @@
{{ navigation_html }}
{% if operations is not empty %}
<fieldset class="pma-fieldset print_ignore">
<fieldset class="pma-fieldset d-print-none">
<legend>{% trans 'Query results operations' %}</legend>
{% if operations.has_print_link %}
{{ link_or_button(
'#',
get_icon('b_print', 'Print'|trans, true),
{'id': 'printView', 'class': 'btn'},
'print_view'
) }}
<button type="button" class="btn btn-link jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
{{ link_or_button(
'#',

View File

@ -3,7 +3,7 @@
{% endif %}
{% if not is_ajax and not is_minimal %}
{% if self_url is not empty %}
<div id="selflink" class="print_ignore">
<div id="selflink" class="d-print-none">
<a href="{{ self_url }}" title="{% trans 'Open new phpMyAdmin window' %}" target="_blank" rel="noopener noreferrer">
{% if show_icons('TabsMode') %}
{{ get_image('window-new', 'Open new phpMyAdmin window'|trans) }}
@ -14,14 +14,14 @@
</div>
{% endif %}
<div class="clearfloat" id="pma_errors">
<div class="clearfloat d-print-none" id="pma_errors">
{{ error_messages|raw }}
</div>
{{ scripts|raw }}
{% if is_demo %}
<div id="pma_demo">
<div id="pma_demo" class="d-print-none">
{% apply notice %}
<a href="{{ url('/') }}">{% trans 'phpMyAdmin Demo Server' %}:</a>
{% if git_revision_info is not empty %}

View File

@ -16,7 +16,6 @@
<link rel="stylesheet" type="text/css" href="{{ base_dir }}js/vendor/codemirror/addon/hint/show-hint.css?{{ version }}">
<link rel="stylesheet" type="text/css" href="{{ base_dir }}js/vendor/codemirror/addon/lint/lint.css?{{ version }}">
<link rel="stylesheet" type="text/css" href="{{ theme_path }}/css/theme{{ text_dir == 'rtl' ? '.rtl' }}.css?{{ version }}">
<link rel="stylesheet" type="text/css" href="{{ theme_path }}/css/printview.css?{{ version }}" media="print" id="printcss">
<title>{{ title }}</title>
{{ scripts|raw }}
<noscript><style>html{display:block}</style></noscript>
@ -38,7 +37,7 @@
{% if is_menu_enabled and server > 0 %}
{{ menu|raw }}
<span id="page_nav_icons">
<span id="page_nav_icons" class="d-print-none">
<span id="lock_page_icon"></span>
<span id="page_settings_icon">
{{ get_image('s_cog', 'Page-related settings'|trans) }}

View File

@ -12,7 +12,7 @@
<table class="table table-light table-striped table-hover table-sm w-auto align-middle" id="table_index">
<thead class="table-light">
<tr>
<th colspan="3" class="print_ignore">{% trans 'Action' %}</th>
<th colspan="3" class="d-print-none">{% trans 'Action' %}</th>
<th>{% trans 'Keyname' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans 'Unique' %}</th>
@ -29,17 +29,17 @@
<tbody class="row_span">
{% set columns_count = index.getColumnCount() %}
<tr class="noclick">
<td rowspan="{{ columns_count }}" class="edit_index print_ignore ajax">
<td rowspan="{{ columns_count }}" class="edit_index d-print-none ajax">
<a class="ajax" href="{{ url('/table/indexes') }}" data-post="{{ get_common(url_params|merge({'index': index.getName()}), '') }}">
{{ get_icon('b_edit', 'Edit'|trans) }}
</a>
</td>
<td rowspan="{{ columns_count }}" class="rename_index print_ignore ajax" >
<td rowspan="{{ columns_count }}" class="rename_index d-print-none ajax" >
<a class="ajax" href="{{ url('/table/indexes/rename') }}" data-post="{{ get_common(url_params|merge({'index': index.getName()}), '') }}">
{{ get_icon('b_rename', 'Rename'|trans) }}
</a>
</td>
<td rowspan="{{ columns_count }}" class="print_ignore">
<td rowspan="{{ columns_count }}" class="d-print-none">
{% if index.getName() == 'PRIMARY' %}
{% set index_params = {
'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' DROP PRIMARY KEY;',

View File

@ -1,4 +1,4 @@
<div id="floating_menubar"></div>
<div id="floating_menubar" class="d-print-none"></div>
<nav id="server-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-navbar">
<li class="breadcrumb-item">

View File

@ -1,5 +1,5 @@
{% if not is_ajax %}
<div id="pma_navigation" data-config-navigation-width="{{ config_navigation_width }}">
<div id="pma_navigation" class="d-print-none" data-config-navigation-width="{{ config_navigation_width }}">
<div id="pma_navigation_resizer"></div>
<div id="pma_navigation_collapser"></div>
<div id="pma_navigation_content">

View File

@ -1,4 +1,4 @@
<div id="prefs_autoload" class="alert alert-primary print_ignore hide" role="alert">
<div id="prefs_autoload" class="alert alert-primary d-print-none hide" role="alert">
<form action="{{ url('/preferences/manage') }}" method="post" class="disableAjax">
{{ hidden_inputs|raw }}
<input type="hidden" name="json" value="">

View File

@ -1,4 +1,4 @@
<form action="{{ url('/sql') }}" method="post" class="bookmarkQueryForm print_ignore"
<form action="{{ url('/sql') }}" method="post" class="bookmarkQueryForm d-print-none"
onsubmit="return ! Functions.emptyCheckTheField(this, 'bkm_fields[bkm_label]');">
{{ get_hidden_inputs() }}
<input type="hidden" name="db" value="{{ db }}">

View File

@ -5,7 +5,7 @@
{{ profiling_chart|raw }}
{% if not is_procedure %}
<fieldset class="pma-fieldset print_ignore">
<fieldset class="pma-fieldset d-print-none">
<legend>{% trans 'Query results operations' %}</legend>
<span>
{{ link_or_button(

View File

@ -186,7 +186,7 @@
</table>
{% endif %}
</fieldset>
<fieldset class="pma-fieldset tblFooters print_ignore">
<fieldset class="pma-fieldset tblFooters d-print-none">
<form action="{{ url('/table/structure/partitioning') }}" method="post">
{{ get_hidden_inputs(db, table) }}

View File

@ -17,7 +17,7 @@
{# Table header #}
<thead>
<tr>
<th class="print_ignore"></th>
<th class="d-print-none"></th>
<th>#</th>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Type' %}</th>
@ -32,7 +32,7 @@
{# @see table/structure.js, function moreOptsMenuResize() #}
{% if not db_is_system_schema and not tbl_is_view %}
<th colspan="{{ show_icons('ActionLinksMode') ? '8' : '9' -}}
" class="action print_ignore">{% trans 'Action' %}</th>
" class="action d-print-none">{% trans 'Action' %}</th>
{% endif %}
</tr>
</thead>
@ -49,7 +49,7 @@
{# Underline commented fields and display a hover-title (CSS only) #}
<tr>
<td class="text-center print_ignore">
<td class="text-center d-print-none">
<input type="checkbox" class="checkall" name="selected_fld[]" value="{{ row['Field'] }}" id="checkbox_row_{{ rownum }}">
</td>
<td class="text-end">{{ rownum }}</td>
@ -99,7 +99,7 @@
{% endif %}
<td class="text-nowrap">{{ row['Extra']|upper }}</td>
{% if not tbl_is_view and not db_is_system_schema %}
<td class="edit text-center print_ignore">
<td class="edit text-center d-print-none">
<a class="change_column_anchor ajax" href="{{ url('/table/structure/change', {
'db': db,
'table': table,
@ -109,7 +109,7 @@
{{ get_icon('b_edit', 'Change'|trans) }}
</a>
</td>
<td class="drop text-center print_ignore">
<td class="drop text-center d-print-none">
<a class="drop_column_anchor ajax" href="{{ url('/sql') }}" data-post="{{ get_common({
'db': db,
'table': table,
@ -125,7 +125,7 @@
{% if not tbl_is_view and not db_is_system_schema %}
{% set type = extracted_columnspec['print_type'] is not empty ? extracted_columnspec['print_type'] %}
<td class="print_ignore">
<td class="d-print-none">
<ul class="table-structure-actions resizable-menu">
{% if hide_structure_actions %}
<li class="submenu shown">
@ -137,7 +137,7 @@
{% if type == 'text' or type == 'blob' or tbl_storage_engine == 'ARCHIVE' or (primary and primary.hasColumn(field_name)) %}
{{ get_icon('bd_primary', 'Primary'|trans) }}
{% else %}
<a rel="samepage" class="ajax add_key print_ignore add_primary_key_anchor" href="{{ url('/table/structure/add-key') }}" data-post="{{ get_common({
<a rel="samepage" class="ajax add_key d-print-none add_primary_key_anchor" href="{{ url('/table/structure/add-key') }}" data-post="{{ get_common({
'db': db,
'table': table,
'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ (primary ? ' DROP PRIMARY KEY,') ~ ' ADD PRIMARY KEY(' ~ backquote(row['Field']) ~ ');',
@ -152,7 +152,7 @@
{% if type == 'text' or type == 'blob' or tbl_storage_engine == 'ARCHIVE' or field_name in columns_with_unique_index %}
{{ get_icon('bd_unique', 'Unique'|trans) }}
{% else %}
<a rel="samepage" class="ajax add_key print_ignore add_unique_anchor" href="{{ url('/table/structure/add-key') }}" data-post="{{ get_common({
<a rel="samepage" class="ajax add_key d-print-none add_unique_anchor" href="{{ url('/table/structure/add-key') }}" data-post="{{ get_common({
'db': db,
'table': table,
'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' ADD UNIQUE(' ~ backquote(row['Field']) ~ ');',
@ -167,7 +167,7 @@
{% if type == 'text' or type == 'blob' or tbl_storage_engine == 'ARCHIVE' %}
{{ get_icon('bd_index', 'Index'|trans) }}
{% else %}
<a rel="samepage" class="ajax add_key print_ignore add_index_anchor" href="{{ url('/table/structure/add-key') }}" data-post="{{ get_common({
<a rel="samepage" class="ajax add_key d-print-none add_index_anchor" href="{{ url('/table/structure/add-key') }}" data-post="{{ get_common({
'db': db,
'table': table,
'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' ADD INDEX(' ~ backquote(row['Field']) ~ ');',
@ -192,7 +192,7 @@
{% if type == 'text' or type == 'blob' or tbl_storage_engine == 'ARCHIVE' or (type not in spatial_types and (tbl_storage_engine == 'MYISAM' or mysql_int_version >= 50705)) %}
{{ get_icon('bd_spatial', 'Spatial'|trans) }}
{% else %}
<a rel="samepage" class="ajax add_key print_ignore add_spatial_anchor" href="{{ url('/table/structure/add-key') }}" data-post="{{ get_common({
<a rel="samepage" class="ajax add_key d-print-none add_spatial_anchor" href="{{ url('/table/structure/add-key') }}" data-post="{{ get_common({
'db': db,
'table': table,
'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' ADD SPATIAL(' ~ backquote(row['Field']) ~ ');',
@ -264,7 +264,7 @@
</tbody>
</table>
</div>
<div class="print_ignore">
<div class="d-print-none">
{% include 'select_all.twig' with {
'text_dir': text_dir,
'form_name': 'fieldsForm'
@ -311,7 +311,7 @@
{% endif %}
</div>
</form>
<hr class="print_ignore">
<hr class="d-print-none">
<div class="modal fade" id="moveColumnsModal" tabindex="-1" aria-labelledby="moveColumnsModalLabel" aria-hidden="true">
<div class="modal-dialog">
@ -357,14 +357,14 @@
</div>
{# Work on the table #}
<div id="structure-action-links">
<div id="structure-action-links" class="d-print-none">
{% if tbl_is_view and not db_is_system_schema %}
{{ link_or_button(
url('/view/create', {'db': db, 'table': table}),
get_icon('b_edit', 'Edit view'|trans, true)
) }}
{% endif %}
<a href="#" id="printView">{{ get_icon('b_print', 'Print'|trans, true) }}</a>
<button type="button" class="btn btn-link p-0 jsPrintButton">{{ get_icon('b_print', 'Print'|trans, true) }}</button>
{% if not tbl_is_view and not db_is_system_schema %}
{# Only display propose table structure for MySQL < 8.0 #}
{% if mysql_int_version < 80000 or is_mariadb %}
@ -403,7 +403,7 @@
{% endif %}
</div>
{% if not tbl_is_view and not db_is_system_schema %}
<form method="post" action="{{ url('/table/add-field') }}" id="addColumns" name="addColumns">
<form method="post" action="{{ url('/table/add-field') }}" id="addColumns" name="addColumns" class="d-print-none">
{{ get_hidden_inputs(db, table) }}
{% if show_icons('ActionLinksMode') %}
{{ get_image('b_insrow', 'Add column'|trans) }}&nbsp;
@ -445,7 +445,7 @@
<table class="table table-light table-striped table-hover table-sm w-auto align-middle" id="table_index">
<thead class="table-light">
<tr>
<th colspan="3" class="print_ignore">{% trans 'Action' %}</th>
<th colspan="3" class="d-print-none">{% trans 'Action' %}</th>
<th>{% trans 'Keyname' %}</th>
<th>{% trans 'Type' %}</th>
<th>{% trans 'Unique' %}</th>
@ -462,7 +462,7 @@
<tbody class="row_span">
{% set columns_count = index.getColumnCount() %}
<tr class="noclick">
<td rowspan="{{ columns_count }}" class="edit_index print_ignore ajax">
<td rowspan="{{ columns_count }}" class="edit_index d-print-none ajax">
<a class="ajax" href="{{ url('/table/indexes') }}" data-post="{{ get_common({
'db': db,
'table': table,
@ -471,7 +471,7 @@
{{ get_icon('b_edit', 'Edit'|trans) }}
</a>
</td>
<td rowspan="{{ columns_count }}" class="rename_index print_ignore ajax" >
<td rowspan="{{ columns_count }}" class="rename_index d-print-none ajax" >
<a class="ajax" href="{{ url('/table/indexes/rename') }}" data-post="{{ get_common({
'db': db,
'table': table,
@ -480,7 +480,7 @@
{{ get_icon('b_rename', 'Rename'|trans) }}
</a>
</td>
<td rowspan="{{ columns_count }}" class="print_ignore">
<td rowspan="{{ columns_count }}" class="d-print-none">
{% if index.getName() == 'PRIMARY' %}
{% set index_params = {
'sql_query': 'ALTER TABLE ' ~ backquote(table) ~ ' DROP PRIMARY KEY;',
@ -533,7 +533,7 @@
{% endif %}
</fieldset>
<fieldset class="pma-fieldset tblFooters print_ignore text-start">
<fieldset class="pma-fieldset tblFooters d-print-none text-start">
<form action="{{ url('/table/indexes') }}" method="post">
{{ get_hidden_inputs(db, table) }}
<input type="hidden" name="create_index" value="1">

View File

@ -57,7 +57,7 @@
or tbl_storage_engine == 'BDB')
or (tbl_storage_engine == 'INNODB' and innodb_file_per_table == true) %}
<tfoot class="table-light">
<tr class="print_ignore">
<tr class="d-print-none">
<th colspan="3" class="center">
<a href="{{ url('/sql') }}" data-post="{{ get_common({
'db': db,

View File

@ -1683,7 +1683,7 @@ class ResultsTest extends AbstractTestCase
'has_bulk_actions_form' => false,
'button' => '<thead class="table-light"><tr>' . "\n",
'table_headers_for_columns' => $tableHeadersForColumns,
'column_at_right_side' => "\n" . '<td class="print_ignore" ></td>',
'column_at_right_side' => "\n" . '<td class="d-print-none" ></td>',
],
'body' => '<tr ><td data-decimals="0" data-type="real" class="'
. 'text-end data not_null text-nowrap">1</td>' . "\n"

View File

@ -0,0 +1,104 @@
@media print {
.hide {
display: none;
}
// Standard CSS
body,
table,
th,
td {
color: #000;
background-color: #fff;
}
// To remove link text decoration
a:link {
color: #000;
text-decoration: none;
}
// To remove any image borders
img {
border: 0;
}
// Table specific
table,
th,
td {
border: 0.1em solid #000;
background-color: #fff;
}
table {
border-collapse: collapse;
border-spacing: 0.2em;
}
thead {
border-collapse: collapse;
border-spacing: 0.2em;
border: 0.1em solid #000;
font-weight: 900;
}
th,
td {
padding: 0.2em;
}
thead th {
font-weight: bold;
background-color: #e5e5e5;
border: 0.1em solid #000;
}
// Position the main content
#page_content {
position: absolute;
left: 0;
top: 0;
width: 95%;
float: none;
}
.sqlOuter {
color: black;
background-color: #000;
}
// For hiding 'Open a New phpMyAdmin Window' button
// Hide extra menu on /table/structure
.cDrop,
.cEdit,
.cList,
.cCpy,
.cPointer {
display: none;
}
table tbody:first-of-type tr {
// odd items 1,3,5,7...
&:nth-child(odd) {
background: #fff;
th {
background: #fff;
}
}
// even items 2,4,6,8...
&:nth-child(even) {
background: #dfdfdf;
th {
background: #dfdfdf;
}
}
}
.column_attribute {
font-size: 100%;
}
}

View File

@ -1,143 +0,0 @@
@media print {
#back_button_print_view,
#print_button_print_view {
display: none;
}
}
// For removing element from Print View
.print_ignore {
display: none;
}
.hide {
display: none;
}
// Standard CSS
body,
table,
th,
td {
color: #000;
background-color: #fff;
font-size: 12px;
}
// To remove link text decoration
a:link {
color: #000;
text-decoration: none;
}
// To remove any image borders
img {
border: 0;
}
// Table specific
table,
th,
td {
border: 0.1em solid #000;
background-color: #fff;
}
table {
border-collapse: collapse;
border-spacing: 0.2em;
}
thead {
border-collapse: collapse;
border-spacing: 0.2em;
border: 0.1em solid #000;
font-weight: 900;
}
th,
td {
padding: 0.2em;
}
thead th {
font-weight: bold;
background-color: #e5e5e5;
border: 0.1em solid #000;
}
// Common Elements not to be included
// Hide Navigation and Top Menu bar
// Hide console
// Hide Navigation items (like Goto Top)
// Hide the Page Settings Modal box
// Hide footer, Demo notice, errors div
// Hide the #selflink div
#pma_navigation,
#floating_menubar,
#pma_console_container,
#page_nav_icons,
#page_settings_modal,
#pma_footer,
#pma_demo,
#pma_errors,
#selflink {
display: none;
}
// Position the main content
#page_content {
position: absolute;
left: 0;
top: 0;
width: 95%;
float: none;
}
// Specific Class for overriding while Print
.print {
background-color: #000;
}
.sqlOuter {
color: black;
background-color: #000;
}
// For hiding 'Open a New phpMyAdmin Window' button
// Hide extra menu on /table/structure
.ic_window-new,
.ic_s_cog,
#structure-action-links,
#addColumns,
.cDrop,
.cEdit,
.cList,
.cCpy,
.cPointer {
display: none;
}
table tbody:first-of-type tr {
// odd items 1,3,5,7...
&:nth-child(odd) {
background: #fff;
th {
background: #fff;
}
}
// even items 2,4,6,8...
&:nth-child(even) {
background: #dfdfdf;
th {
background: #dfdfdf;
}
}
}
.column_attribute {
font-size: 100%;
}

View File

@ -12,3 +12,4 @@
@import "reboot";
@import "forms";
@import "breadcrumb";
@import "print";

View File

@ -0,0 +1,130 @@
@media print {
.hide {
display: none;
}
// Standard CSS
body,
table,
th,
td {
color: #000;
background-color: #fff;
font-size: 12px;
}
// To remove link text decoration
a:link {
color: #000;
text-decoration: none;
}
// To remove any image borders
img {
border: 0;
}
// Table specific
table,
th,
td {
border: 0.1em solid #000;
background-color: #fff;
}
table {
border-collapse: collapse;
border-spacing: 0.2em;
}
thead {
border-collapse: collapse;
border-spacing: 0.2em;
border: 0.1em solid #000;
font-weight: 900;
}
th,
td {
padding: 0.2em;
}
thead th {
font-weight: bold;
background-color: #e5e5e5;
border: 0.1em solid #000;
}
th {
&.column_heading,
&.column_action {
border: 0.1em solid #000;
}
}
table {
tr {
&.odd,
&.even {
border-left: 0.1em solid #000;
}
&.odd th,
&.even th {
border-bottom: 0.1em solid #000;
}
}
&.data th {
border-bottom: 0.1em solid #000;
}
}
// Position the main content
#page_content {
position: absolute;
left: 0;
top: 0;
width: 95%;
float: none;
}
// For the Success message div
.sqlOuter {
color: black;
}
// For hiding 'Open a New phpMyAdmin Window' button
// Hide extra menu on /table/structure
.cDrop,
.cEdit,
.cList,
.cCpy,
.cPointer {
display: none;
}
table tbody:first-of-type tr {
// odd items 1,3,5,7...
&:nth-child(odd) {
background: #fff;
th {
background: #fff;
}
}
// even items 2,4,6,8...
&:nth-child(even) {
background: #dfdfdf;
th {
background: #dfdfdf;
}
}
}
.column_attribute {
font-size: 100%;
}
}

View File

@ -1,168 +0,0 @@
@media print {
#back_button_print_view,
#print_button_print_view {
display: none;
}
}
// For removing element from Print View
.print_ignore {
display: none;
}
.hide {
display: none;
}
// Standard CSS
body,
table,
th,
td {
color: #000;
background-color: #fff;
font-size: 12px;
}
// To remove link text decoration
a:link {
color: #000;
text-decoration: none;
}
// To remove any image borders
img {
border: 0;
}
// Table specific
table,
th,
td {
border: 0.1em solid #000;
background-color: #fff;
}
table {
border-collapse: collapse;
border-spacing: 0.2em;
}
thead {
border-collapse: collapse;
border-spacing: 0.2em;
border: 0.1em solid #000;
font-weight: 900;
}
th,
td {
padding: 0.2em;
}
thead th {
font-weight: bold;
background-color: #e5e5e5;
border: 0.1em solid #000;
}
th {
&.column_heading,
&.column_action {
border: 0.1em solid #000;
}
}
table {
tr {
&.odd,
&.even {
border-left: 0.1em solid #000;
}
&.odd th,
&.even th {
border-bottom: 0.1em solid #000;
}
}
&.data th {
border-bottom: 0.1em solid #000;
}
}
// Common Elements not to be included
// Hide Navigation and Top Menu bar
// Hide console
// Hide Navigation items (like Goto Top)
// Hide the Page Settings Modal box
// Hide footer, Demo notice, errors div
// Hide the #selflink div
#pma_navigation,
#floating_menubar,
#pma_console_container,
#page_nav_icons,
#page_settings_modal,
#pma_footer,
#pma_demo,
#pma_errors,
#selflink {
display: none;
}
// Position the main content
#page_content {
position: absolute;
left: 0;
top: 0;
width: 95%;
float: none;
}
// Specific Class for overriding while Print
.print {
background-color: #000;
}
// For the Success message div
.sqlOuter {
color: black;
}
// For hiding 'Open a New phpMyAdmin Window' button
// Hide extra menu on /table/structure
.ic_window-new,
.ic_s_cog,
#structure-action-links,
#addColumns,
.cDrop,
.cEdit,
.cList,
.cCpy,
.cPointer {
display: none;
}
table tbody:first-of-type tr {
// odd items 1,3,5,7...
&:nth-child(odd) {
background: #fff;
th {
background: #fff;
}
}
// even items 2,4,6,8...
&:nth-child(even) {
background: #dfdfdf;
th {
background: #dfdfdf;
}
}
}
.column_attribute {
font-size: 100%;
}

View File

@ -20,3 +20,4 @@
@import "alert";
@import "list-group";
@import "modal";
@import "print";

View File

@ -1 +0,0 @@
@import "../../pmahomme/scss/printview";

View File

@ -19,3 +19,4 @@
@import "alert";
@import "list-group";
@import "modal";
@import "../../pmahomme/scss/print";

View File

@ -0,0 +1,105 @@
@media print {
.hide {
display: none;
}
// Standard CSS
body,
table,
th,
td {
color: #000;
background-color: #fff;
font-size: 12px;
}
// To remove link text decoration
a:link {
color: #000;
text-decoration: none;
}
// To remove any image borders
img {
border: 0;
}
// Table specific
table,
th,
td {
border: 0.1em solid #000;
background-color: #fff;
}
table {
border-collapse: collapse;
border-spacing: 0.2em;
}
thead {
border-collapse: collapse;
border-spacing: 0.2em;
border: 0.1em solid #000;
font-weight: 900;
}
th,
td {
padding: 0.2em;
}
thead th {
font-weight: bold;
background-color: #e5e5e5;
border: 0.1em solid #000;
}
// Position the main content
#page_content {
position: absolute;
left: 0;
top: 0;
width: 95%;
float: none;
}
.sqlOuter {
color: black;
background-color: #000;
}
// For hiding 'Open a New phpMyAdmin Window' button
// Hide extra menu on /table/structure
.cDrop,
.cEdit,
.cList,
.cCpy,
.cPointer {
display: none;
}
table tbody:first-of-type tr {
// odd items 1,3,5,7...
&:nth-child(odd) {
background: #fff;
th {
background: #fff;
}
}
// even items 2,4,6,8...
&:nth-child(even) {
background: #dfdfdf;
th {
background: #dfdfdf;
}
}
}
.column_attribute {
font-size: 100%;
}
}

View File

@ -1,143 +0,0 @@
@media print {
#back_button_print_view,
#print_button_print_view {
display: none;
}
}
// For removing element from Print View
.print_ignore {
display: none;
}
.hide {
display: none;
}
// Standard CSS
body,
table,
th,
td {
color: #000;
background-color: #fff;
font-size: 12px;
}
// To remove link text decoration
a:link {
color: #000;
text-decoration: none;
}
// To remove any image borders
img {
border: 0;
}
// Table specific
table,
th,
td {
border: 0.1em solid #000;
background-color: #fff;
}
table {
border-collapse: collapse;
border-spacing: 0.2em;
}
thead {
border-collapse: collapse;
border-spacing: 0.2em;
border: 0.1em solid #000;
font-weight: 900;
}
th,
td {
padding: 0.2em;
}
thead th {
font-weight: bold;
background-color: #e5e5e5;
border: 0.1em solid #000;
}
// Common Elements not to be included
// Hide Navigation and Top Menu bar
// Hide console
// Hide Navigation items (like Goto Top)
// Hide the Page Settings Modal box
// Hide footer, Demo notice, errors div
// Hide the #selflink div
#pma_navigation,
#floating_menubar,
#pma_console_container,
#page_nav_icons,
#page_settings_modal,
#pma_footer,
#pma_demo,
#pma_errors,
#selflink {
display: none;
}
// Position the main content
#page_content {
position: absolute;
left: 0;
top: 0;
width: 95%;
float: none;
}
// Specific Class for overriding while Print
.print {
background-color: #000;
}
.sqlOuter {
color: black;
background-color: #000;
}
// For hiding 'Open a New phpMyAdmin Window' button
// Hide extra menu on /table/structure
.ic_window-new,
.ic_s_cog,
#structure-action-links,
#addColumns,
.cDrop,
.cEdit,
.cList,
.cCpy,
.cPointer {
display: none;
}
table tbody:first-of-type tr {
// odd items 1,3,5,7...
&:nth-child(odd) {
background: #fff;
th {
background: #fff;
}
}
// even items 2,4,6,8...
&:nth-child(even) {
background: #dfdfdf;
th {
background: #dfdfdf;
}
}
}
.column_attribute {
font-size: 100%;
}

View File

@ -21,3 +21,4 @@
@import "alert";
@import "list-group";
@import "modal";
@import "print";