Add image type

SPR-322, GitHub Issue #13
This commit is contained in:
Michael Große
2016-02-22 17:38:21 +01:00
parent bc2afde4d8
commit d8882ef0c5
2 changed files with 57 additions and 0 deletions

View File

@ -4,4 +4,16 @@ jQuery(function(){
jQuery('input.struct_date').datepicker({
dateFormat: 'yy-mm-dd'
});
jQuery('button.struct_img').click(function (event) {
var input_id = event.target.id.substr(0,event.target.id.length-'Button'.length);
window.open(
DOKU_BASE+"lib/exe/mediamanager.php?ns=:"+'&edid='+encodeURIComponent(input_id) + '&onselect=insertStructImage',
'mediaselect',
'width=750,height=500,left=20,top=20,scrollbars=yes,resizable=yes'); //
});
window.insertStructImage = function(edid, mediaid, opts, align) {
jQuery('#'+edid).val(mediaid).change();
};
});