/
home
/
apeolorg
/
public_html
/
old
/
templates
/
issue
/
Upload File
HOME
{** * templates/issue/issueGalley.tpl * * Copyright (c) 2013-2016 Simon Fraser University Library * Copyright (c) 2003-2016 John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * Issue galley view for PDF files. *} {include file="issue/header.tpl"} {url|assign:"pdfUrl" op="viewFile" path=$issueId|to_array:$galley->getBestGalleyId($currentJournal)} {translate|assign:"noPluginText" key='article.pdf.pluginMissing'} <script type="text/javascript"><!--{literal} $(document).ready(function(){ if ($.browser.webkit) { // PDFObject does not correctly work with safari's built-in PDF viewer var embedCode = "<object id='pdfObject' type='application/pdf' data='{/literal}{$pdfUrl|escape:'javascript'}{literal}' width='99%' height='99%'><div id='pluginMissing'>{/literal}{$noPluginText|escape:'javascript'}{literal}</div></object>"; $("#inlinePdf").html(embedCode); if($("#pluginMissing").is(":hidden")) { $('#fullscreenShow').show(); $("#inlinePdf").resizable({ containment: 'parent', handles: 'se' }); } else { // Chrome Mac hides the embed object, obscuring the text. Reinsert. $("#inlinePdf").html('{/literal}{$noPluginText|escape:"javascript"}{literal}'); } } else { var success = new PDFObject({ url: "{/literal}{$pdfUrl|escape:'javascript'}{literal}" }).embed("inlinePdf"); if (success) { // PDF was embedded; enable fullscreen mode and the resizable widget $('#fullscreenShow').show(); $("#inlinePdfResizer").resizable({ containment: 'parent', handles: 'se' }); } } }); {/literal} // --> </script> <div id="inlinePdfResizer"> <div id="inlinePdf" class="ui-widget-content"> {translate key="article.pdf.pluginMissing"} </div> </div> <p> {* The target="_parent" is for the sake of iphones, which present scroll problems otherwise. *} <a class="action" target="_parent" href="{url op="download" path=$issueId|to_array:$galley->getBestGalleyId($currentJournal)}">{translate key="article.pdf.download"}</a> <a class="action" href="#" id="fullscreenShow">{translate key="common.fullscreen"}</a> <a class="action" href="#" id="fullscreenHide">{translate key="common.fullscreenOff"}</a> </p> {include file="common/footer.tpl"}