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

预览页面可导出只含数据的Excel表格

sunyj 9 лет назад
Родитель
Сommit
ab44aa70d8

+ 9 - 4
src/main/webapp/WEB-INF/views/preview.html

@@ -237,17 +237,22 @@ See https://github.com/adobe-type-tools/cmap-resources
 								<span data-l10n-id="download_label">Download</span>
 							</button>
 							<button id="download_pdf" class="toolbarButton hiddenMediumView"
-								title="下载PDF" tabindex="34">
+								title="下载PDF" tabindex="35">
 								<i class="fa fa-file-pdf-o fa-lg"></i>
 							</button>
 							<button id="download_excel"
 								class="toolbarButton hiddenMediumView" title="下载Excel"
-								tabindex="34">
+								tabindex="36">
+								<i class="fa fa-file-excel-o fa-lg"></i>
+							</button>
+							<button id="download_excel_with_only_data"
+								class="toolbarButton hiddenMediumView" title="下载Excel(仅数据)"
+								tabindex="37">
 								<i class="fa fa-file-excel-o fa-lg"></i>
 							</button>
 							<a href="#" id="viewBookmark" hidden='true'
 								class="toolbarButton bookmark hiddenSmallView"
-								title="Current view (copy or open in new window)" tabindex="35"
+								title="Current view (copy or open in new window)" tabindex="38"
 								data-l10n-id="bookmark"> <span data-l10n-id="bookmark_label">Current
 									View</span>
 							</a>
@@ -255,7 +260,7 @@ See https://github.com/adobe-type-tools/cmap-resources
 							<div class="verticalToolbarSeparator hiddenSmallView"></div>
 
 							<button id="secondaryToolbarToggle" class="toolbarButton"
-								title="Tools" tabindex="36" data-l10n-id="tools">
+								title="Tools" tabindex="39" data-l10n-id="tools">
 								<span data-l10n-id="tools_label">Tools</span>
 							</button>
 						</div>

+ 4 - 0
src/main/webapp/resources/js/preview/app.js

@@ -6,6 +6,10 @@ $("#download_excel").click(function() {
 	downloadReport("xls");
 });
 
+$("#download_excel_with_only_data").click(function() {
+	downloadReport("xls_with_only_data");
+});
+
 var downloadReport = function(exportFileType) {
 	var userName = getParameter("userName");
 	var reportName = getParameter("reportName");