We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

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

Collapse All | Expand All

(-)a/templates/article/article.tpl (-5 / +7 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}{$noPluginKey}{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}
40
		// -->
41
		</script>
40
		<div id="articlePdfResizer">
42
		<div id="articlePdfResizer">
41
			<div id="articlePdf" class="ui-widget-content">
43
			<div id="articlePdf" class="ui-widget-content">
42
				{translate key="article.pdf.pluginMissing"}
44
				{translate key="article.pdf.pluginMissing"}
(-)a/templates/article/footer.tpl (-1 lines)
 Lines 52-58    Link Here 
52
</div>
52
</div>
53
</div>
53
</div>
54
</div>
55
{if $defineTermsContextId}
54
{if $defineTermsContextId}
56
<script type="text/javascript">
55
<script type="text/javascript">
(-)a/templates/article/header.tpl (-1 / +1 lines)
 Lines 44-50    Link Here 
44
	{/foreach}
44
	{/foreach}
45
	<!-- Base Jquery -->
45
	<!-- Base Jquery -->
46
	{if $allowCDN}<script src="http://www.google.com/jsapi"></script>
46
	{if $allowCDN}<script type="text/javascript" src="http://www.google.com/jsapi"></script>
47
	<script type="text/javascript">{literal}
47
	<script type="text/javascript">{literal}
48
		// Provide a local fallback if the CDN cannot be reached
48
		// Provide a local fallback if the CDN cannot be reached
49
		if (typeof google == 'undefined') {
49
		if (typeof google == 'undefined') {
(-)a/templates/rt/header.tpl (-1 / +1 lines)
 Lines 25-31    Link Here 
25
	{/foreach}
25
	{/foreach}
26
	<!-- Base Jquery -->
26
	<!-- Base Jquery -->
27
	{if $allowCDN}<script src="http://www.google.com/jsapi"></script>
27
	{if $allowCDN}<script type="text/javascript" src="http://www.google.com/jsapi"></script>
28
	<script type="text/javascript">{literal}
28
	<script type="text/javascript">{literal}
29
		// Provide a local fallback if the CDN cannot be reached
29
		// Provide a local fallback if the CDN cannot be reached
30
		if (typeof google == 'undefined') {
30
		if (typeof google == 'undefined') {
(-)a/templates/submission/comment/header.tpl (-1 / +1 lines)
 Lines 25-31    Link Here 
25
	{/foreach}
25
	{/foreach}
26
	<!-- Base Jquery -->
26
	<!-- Base Jquery -->
27
	{if $allowCDN}<script src="http://www.google.com/jsapi"></script>
27
	{if $allowCDN}<script type="text/javascript" src="http://www.google.com/jsapi"></script>
28
	<script type="text/javascript">{literal}
28
	<script type="text/javascript">{literal}
29
		// Provide a local fallback if the CDN cannot be reached
29
		// Provide a local fallback if the CDN cannot be reached
30
		if (typeof google == 'undefined') {
30
		if (typeof google == 'undefined') {

Return to bug 6052