Skip to content

Commit

Permalink
Ron's suggestions for PDF (#385) implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
juliantenney committed Sep 28, 2015
1 parent 9107589 commit 44515b7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modules/site/parent_templates/site/common/js/application.js
Expand Up @@ -301,7 +301,7 @@ function parseContent(pageIndex){
}

if (this.nodeName == 'pdf'){
section.append('<object id="pdfDoc"' + new Date().getTime() + ' data="' + eval( $(this).attr('url')) + '" type="application/pdf" width="100%" height="400"><param name="src" value="' + eval( $(this).attr('url')) + '"></object>');
section.append('<object id="pdfDoc"' + new Date().getTime() + ' data="' + eval( $(this).attr('url')) + '" type="application/pdf" width="100%" height="600"><param name="src" value="' + eval( $(this).attr('url')) + '"></object>');
}

if (this.nodeName == 'navigator'){
Expand Down Expand Up @@ -446,7 +446,7 @@ function makeNav(node,section,type, sectionIndex, itemIndex){
}

if (this.nodeName == 'pdf'){
tab.append('<object id="pdfDoc"' + new Date().getTime() + ' data="' + eval( $(this).attr('url')) + '" type="application/pdf" width="100%" height="100%"><param name="src" value="' + eval( $(this).attr('url')) + '"></object>');
tab.append('<object id="pdfDoc"' + new Date().getTime() + ' data="' + eval( $(this).attr('url')) + '" type="application/pdf" width="100%" height="600"><param name="src" value="' + eval( $(this).attr('url')) + '"></object>');
}

});
Expand Down Expand Up @@ -524,6 +524,10 @@ function makeAccordion(node,section, sectionIndex, itemIndex){
inner.append( '<p><a href="javascript:window.open(\'' + url + '\', \'' + winName + '\', \'' + options + '\');void(0)">' + $(this).attr('name') + '</a></p>' );

}

if (this.nodeName == 'pdf'){
inner.append('<object id="pdfDoc"' + new Date().getTime() + ' data="' + eval( $(this).attr('url')) + '" type="application/pdf" width="100%" height="600"><param name="src" value="' + eval( $(this).attr('url')) + '"></object>');
}
});

outer.append(inner);
Expand Down Expand Up @@ -604,6 +608,10 @@ function makeCarousel(node, section, sectionIndex, itemIndex){

}

if (this.nodeName == 'pdf'){
pane.append('<object id="pdfDoc"' + new Date().getTime() + ' data="' + eval( $(this).attr('url')) + '" type="application/pdf" width="100%" height="600"><param name="src" value="' + eval( $(this).attr('url')) + '"></object>');
}

});

items.append(pane);
Expand Down

0 comments on commit 44515b7

Please sign in to comment.