From b83d42efee489c6378be50457e56fb170de8585b Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 8 Apr 2013 11:57:07 +0000 Subject: [PATCH] Bug fix: allow printing lists fully expanded without the "pager" navigation. Also try to completely hide the main menu on the left when printing. SVN:trunk[2675] --- application/cmdbabstract.class.inc.php | 5 ++++- application/datatable.class.inc.php | 10 +++++++++- application/itopwebpage.class.inc.php | 2 +- css/light-grey.css | 3 --- css/print.css | 6 +++--- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 5b53cf018..9c653026e 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -800,7 +800,10 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay $iDefaultPageSize = appUserPreferences::GetPref('default_page_size', MetaModel::GetConfig()->GetMinDisplayLimit()); $oSettings->iDefaultPageSize = $iDefaultPageSize; } - + else + { + $oSettings->iDefaultPageSize = 0; + } $oSettings->aSortOrder = MetaModel::GetOrderByDefault($sClassName); return $oDataTable->Display($oPage, $oSettings, $bDisplayMenu, $sSelectMode, $bViewLink, $aExtraParams); diff --git a/application/datatable.class.inc.php b/application/datatable.class.inc.php index 0080db0aa..5d94bd6de 100644 --- a/application/datatable.class.inc.php +++ b/application/datatable.class.inc.php @@ -60,6 +60,10 @@ class DataTable { // Custom settings overload the default ones $this->bUseCustomSettings = true; + if ($this->oDefaultSettings->iDefaultPageSize == 0) + { + $oCustomSettings->iDefaultPageSize = 0; + } } else { @@ -176,6 +180,8 @@ class DataTable if ($iPageSize < 1) // Display all { $sPagerStyle = 'style="display:none"'; // no limit: display the full table, so hide the "pager" UI + // WARNING: mPDF does not take the "display" style into account + // when applied to a or a tag, so make sure you apply this to a div } else { @@ -226,7 +232,8 @@ class DataTable $sSelectionMode = ($iNbPages == 1) ? '' : 'positive'; $sHtml = << + EOF; return $sHtml; diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 09090a7b9..d41c142a0 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -768,7 +768,7 @@ EOF $sHtml .= ' '; $sHtml .= ' '; $sHtml .= ' '; - $sHtml .= ' '; + $sHtml .= ' '; $sHtml .= ''; $sHtml .= ''; diff --git a/css/light-grey.css b/css/light-grey.css index 7bdbe8aea..40e635e5d 100644 --- a/css/light-grey.css +++ b/css/light-grey.css @@ -1102,9 +1102,6 @@ table.pagination tr td { .pagination_container { padding-left: 3px; } -.pager { - display:inline-block; -} .pager p { margin-top: 0; margin-bottom: 0; diff --git a/css/print.css b/css/print.css index de91e59b0..63a0e976a 100644 --- a/css/print.css +++ b/css/print.css @@ -1,15 +1,15 @@ @CHARSET "UTF-8"; -#left-pane { display: none; } span.ui-layout-resizer { display: none; } #header-logo { display: none; } #logo { display: none; } div.header-menu { display:none; } div.footer { display:none; } #top-bar { display: none; } -#menu { display: none; } +#inner_menu { display: none; } div.actions_button { display:none; } div.itop_popup { display:none; } div.HRDrawer { display:none; } div.DrawerHandle { display:none; } a.tab { display:none; } -div.itop-tab { border: #ccc 1px solid; margin-top: 1em; padding-bottom:1em; } \ No newline at end of file +div.itop-tab { border: #ccc 1px solid; margin-top: 1em; padding-bottom:1em; } +#combodo_logo { display:none; };
+
@@ -239,6 +246,7 @@ class DataTable
$sPages
+