Skip to content

Commit 027fa85

Browse files
commit
1 parent f1a06cb commit 027fa85

File tree

2 files changed

+58
-57
lines changed

2 files changed

+58
-57
lines changed

Common/Load PDF, Excel, PPT file types/Load PDF, Excel, PPT file types/src/index.html

Lines changed: 57 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
<!-- Initialize Uploader -->
2424
<div id="dropArea" style="height: auto; overflow: auto">
2525
<span id="drop">
26-
Drop files (Word, Excel, PowerPoint, Image)
27-
<a href="" id="browse"><u>Browse</u></a>
28-
</span>
26+
Drop files (Word, Excel, PowerPoint, Image)
27+
<a href="" id="browse"><u>Browse</u></a></span>
2928
<input type="file" name="UploadFiles" id="fileupload" />
3029
</div>
3130
</div>
@@ -132,7 +131,7 @@
132131
},
133132
});
134133

135-
readURL(liEle, file);
134+
readURL(liEle, file);
136135
proxy.fileList.push(liEle);
137136
}
138137

@@ -173,20 +172,20 @@
173172
debugger
174173
var type = args.type;
175174
reader.addEventListener('load', function () {
176-
let post = JSON.stringify({
177-
'data': reader.result,
178-
'type': type
179-
})
180-
const url = "https://localhost:44327/pdfviewer/LoadFile"
181-
let xhr = new XMLHttpRequest()
182-
xhr.open('Post', url, true)
183-
xhr.setRequestHeader('Content-type', 'application/json; charset=UTF-8')
184-
xhr.send(post);
185-
xhr.onload = function (args) {
186-
viewer = document.getElementById('pdfViewer').ej2_instances[0];
187-
viewer.documentPath = this.responseText;
188-
}
189-
},
175+
let post = JSON.stringify({
176+
'data': reader.result,
177+
'type': type
178+
})
179+
const url = "https://localhost:44327/pdfviewer/LoadFile"
180+
let xhr = new XMLHttpRequest()
181+
xhr.open('Post', url, true)
182+
xhr.setRequestHeader('Content-type', 'application/json; charset=UTF-8')
183+
xhr.send(post);
184+
xhr.onload = function (args) {
185+
viewer = document.getElementById('pdfViewer').ej2_instances[0];
186+
viewer.documentPath = this.responseText;
187+
}
188+
},
190189
false
191190
);
192191
if (file) {
@@ -238,33 +237,33 @@
238237
padding: 20px 0 10px;
239238
}
240239

241-
#dropArea .e-upload .e-upload-files {
242-
text-align: initial;
243-
border-top: none;
244-
}
240+
#dropArea .e-upload .e-upload-files {
241+
text-align: initial;
242+
border-top: none;
243+
}
245244

246-
#dropArea .e-upload-files .e-file-delete-btn.e-icons,
247-
#dropArea .e-upload-files .e-file-remove-btn.e-icons,
248-
#dropArea .e-upload-files .e-file-abort-btn {
249-
top: 120px;
250-
background-color: white;
251-
border-radius: 50%;
252-
font-size: 12px;
253-
left: 80px;
254-
}
245+
#dropArea .e-upload-files .e-file-delete-btn.e-icons,
246+
#dropArea .e-upload-files .e-file-remove-btn.e-icons,
247+
#dropArea .e-upload-files .e-file-abort-btn {
248+
top: 120px;
249+
background-color: white;
250+
border-radius: 50%;
251+
font-size: 12px;
252+
left: 80px;
253+
}
255254

256-
#dropArea .e-upload-files li .e-file-remove-btn.e-icons.e-upload-icon {
257-
font-size: 14px;
258-
left: 20px;
259-
}
255+
#dropArea .e-upload-files li .e-file-remove-btn.e-icons.e-upload-icon {
256+
font-size: 14px;
257+
left: 20px;
258+
}
260259

261-
#dropArea .e-upload-files li:hover .e-icons {
262-
visibility: visible;
263-
}
260+
#dropArea .e-upload-files li:hover .e-icons {
261+
visibility: visible;
262+
}
264263

265-
#dropArea .e-upload-files li .e-icons {
266-
visibility: hidden;
267-
}
264+
#dropArea .e-upload-files li .e-icons {
265+
visibility: hidden;
266+
}
268267

269268
.control-section {
270269
width: 100% !important;
@@ -291,9 +290,9 @@
291290
-moz-osx-font-smoothing: grayscale;
292291
}
293292

294-
#dropArea .e-upload .e-upload-files .e-icons.e-upload-icon::before {
295-
content: '\e700';
296-
}
293+
#dropArea .e-upload .e-upload-files .e-icons.e-upload-icon::before {
294+
content: '\e700';
295+
}
297296

298297
#dropArea .e-upload .e-upload-files .e-icons:not(.e-uploaded):hover {
299298
background-color: #e6e6e6;
@@ -336,17 +335,17 @@
336335
border-radius: 5px;
337336
}
338337

339-
.upload-image:after {
340-
content: '';
341-
position: absolute;
342-
top: 6px;
343-
left: 6px;
344-
width: inherit;
345-
height: inherit;
346-
background: lightgray url('http://via.placeholder.com/300?text=Loading...') no-repeat center;
347-
color: transparent;
348-
border-radius: 5px;
349-
}
338+
.upload-image:after {
339+
content: '';
340+
position: absolute;
341+
top: 6px;
342+
left: 6px;
343+
width: inherit;
344+
height: inherit;
345+
background: lightgray url('http://via.placeholder.com/300?text=Loading...') no-repeat center;
346+
color: transparent;
347+
border-radius: 5px;
348+
}
350349

351350
.highcontrast div.file-name,
352351
.material-dark div.file-name,
@@ -503,13 +502,15 @@
503502
color: #22d3ee;
504503
}
505504

506-
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
505+
@media all and (-ms-high-contrast: none),
506+
(-ms-high-contrast: active) {
507507

508508
#dropArea .e-upload .e-upload-files .e-file-remove-btn.e-icons,
509509
.e-bigger #dropArea .e-upload .e-upload-files .e-file-remove-btn.e-icons {
510510
padding: 18px 25px 18px 12px;
511511
}
512512
}
513+
513514
</style>
514515

515516
</html>

Common/Load PDF, Excel, PPT file types/Web Service/Controllers/PdfViewerController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,4 +458,4 @@ public IActionResult Index()
458458
return View();
459459
}
460460
}
461-
}
461+
}

0 commit comments

Comments
 (0)