@widgetic/editor 3.10.53 → 3.10.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dev/editor.js +19 -13
- package/lib/editor.js +1 -1
- package/package.json +1 -1
- package/src/core/services/uploads.js +1 -1
- package/src/editor/content/browser/upload.html +10 -4
package/package.json
CHANGED
|
@@ -92,7 +92,7 @@ export default class UploadService extends EventsMixin(Service) {
|
|
|
92
92
|
lastModified: Date.now(),
|
|
93
93
|
uploadFile,
|
|
94
94
|
});
|
|
95
|
-
console.log("on upload file:", file);
|
|
95
|
+
// console.log("on upload file:", file);
|
|
96
96
|
|
|
97
97
|
// push it to the files array
|
|
98
98
|
this.files.push(file);
|
|
@@ -275,7 +275,7 @@ export default {
|
|
|
275
275
|
// // console.log("noIdA & noIdB: ", noIdA, noIdB, (noIdA - noIdB));
|
|
276
276
|
// return noIdA - noIdB;
|
|
277
277
|
// });
|
|
278
|
-
// console.log("uploadedFiles
|
|
278
|
+
// console.log("uploadedFiles before sort: ", files);
|
|
279
279
|
|
|
280
280
|
// sort files by last modified(uploadTime) date
|
|
281
281
|
files = files.sort((a, b) => {
|
|
@@ -284,7 +284,10 @@ export default {
|
|
|
284
284
|
let x = a.lastModified;
|
|
285
285
|
|
|
286
286
|
// read the lastModified date from the id
|
|
287
|
-
if(!x
|
|
287
|
+
if(!x && a.id) {
|
|
288
|
+
let indexOft = a.id.indexOf('_u');
|
|
289
|
+
if(indexOft) x = a.id.substring(indexOft+3);
|
|
290
|
+
}
|
|
288
291
|
|
|
289
292
|
// if still not available then set it to 0
|
|
290
293
|
if(!x) x = 0;
|
|
@@ -295,7 +298,10 @@ export default {
|
|
|
295
298
|
let y = b.lastModified;
|
|
296
299
|
|
|
297
300
|
// read the lastModified date from the id
|
|
298
|
-
if(!y
|
|
301
|
+
if(!y && b.id) {
|
|
302
|
+
let indexOft = b.id.indexOf('_u');
|
|
303
|
+
if(indexOft) y = b.id.substring(indexOft+3);
|
|
304
|
+
}
|
|
299
305
|
|
|
300
306
|
// if still not available then set it to 0
|
|
301
307
|
if(!y) y = 0;
|
|
@@ -306,7 +312,7 @@ export default {
|
|
|
306
312
|
|
|
307
313
|
return x - y;
|
|
308
314
|
});
|
|
309
|
-
console.log("uploadedFiles after sort: ", files);
|
|
315
|
+
// console.log("uploadedFiles after sort: ", files);
|
|
310
316
|
|
|
311
317
|
return this.set({ files })
|
|
312
318
|
})
|