65915aa386f518494df6f51052f45383e2938794
1 // © 2013 Benoît Pin MINES ParisTech
7 var isThumbnail
= /.*\/getThumbnail$/;
9 DDImageUploader = function(dropbox
, uploadUrl
) {
10 DDFileUploaderBase
.apply(this, [dropbox
, uploadUrl
]);
12 this.existingSlides
= this.indexExistingSlides();
14 this.progressBarMaxSize
= 200; // pixels
15 this.thumbnailSize
= 180;
16 this.previewQueue
= [];
17 this._previewQueueRunning
= false;
18 this.previewsLoaded
= 0;
21 copyPrototype(DDImageUploader
, DDFileUploaderBase
);
23 DDImageUploader
.prototype.indexExistingSlides = function() {
24 var images
= this.dropbox
.getElementsByTagName('img');
27 for (i
=0 ; i
< images
.length
; i
++) {
28 if (isThumbnail
.test(images
[i
].src
)) {
29 index
[images
[i
].src
] = images
[i
]; }