Commit 707e06db authored by jcnventura's avatar jcnventura

Code styling fixes.

parent f9580d77
body {direction: rtl;}
th {text-align: right;}
body {
direction: rtl;
}
th {
text-align: right;
}
.print-links,
.print-source_url,
.print-taxonomy {
......
......@@ -8,36 +8,78 @@ th {
color: #006;
border-bottom: 1px solid #ccc;
}
tr.odd {background-color: #ddd;}
tr.even {background-color: #fff;}
td {padding: 5px;}
#menu {visibility: hidden;}
#main {margin: 1em;}
a:link {color: #000;}
a:visited {color: #000;}
a:hover {color: #00f;}
a:link img, a:visited img {border: 0;}
.print-footnote {font-size: xx-small;}
img.print-logo {border: 0;}
.print-site_name {}
.print-breadcrumb {font-size: x-small;}
.print-title {}
.print-submitted {font-size: small;}
.print-created {font-size: small;}
.print-taxonomy {text-align: right;}
.print-taxonomy li {display: inline;}
.print-content {}
tr.odd {
background-color: #ddd;
}
tr.even {
background-color: #fff;
}
td {
padding: 5px;
}
#menu {
visibility: hidden;
}
#main {
margin: 1em;
}
a:link {
color: #000;
}
a:visited {
color: #000;
}
a:hover {
color: #00f;
}
a:link img,
a:visited img {
border: 0;
}
.print-footnote {
font-size: xx-small;
}
img.print-logo {
border: 0;
}
.print-site_name {
}
.print-breadcrumb {
font-size: x-small;
}
.print-title {
}
.print-submitted {
font-size: small;
}
.print-created {
font-size: small;
}
.print-taxonomy {
text-align: right;
}
.print-taxonomy li {
display: inline;
}
.print-content {
}
.print-hr {
border: 0;
height: 1px;
width: 100%;
color: #9E9E9E;
background-color: #9E9E9E;
color: #9e9e9e;
background-color: #9e9e9e;
}
.print-message {
border: medium dotted blue;
padding: 1em;
}
.print-source_url {font-size: small;}
.print-links {font-size: small;}
.print-footer {text-align: center;}
.print-source_url {
font-size: small;
}
.print-links {
font-size: small;
}
.print-footer {
text-align: center;
}
......@@ -47,6 +47,42 @@ function print_epub_uninstall() {
}
}
/**
* Implements hook_requirements().
*/
function print_epub_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
// At runtime, make sure that a EPUB generation tool is selected.
case 'runtime':
$print_epub_epub_tool = variable_get('print_epub_epub_tool', PRINT_EPUB_EPUB_TOOL_DEFAULT);
if (empty($print_epub_epub_tool)) {
$requirements['print_epub_tool'] = array(
'title' => $t('Printer, email and EPUB versions - EPUB generation library'),
'value' => $t('No EPUB tool selected'),
'description' => $t('Please configure it in the !url.', array('!url' => l($t('EPUB settings page'), 'admin/config/user-interface/print/epub'))),
'severity' => REQUIREMENT_ERROR,
);
}
else {
$tool = explode('|', $print_epub_epub_tool);
if (!is_file($tool[1]) || !is_readable($tool[1])) {
$requirements['print_epub_tool'] = array(
'title' => $t('Printer, email and EPUB versions - EPUB generation library'),
'value' => $t('File not found'),
'description' => $t('The currently selected EPUB generation library (%file) is no longer accessible.', array('%file' => $tool[1])),
'severity' => REQUIREMENT_ERROR,
);
}
}
break;
}
return $requirements;
}
/**
* Implements hook_schema().
*/
......
......@@ -121,41 +121,6 @@ function print_epub_block_view($delta = 0) {
return $block;
}
/**
* Implements hook_requirements().
*/
function print_epub_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
// At runtime, make sure that a EPUB generation tool is selected.
case 'runtime':
$print_epub_epub_tool = variable_get('print_epub_epub_tool', PRINT_EPUB_EPUB_TOOL_DEFAULT);
if (empty($print_epub_epub_tool)) {
$requirements['print_epub_tool'] = array(
'title' => $t('Printer, email and EPUB versions - EPUB generation library'),
'value' => $t('No EPUB tool selected'),
'description' => $t('Please configure it in the !url.', array('!url' => l($t('EPUB settings page'), 'admin/config/user-interface/print/epub'))),
'severity' => REQUIREMENT_ERROR,
);
}
else {
$tool = explode('|', $print_epub_epub_tool);
if (!is_file($tool[1]) || !is_readable($tool[1])) {
$requirements['print_epub_tool'] = array(
'title' => $t('Printer, email and EPUB versions - EPUB generation library'),
'value' => $t('File not found'),
'description' => $t('The currently selected EPUB generation library (%file) is no longer accessible.', array('%file' => $tool[1])),
'severity' => REQUIREMENT_ERROR,
);
}
}
break;
}
return $requirements;
}
/**
* Implements hook_node_delete().
*/
......
......@@ -70,7 +70,7 @@ function print_pdf_mpdf_print_pdf_available_libs_alter(&$pdf_tools) {
$tools = _print_scan_libs('mpdf', '!^autoload.php$!');
foreach ($tools as $tool) {
if (preg_match('!mpdf.*?/vendor/autoload.php$!', $tool)) {
$pdf_tools['print_pdf_mpdf|' . $tool] = 'mPDF (' . dirname($tool) . ')';
$pdf_tools['print_pdf_mpdf|' . $tool] = 'mPDF (' . dirname(dirname($tool)) . ')';
}
}
}
......@@ -116,9 +116,7 @@ function print_pdf_generate_path($path, $query = NULL, $cid = NULL, $pdf_filenam
$cache_enabled = variable_get('print_pdf_cache_enabled', PRINT_PDF_CACHE_ENABLED_DEFAULT);
$function = $pdf_tool[0] . '_pdf_tool_info';
if (function_exists($function)) {
$info = $function();
}
$info = function_exists($function) ? $function() : array();
$expand = isset($info['expand_css']) ? $info['expand_css'] : FALSE;
$html = theme('print', array(
......
......@@ -7,7 +7,10 @@
*/
}
.print_html, .print_mail, .print_pdf, .print_epub {
.print_html,
.print_mail,
.print_pdf,
.print_epub {
margin-left: 0;
margin-right: 1em;
}
......
......@@ -15,7 +15,10 @@ div#block-print-ui-print-links span {
display: block;
}
.print_html, .print_mail, .print_pdf, .print_epub {
.print_html,
.print_mail,
.print_pdf,
.print_epub {
margin-left: 1em;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment