thumbnailOptions += '<option value="original">' + Language.get('wcf.media.insert.imageSize.original') + '</option>';
var dialog = '<div class="section">'
- + (this._mediaToInsert.size > 1 ? '<dl>'
+ /*+ (this._mediaToInsert.size > 1 ? '<dl>'
+ '<dt>' + Language.get('wcf.media.insert.type') + '</dt>'
+ '<dd>'
+ '<select name="insertType">'
+ '<option value="gallery">' + Language.get('wcf.media.insert.type.gallery') + '</option>'
+ '</select>'
+ '</dd>'
- + '</dl>' : '')
+ + '</dl>' : '')*/
+ '<dl class="thumbnailSizeSelection">'
+ '<dt>' + Language.get('wcf.media.insert.imageSize') + '</dt>'
+ '<dd>'
elByClass('buttonPrimary', content)[0].addEventListener(WCF_CLICK_EVENT, this._insertMedia.bind(this));
// toggle thumbnail size selection based on selected insert type
- var insertType = elBySel('select[name=insertType]', content);
+ /*var insertType = elBySel('select[name=insertType]', content);
if (insertType !== null) {
var thumbnailSelection = elByClass('thumbnailSizeSelection', content)[0];
insertType.addEventListener('change', function(event) {
elShow(thumbnailSelection);
}
});
- }
+ }*/
+ var thumbnailSelection = elBySel('.thumbnailSizeSelection', content);
+ elShow(thumbnailSelection);
}.bind(this),
title: Language.get('wcf.media.insert')
},
var dialogContent = event.currentTarget.closest('.dialogContent');
- if (this._mediaToInsert.size > 1) {
+ /*if (this._mediaToInsert.size > 1) {
insertType = elBySel('select[name=insertType]', dialogContent).value;
- }
+ }*/
thumbnailSize = elBySel('select[name=thumbnailSize]', dialogContent).value;
}
var mediaIds = [];
this._mediaToInsert.forEach(function(media) {
mediaIds.push(media.mediaID);
- })
+ });
ControllerClipboard.unmark('com.woltlab.wcf.media', mediaIds);
}