<![CDATA[ ClassExtender and Images - MODX Community Forums]]> https://forums.modx.com/thread/?thread=97535 <![CDATA[ClassExtender and Images]]> https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527412 sottwell Jun 24, 2015, 10:38 AM https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527412 <![CDATA[Re: ClassExtender and Images]]> https://forums.modx.com/thread/97535/classextender-and-images#dis-post-554499

I would like to add a second Image to a user. I understood that i just have to add a input type=text to save the path to the image.

But it would be much nicer if the user could use the Media Manager.

Susans solution sound like the JS would open the media browser but i am totally lost how to use it.

Any Ideas?]]>
stefan79w Oct 13, 2017, 10:51 AM https://forums.modx.com/thread/97535/classextender-and-images#dis-post-554499
<![CDATA[Re: ClassExtender and Images]]> https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527434 BobRay Jun 24, 2015, 10:38 PM https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527434 <![CDATA[Re: ClassExtender and Images]]> https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527431
                xtype: 'modx-combo-browser'
                ,fieldLabel: _('simplecart.resource.product_image')
                ,name: 'product_image'
                ,id: 'simplecart-product-resource-image'
                ,anchor: '100%'
                ,source: imageSource
                ,hideSourceCombo: true
                ,listeners: {
                    'select': {
                        fn: function(data) {
                            MODx.fireResourceFormChange();
                            var d = Ext.get('simplecart-product-resource-imagepreview');
                                d.update('');

                            if (!Ext.isEmpty(data.url)) {
                                var imageUrl = MODx.config.connectors_url+'system/phpthumb.php?h=150&w=200&src='+data.url+'&wctx=web&source='+imageSource;
                                d.update('<img src="'+imageUrl+'" alt="" />');
                            }
                        }
                        ,scope: this
                    }
                }
            },{
                html: '<div id="simplecart-product-resource-imagepreview">' +
                    ((config.record.product_image) ? '<img src="'+MODx.config.connectors_url+'system/phpthumb.php?h=150&w=200&src='+config.record.product_image+'&wctx=web&source='+imageSource+'">' : '') +
                    '</div>'
                ,border: false
            },{
]]>
sottwell Jun 24, 2015, 10:28 PM https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527431
<![CDATA[Re: ClassExtender and Images]]> https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527430 sottwell Jun 24, 2015, 10:19 PM https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527430 <![CDATA[Re: ClassExtender and Images]]> https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527417
If you want to store attributes along with it, they'd either have to be separate fields or you'd have to do some custom work.
]]>
BobRay Jun 24, 2015, 11:50 AM https://forums.modx.com/thread/97535/classextender-and-images#dis-post-527417