@widgetic/editor 3.10.48 → 3.10.49
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 +20 -12
- package/lib/editor.js +1 -1
- package/package.json +1 -1
- package/src/editor/content/browser/upload.html +14 -4
package/package.json
CHANGED
|
@@ -270,7 +270,17 @@ export default {
|
|
|
270
270
|
// console.log("uploadedFiles after sort: ", files);
|
|
271
271
|
|
|
272
272
|
// sort files by last modified date
|
|
273
|
-
files = files.sort((a, b) => {
|
|
273
|
+
files = files.sort((a, b) => {
|
|
274
|
+
let x = a.lastModified;
|
|
275
|
+
if(!x) x = 0;
|
|
276
|
+
|
|
277
|
+
let y = b.lastModified;
|
|
278
|
+
if(!y) y = 0;
|
|
279
|
+
|
|
280
|
+
// console.log("x & y: ", x, y);
|
|
281
|
+
|
|
282
|
+
return x - y;
|
|
283
|
+
});
|
|
274
284
|
console.log("uploadedFiles after sort: ", files);
|
|
275
285
|
|
|
276
286
|
return this.set({ files })
|
|
@@ -346,19 +356,19 @@ export default {
|
|
|
346
356
|
*/
|
|
347
357
|
|
|
348
358
|
_onUpdate(event) {
|
|
349
|
-
console.log("on Update Content:", event);
|
|
359
|
+
// console.log("on Update Content:", event);
|
|
350
360
|
|
|
351
361
|
// re-load uploaded files
|
|
352
362
|
this.refresh();
|
|
353
363
|
},
|
|
354
364
|
|
|
355
365
|
_onUploadComplete([file, instanceId]) {
|
|
356
|
-
console.log("on Upload Complete:", file, instanceId);
|
|
366
|
+
// console.log("on Upload Complete:", file, instanceId);
|
|
357
367
|
|
|
358
368
|
// toggle the file only if it's upload originated from this instance
|
|
359
369
|
if (instanceId === this.get('instanceId')) this._toggleSelect(file, { afterUpload: true });
|
|
360
370
|
|
|
361
|
-
//
|
|
371
|
+
// reload files by upload date
|
|
362
372
|
// this.refresh();
|
|
363
373
|
},
|
|
364
374
|
},
|