diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 1becfc701..764143fb7 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -732,7 +732,7 @@ class RuntimeDashboard extends Dashboard { $aAjaxParams = $aExtraParams; } - if (!$bEditMode) + if (!$bEditMode && !$oPage->IsPrintableVersion()) { $sId = $this->GetId(); $sDivId = preg_replace('/[^a-zA-Z0-9_]/', '', $sId); diff --git a/css/print.css b/css/print.css index e1f14f615..0d73a1ddf 100644 --- a/css/print.css +++ b/css/print.css @@ -21,7 +21,8 @@ p a, .ui-widget-content td a, p a:hover, .ui-widget-content td a:hover, p a:visi padding-left: 0; background: transparent; } -body { margin:none; } +body { margin:0; } + .printable-tab { -webkit-region-break-inside: avoid; page-break-inside: avoid; diff --git a/js/utils.js b/js/utils.js index fd5c971e9..740443e19 100644 --- a/js/utils.js +++ b/js/utils.js @@ -333,7 +333,7 @@ function SetUserPreference(sPreferenceCode, sPrefValue, bPersistent) { */ function GetUserPreference(sPreferenceCode, sDefaultValue) { var value = sDefaultValue; - if (oUserPreferences[sPreferenceCode] != undefined) { + if ((typeof(oUserPreferences) !== 'undefined') && (typeof(oUserPreferences[sPreferenceCode]) !== 'undefined')) { value = oUserPreferences[sPreferenceCode]; } return value;