View | Details | Raw Unified | Return to bug 6052 | Differences between
and this patch

Collapse All | Expand All

(-)a/templates/article/article.tpl (-5 / +5 lines)
 Lines 16-34    Link Here 
16
	{elseif $galley->isPdfGalley()}
16
	{elseif $galley->isPdfGalley()}
17
		{url|assign:"pdfUrl" op="viewFile" path=$articleId|to_array:$galley->getBestGalleyId($currentJournal)}
17
		{url|assign:"pdfUrl" op="viewFile" path=$articleId|to_array:$galley->getBestGalleyId($currentJournal)}
18
		{translate|assign:"noPluginText" key='article.pdf.pluginMissing'}
18
		{translate|assign:"noPluginText" key='article.pdf.pluginMissing'}
19
		<script type="text/javascript">{literal}
19
		<script type="text/javascript"><!--{literal}
20
			$(document).ready(function(){
20
			$(document).ready(function(){
21
				if ($.browser.webkit) { // PDFObject does not correctly work with safari's built-in PDF viewer
21
				if ($.browser.webkit) { // PDFObject does not correctly work with safari's built-in PDF viewer
22
					var embedCode = "<object id='pdfObject' type='application/pdf' data='{/literal}{$pdfUrl}{literal}' width='99%' height='99%'><div id='pluginMissing'>{/literal}{$noPluginText|escape}{literal}</div></object>";
22
					var embedCode = "<object id='pdfObject' type='application/pdf' data='{/literal}{$pdfUrl}{literal}' width='99%' height='99%'><div id='pluginMissing'>{/literal}{$noPluginText|escape:'javascript'}{literal}</div></object>";
23
					$("#articlePdf").html(embedCode);
23
					$("#articlePdf").html(embedCode);
24
					if($("#pluginMissing").is(":hidden")) {
24
					if($("#pluginMissing").is(":hidden")) {
25
						$('#fullscreenShow').show();
25
						$('#fullscreenShow').show();
26
						$("#articlePdf").resizable({ containment: 'parent', handles: 'se' });
26
						$("#articlePdf").resizable({ containment: 'parent', handles: 'se' });
27
					} else { // Chrome Mac hides the embed object, obscuring the text.  Reinsert.
27
					} else { // Chrome Mac hides the embed object, obscuring the text.  Reinsert.
28
						$("#articlePdf").html('{/literal}{$noPluginText}{literal}');
28
						$("#articlePdf").html('{/literal}{$noPluginText|escape:"javascript"}{literal}');
29
					}
29
					}
30
				} else {
30
				} else {
31
					var success = new PDFObject({ url: "{/literal}{$pdfUrl}{literal}" }).embed("articlePdf");
31
					var success = new PDFObject({ url: "{/literal}{$pdfUrl|escape:'javascript'}{literal}" }).embed("articlePdf");
32
					if (success) {
32
					if (success) {
33
						// PDF was embedded; enbale fullscreen mode and the resizable widget
33
						// PDF was embedded; enbale fullscreen mode and the resizable widget
34
						$('#fullscreenShow').show();
34
						$('#fullscreenShow').show();
 Lines 36-42    Link Here 
36
					}
36
					}
37
				}
37
				}
38
			});
38
			});
39
		{/literal}</script>
39
		{/literal}--></script>
40
		<div id="articlePdfResizer">
40
		<div id="articlePdfResizer">
41
			<div id="articlePdf" class="ui-widget-content">
41
			<div id="articlePdf" class="ui-widget-content">
42
				{translate key="article.pdf.pluginMissing"}
42
				{translate key="article.pdf.pluginMissing"}
(-)a/templates/article/footer.tpl (-1 lines)
 Lines 52-58    Link Here 
52
52
53
</div>
53
</div>
54
</div>
54
</div>
55
</div>
56
55
57
{if $defineTermsContextId}
56
{if $defineTermsContextId}
58
<script type="text/javascript">
57
<script type="text/javascript">
(-)a/templates/article/header.tpl (-1 / +1 lines)
 Lines 44-50    Link Here 
44
	{/foreach}
44
	{/foreach}
45
45
46
	<!-- Base Jquery -->
46
	<!-- Base Jquery -->
47
	{if $allowCDN}<script src="http://www.google.com/jsapi"></script>
47
	{if $allowCDN}<script type="text/javascript" src="http://www.google.com/jsapi"></script>
48
	<script type="text/javascript">{literal}
48
	<script type="text/javascript">{literal}
49
		// Provide a local fallback if the CDN cannot be reached
49
		// Provide a local fallback if the CDN cannot be reached
50
		if (typeof google == 'undefined') {
50
		if (typeof google == 'undefined') {
(-)a/templates/rt/header.tpl (-1 / +1 lines)
 Lines 25-31    Link Here 
25
	{/foreach}
25
	{/foreach}
26
26
27
	<!-- Base Jquery -->
27
	<!-- Base Jquery -->
28
	{if $allowCDN}<script src="http://www.google.com/jsapi"></script>
28
	{if $allowCDN}<script type="text/javascript" src="http://www.google.com/jsapi"></script>
29
	<script type="text/javascript">{literal}
29
	<script type="text/javascript">{literal}
30
		// Provide a local fallback if the CDN cannot be reached
30
		// Provide a local fallback if the CDN cannot be reached
31
		if (typeof google == 'undefined') {
31
		if (typeof google == 'undefined') {
(-)a/templates/submission/comment/header.tpl (-1 / +1 lines)
 Lines 25-31    Link Here 
25
	{/foreach}
25
	{/foreach}
26
26
27
	<!-- Base Jquery -->
27
	<!-- Base Jquery -->
28
	{if $allowCDN}<script src="http://www.google.com/jsapi"></script>
28
	{if $allowCDN}<script type="text/javascript" src="http://www.google.com/jsapi"></script>
29
	<script type="text/javascript">{literal}
29
	<script type="text/javascript">{literal}
30
		// Provide a local fallback if the CDN cannot be reached
30
		// Provide a local fallback if the CDN cannot be reached
31
		if (typeof google == 'undefined') {
31
		if (typeof google == 'undefined') {

Return to bug 6052