I am working on extending the image plugin to add an additional select list so that the value can be passed onto the upload connector.
For this purpose I made the following modifications in the image.js plugin file. I have added a new element called "maxImageSize" and want to set the value of the select list to the "params" attribute of the "uploadButton" element.
Here is the code for the "Upload" Tab:
I am stuck in setting the value of the params attribute of the 'filebrowser' to the value of the select list. What do I need to make that happen in the onChange function for the 'maxImageSize' element?
For this purpose I made the following modifications in the image.js plugin file. I have added a new element called "maxImageSize" and want to set the value of the select list to the "params" attribute of the "uploadButton" element.
Here is the code for the "Upload" Tab:
{
id : 'Upload',
hidden : true,
filebrowser : 'uploadButton',
label : editor.lang.image.upload,
elements :
[
{
type : 'file',
id : 'upload',
label : editor.lang.image.btnUpload,
style: 'height:40px',
size : 38
},
{
id : 'maxImageSize',
type : 'select',
label : 'Resize Image width',
required: true,
align : 'center',
width : '120px',
'default' : '',
items :
[
[ '' , ''],
[ '50 px' , '50'],
[ '75 px' , '75'],
[ '100 px' , '100'],
[ '125 px' , '125'],
[ '150 px' , '150'],
[ '175 px' , '175'],
[ '200 px' , '200'],
[ '250 px' , '250'],
[ '300 px' , '300'],
[ '350 px' , '350'],
[ '400 px' , '400'],
[ '450 px' , '450'],
[ '500 px' , '500'],
[ '550 px' , '550'],
[ '600 px' , '600'],
[ '700 px' , '700'],
[ '800 px' , '800'],
],
onChange : function ()
{
}
},
{
type : 'fileButton',
id : 'uploadButton',
filebrowser :
{
action : 'QuickUpload',
target : 'info:txtUrl',
params :
{
maxImageSize : 400 // Need to get the value from the onChange handler of the 'maxImageSize' element
}
},
label : editor.lang.image.btnUpload,
'for' : [ 'Upload', 'upload' ]
}
]
},
I am stuck in setting the value of the params attribute of the 'filebrowser' to the value of the select list. What do I need to make that happen in the onChange function for the 'maxImageSize' element?

Re: Extending Image Dialog - Upload properties
onChange : function () { var dialog = this.getDialog(); var editor = dialog.getParentEditor(); var maxImageSize = this.getValue(); var uploadButtonElement = this.getDialog().getContentElement( 'Upload', 'uploadButton' ); uploadButtonElement.filebrowser.url = editor.config.filebrowserImageUploadUrl + '&maxImageSize=' + maxImageSize; }I am still not able to change the filebrowser url parameters. Any hints?