removed all old elements; file input & dl work
This commit is contained in:
		
							parent
							
								
									68bab04582
								
							
						
					
					
						commit
						195efa404d
					
				@ -282,6 +282,10 @@ body {
 | 
				
			|||||||
  content: url(images/toolbarButton-download.png);
 | 
					  content: url(images/toolbarButton-download.png);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.toolbarButton.bookmark {
 | 
				
			||||||
 | 
					  display: block;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.toolbarButton.bookmark::before {
 | 
					.toolbarButton.bookmark::before {
 | 
				
			||||||
  display: inline-block;
 | 
					  display: inline-block;
 | 
				
			||||||
  content: url(images/toolbarButton-bookmark.png);
 | 
					  content: url(images/toolbarButton-bookmark.png);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										129
									
								
								web/viewer.html
									
									
									
									
									
								
							
							
						
						
									
										129
									
								
								web/viewer.html
									
									
									
									
									
								
							@ -81,10 +81,14 @@
 | 
				
			|||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <div class="toolbarButtonFlexibleSpacer"></div>
 | 
					            <div class="toolbarButtonFlexibleSpacer"></div>
 | 
				
			||||||
            <div class="toolbarButton print" title="Print"></div>
 | 
					            <input id="fileInput" class="toolbarButton fileInput" type="file" oncontextmenu="return false;"/>
 | 
				
			||||||
            <div class="toolbarButton download"  title="Download"></div>
 | 
					
 | 
				
			||||||
            <div class="toolbarButtonSpacer"></div>
 | 
					            <div class="toolbarButtonSpacer"></div>
 | 
				
			||||||
            <div class="toolbarButton bookmark" title="Bookmark (or copy) current location"></div>
 | 
					
 | 
				
			||||||
 | 
					            <!-- <div class="toolbarButton print" title="Print"></div> -->
 | 
				
			||||||
 | 
					            <div class="toolbarButton download" title="Download" onclick="PDFView.download();"></div>
 | 
				
			||||||
 | 
					            <a href="#" id="viewBookmark" class="toolbarButton bookmark" title="Bookmark (or copy) current location">
 | 
				
			||||||
 | 
					            </a>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
@ -127,124 +131,5 @@
 | 
				
			|||||||
      <textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
 | 
					      <textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<!-- ................ OLD ................ -->
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<div style="display:none;">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div id="controls">
 | 
					 | 
				
			||||||
      <button id="previous" onclick="PDFView.page--;" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
        <img src="images/go-up.svg" align="top" height="16"/>
 | 
					 | 
				
			||||||
        Previous
 | 
					 | 
				
			||||||
      </button>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <button id="next" onclick="PDFView.page++;" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
        <img src="images/go-down.svg" align="top" height="16"/>
 | 
					 | 
				
			||||||
        Next
 | 
					 | 
				
			||||||
      </button>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <div class="separator"></div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <input type="number" id="pageNumber" onchange="PDFView.page = this.value;" value="1" size="4" min="1" />
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <span>/</span>
 | 
					 | 
				
			||||||
      <span id="numPages">--</span>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <div class="separator"></div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<!--       <button id="zoomOut" title="Zoom Out" onclick="PDFView.zoomOut();" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
        <img src="images/zoom-out.svg" align="top" height="16"/>
 | 
					 | 
				
			||||||
      </button>
 | 
					 | 
				
			||||||
      <button id="zoomIn" title="Zoom In" onclick="PDFView.zoomIn();" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
        <img src="images/zoom-in.svg" align="top" height="16"/>
 | 
					 | 
				
			||||||
      </button>
 | 
					 | 
				
			||||||
 -->
 | 
					 | 
				
			||||||
      <div class="separator"></div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<!--       <select id="scaleSelect" onchange="PDFView.parseScale(this.value);" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
        <option id="customScaleOption" value="custom"></option>
 | 
					 | 
				
			||||||
        <option value="0.5">50%</option>
 | 
					 | 
				
			||||||
        <option value="0.75">75%</option>
 | 
					 | 
				
			||||||
        <option value="1">100%</option>
 | 
					 | 
				
			||||||
        <option value="1.25">125%</option>
 | 
					 | 
				
			||||||
        <option value="1.5">150%</option>
 | 
					 | 
				
			||||||
        <option value="2">200%</option>
 | 
					 | 
				
			||||||
        <option id="pageWidthOption" value="page-width">Page Width</option>
 | 
					 | 
				
			||||||
        <option id="pageFitOption" value="page-fit">Page Fit</option>
 | 
					 | 
				
			||||||
        <option id="pageAutoOption" value="auto" selected="selected">Auto</option>
 | 
					 | 
				
			||||||
      </select>
 | 
					 | 
				
			||||||
 -->
 | 
					 | 
				
			||||||
      <div class="separator"></div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <button id="print" onclick="window.print();" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
        <img src="images/document-print.svg" align="top" height="16"/>
 | 
					 | 
				
			||||||
        Print
 | 
					 | 
				
			||||||
      </button>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <button id="download" title="Download" onclick="PDFView.download();" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
        <img src="images/download.svg" align="top" height="16"/>
 | 
					 | 
				
			||||||
        Download
 | 
					 | 
				
			||||||
      </button>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <div class="separator"></div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <input id="fileInput" type="file" oncontextmenu="return false;"/>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <div id="fileInputSeperator" class="separator"></div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      <a href="#" id="viewBookmark" title="Bookmark (or copy) current location">
 | 
					 | 
				
			||||||
        <img src="images/bookmark.svg" alt="Bookmark" align="top" height="16"/>
 | 
					 | 
				
			||||||
      </a>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
<!--     <div id="errorWrapper" hidden='true'>
 | 
					 | 
				
			||||||
      <div id="errorMessageLeft">
 | 
					 | 
				
			||||||
        <span id="errorMessage"></span>
 | 
					 | 
				
			||||||
        <button id="errorShowMore" onclick="" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
          More Information
 | 
					 | 
				
			||||||
        </button>
 | 
					 | 
				
			||||||
        <button id="errorShowLess" onclick="" oncontextmenu="return false;" hidden='true'>
 | 
					 | 
				
			||||||
          Less Information
 | 
					 | 
				
			||||||
        </button>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div id="errorMessageRight">
 | 
					 | 
				
			||||||
        <button id="errorClose" oncontextmenu="return false;">
 | 
					 | 
				
			||||||
          Close
 | 
					 | 
				
			||||||
        </button>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="clearBoth"></div>
 | 
					 | 
				
			||||||
      <textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 -->
 | 
					 | 
				
			||||||
<!--     <div id="sidebar">
 | 
					 | 
				
			||||||
      <div id="sidebarBox">
 | 
					 | 
				
			||||||
        <div id="pinIcon" onClick="PDFView.pinSidebar()"></div>
 | 
					 | 
				
			||||||
        <div id="sidebarScrollView">
 | 
					 | 
				
			||||||
          <div id="sidebarView"></div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <div id="outlineScrollView" hidden='true'>
 | 
					 | 
				
			||||||
          <div id="outlineView"></div>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
        <div id="sidebarControls">
 | 
					 | 
				
			||||||
          <button id="thumbsSwitch" title="Show Thumbnails" onclick="PDFView.switchSidebarView('thumbs')" data-selected>
 | 
					 | 
				
			||||||
            <img src="images/nav-thumbs.svg" align="top" height="16" alt="Thumbs" />
 | 
					 | 
				
			||||||
          </button>
 | 
					 | 
				
			||||||
          <button id="outlineSwitch" title="Show Document Outline" onclick="PDFView.switchSidebarView('outline')" disabled>
 | 
					 | 
				
			||||||
            <img src="images/nav-outline.svg" align="top" height="16" alt="Document Outline" />
 | 
					 | 
				
			||||||
          </button>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 -->
 | 
					 | 
				
			||||||
<!--     <div id="loadingBox">
 | 
					 | 
				
			||||||
        <div id="loading">Loading... 0%</div>
 | 
					 | 
				
			||||||
        <div id="loadingBar"><div class="progress"></div></div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 -->
 | 
					 | 
				
			||||||
</div> <!-- display none -->
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  </body>
 | 
					  </body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
 | 
				
			|||||||
@ -1240,8 +1240,6 @@ window.addEventListener('load', function webViewerLoad(evt) {
 | 
				
			|||||||
  if (PDFJS.isFirefoxExtension || !window.File || !window.FileReader ||
 | 
					  if (PDFJS.isFirefoxExtension || !window.File || !window.FileReader ||
 | 
				
			||||||
      !window.FileList || !window.Blob) {
 | 
					      !window.FileList || !window.Blob) {
 | 
				
			||||||
    document.getElementById('fileInput').setAttribute('hidden', 'true');
 | 
					    document.getElementById('fileInput').setAttribute('hidden', 'true');
 | 
				
			||||||
    document.getElementById('fileInputSeperator')
 | 
					 | 
				
			||||||
                              .setAttribute('hidden', 'true');
 | 
					 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    document.getElementById('fileInput').value = null;
 | 
					    document.getElementById('fileInput').value = null;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user