|
23 | 23 | <!-- Initialize Uploader -->
|
24 | 24 | <div id="dropArea" style="height: auto; overflow: auto">
|
25 | 25 | <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> |
29 | 28 | <input type="file" name="UploadFiles" id="fileupload" />
|
30 | 29 | </div>
|
31 | 30 | </div>
|
|
132 | 131 | },
|
133 | 132 | });
|
134 | 133 |
|
135 |
| - readURL(liEle, file); |
| 134 | + readURL(liEle, file); |
136 | 135 | proxy.fileList.push(liEle);
|
137 | 136 | }
|
138 | 137 |
|
|
173 | 172 | debugger
|
174 | 173 | var type = args.type;
|
175 | 174 | 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 | + }, |
190 | 189 | false
|
191 | 190 | );
|
192 | 191 | if (file) {
|
|
238 | 237 | padding: 20px 0 10px;
|
239 | 238 | }
|
240 | 239 |
|
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 | + } |
245 | 244 |
|
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 | + } |
255 | 254 |
|
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 | + } |
260 | 259 |
|
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 | + } |
264 | 263 |
|
265 |
| - #dropArea .e-upload-files li .e-icons { |
266 |
| - visibility: hidden; |
267 |
| - } |
| 264 | + #dropArea .e-upload-files li .e-icons { |
| 265 | + visibility: hidden; |
| 266 | + } |
268 | 267 |
|
269 | 268 | .control-section {
|
270 | 269 | width: 100% !important;
|
|
291 | 290 | -moz-osx-font-smoothing: grayscale;
|
292 | 291 | }
|
293 | 292 |
|
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 | + } |
297 | 296 |
|
298 | 297 | #dropArea .e-upload .e-upload-files .e-icons:not(.e-uploaded):hover {
|
299 | 298 | background-color: #e6e6e6;
|
|
336 | 335 | border-radius: 5px;
|
337 | 336 | }
|
338 | 337 |
|
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 | + } |
350 | 349 |
|
351 | 350 | .highcontrast div.file-name,
|
352 | 351 | .material-dark div.file-name,
|
|
503 | 502 | color: #22d3ee;
|
504 | 503 | }
|
505 | 504 |
|
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) { |
507 | 507 |
|
508 | 508 | #dropArea .e-upload .e-upload-files .e-file-remove-btn.e-icons,
|
509 | 509 | .e-bigger #dropArea .e-upload .e-upload-files .e-file-remove-btn.e-icons {
|
510 | 510 | padding: 18px 25px 18px 12px;
|
511 | 511 | }
|
512 | 512 | }
|
| 513 | + |
513 | 514 | </style>
|
514 | 515 |
|
515 | 516 | </html>
|
0 commit comments