</div>
<br clear="all"/>
<div metal:use-macro="here/batch_macros/macros/navigation">batch navigation</div>
- <script type="text/javascript">
- // <!--
+ <script type="text/javascript" tal:content="python:'''
(function(){
var lb = document.getElementById('lightbox');
var uploadUrl = absolute_url() + '/put_upload';
new Lightbox(lb);
- new DDImageUploader(lb, uploadUrl);
+ var options = {'slideSize' : %(slideSize)d,
+ 'thumbnailSize' : %(thumbnailSize)d};
+ new DDImageUploader(lb, uploadUrl, options);
})();
- // -->
+ ''' % {'slideSize' : portal_object.slide_size,
+ 'thumbnailSize' : portal_object.thumb_size}">
</script>
</div>
var MAX_PREVIEW = 2;
var isThumbnail = /.*\/getThumbnail$/;
-DDImageUploader = function(dropbox, uploadUrl) {
+DDImageUploader = function(dropbox, uploadUrl, options) {
DDFileUploaderBase.apply(this, [dropbox, uploadUrl]);
this.existingSlides = this.indexExistingSlides();
- this.slideSize = 222;
- this.progressBarMaxSize = 200; // pixels
- this.thumbnailSize = 180;
+ this.slideSize = options.slideSize || 222;
+ this.progressBarMaxSize = this.slideSize - 22 || 200; // pixels
+ this.thumbnailSize = options.thumbnailSize || 180;
this.previewQueue = [];
this._previewQueueRunning = false;
this.previewsLoaded = 0;