Просмотр исходного кода

增加下载Excel和下载PDF两个按钮

suntg 9 лет назад
Родитель
Сommit
5df8f4e3cd

+ 12 - 1
src/main/webapp/WEB-INF/views/viewer.html

@@ -30,6 +30,7 @@ See https://github.com/adobe-type-tools/cmap-resources
 <title>在线预览</title>
 
 <link rel="stylesheet" href="static/lib/pdf.js/web/viewer.css">
+<link rel="stylesheet" href="static/lib/fontawesome/css/font-awesome.min.css">
 
 <script src="static/lib/pdf.js/web/compatibility.js"></script>
 
@@ -228,11 +229,21 @@ See https://github.com/adobe-type-tools/cmap-resources
 								<span data-l10n-id="print_label">Print</span>
 							</button>
 
-							<button id="download"
+							<button id="download" disabled="disabled"
 								class="toolbarButton download hiddenMediumView" title="Download"
 								tabindex="34" data-l10n-id="download">
 								<span data-l10n-id="download_label">Download</span>
 							</button>
+							<button id="download_pdf"
+								class="toolbarButton hiddenMediumView" title="下载PDF"
+								tabindex="34">
+								<i class="fa fa-file-pdf-o fa-lg"></i>
+							</button>
+							<button id="download_excel"
+								class="toolbarButton hiddenMediumView" title="下载Excel"
+								tabindex="34">
+								<i class="fa fa-file-excel-o fa-lg"></i>
+							</button>
 							<a href="#" id="viewBookmark"
 								class="toolbarButton bookmark hiddenSmallView"
 								title="Current view (copy or open in new window)" tabindex="35"

+ 1 - 1
src/main/webapp/resources/lib/pdf.js/web/viewer.css

@@ -860,7 +860,7 @@ html[dir='rtl'] .splitToolbarButtonSeparator {
   -moz-user-select: none;
   -ms-user-select: none;
   /* Opera does not support user-select, use <... unselectable="on"> instead */
-  cursor: default;
+  cursor: pointer;
   -webkit-transition-property: background-color, border-color, box-shadow;
   -webkit-transition-duration: 150ms;
   -webkit-transition-timing-function: ease;