1/** 2 âââââ The FlexPaper Project 3 4 This file is part of FlexPaper. 5 6 FlexPaper is free software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, version 3 of the License. 9 10 FlexPaper is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with FlexPaper. If not, see <http://www.gnu.org/licenses/>. 17 18 For more information on FlexPaper please see the FlexPaper project 19 home page: http://flexpaper.devaldi.com 20 */ 21 22jQuery(function() { 23 /** 24 * Handles the event of external links getting clicked in the document. 25 * 26 * @example onExternalLinkClicked("http://www.google.com") 27 * 28 * @param String link 29 */ 30 jQuery('#documentViewer').bind('onExternalLinkClicked',function(e,link){ 31 if(eb.platform.touchonlydevice){ 32 document.location.href = link; 33 }else{ 34 window.open(link,'_flexpaper_exturl'); 35 } 36 }); 37 38 /** 39 * Recieves progress information about the document being loaded 40 * 41 * @example onProgress( 100,10000 ); 42 * 43 * @param int loaded 44 * @param int total 45 */ 46 jQuery('#documentViewer').bind('onProgress',function(e,loadedBytes,totalBytes){ 47 48 }); 49 50 /** 51 * Handles the event of a document is in progress of loading 52 * 53 */ 54 jQuery('#documentViewer').bind('onDocumentLoading',function(e){ 55 56 }); 57 58 /** 59 * Handles the event of a document is in progress of loading 60 * 61 */ 62 jQuery('#documentViewer').bind('onPageLoading',function(e,pageNumber){ 63 64 }); 65 66 /** 67 * Receives messages about the current page being changed 68 * 69 * @example onCurrentPageChanged( 10 ); 70 * 71 * @param int pagenum 72 */ 73 jQuery('#documentViewer').bind('onCurrentPageChanged',function(e,pagenum){ 74 // if GANumber is supplied then lets track this as a Google Analytics event. 75 if(jQuery(this).data('TrackingNumber')){ 76 var _gaq = window._gaq || [];window._gaq=_gaq; 77 var trackingDoc = jQuery(this).data('TrackingDocument'); 78 var pdfFileName = trackingDoc.substr(0,trackingDoc.indexOf(".pdf")+4); 79 80 _gaq.push(['_setAccount', jQuery(this).data('TrackingNumber')]); 81 _gaq.push(['_trackEvent', 'PDF Documents', 'Page View', pdfFileName + ' - page ' + pagenum]); 82 83 (function() { 84 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; 85 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; 86 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); 87 })(); 88 } 89 }); 90 91 /** 92 * Receives messages about the document being loaded 93 * 94 * @example onDocumentLoaded( 20 ); 95 * 96 * @param int totalPages 97 */ 98 jQuery('#documentViewer').bind('onDocumentLoaded',function(e,totalPages){ 99 100 }); 101 102 /** 103 * Receives messages about the page loaded 104 * 105 * @example onPageLoaded( 1 ); 106 * 107 * @param int pageNumber 108 */ 109 jQuery('#documentViewer').bind('onPageLoaded',function(e,pageNumber){ 110 111 }); 112 113 /** 114 * Receives messages about the page loaded 115 * 116 * @example onErrorLoadingPage( 1 ); 117 * 118 * @param int pageNumber 119 */ 120 jQuery('#documentViewer').bind('onErrorLoadingPage',function(e,pageNumber){ 121 122 }); 123 124 /** 125 * Receives error messages when a document is not loading properly 126 * 127 * @example onDocumentLoadedError( "Network error" ); 128 * 129 * @param String errorMessage 130 */ 131 jQuery('#documentViewer').bind('onDocumentLoadedError',function(e,errMessage){ 132 133 }); 134 135 /** 136 * Receives error messages when a document has finished printed 137 * 138 * @example onDocumentPrinted(); 139 * 140 */ 141 jQuery('#documentViewer').bind('onDocumentPrinted',function(e,numPages){ 142 143 }); 144 145 /** 146 * Handles the event of a pdf requiring a password 147 * 148 * @example onPasswordNeeded(updatePassword,reason) 149 * 150 * @param updatePassword callback function for setting the password 151 */ 152 jQuery('#documentViewer').bind('onPasswordNeeded',function(e,updatePassword){ 153 154 }); 155});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.